FictionBook2MetadataContext.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libe-book project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef FICTIONBOOK2METADATACONTEXT_H_INCLUDED
11 #define FICTIONBOOK2METADATACONTEXT_H_INCLUDED
12 
13 #include <memory>
14 
16 
17 namespace libebook
18 {
19 
20 class FictionBook2Authors;
21 
23 {
24 public:
26 
27 private:
29  void startOfElement() override;
30  void endOfElement() override;
31  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
32  void text(const char *value) override;
33 };
34 
36 {
37 public:
39 
40 private:
42  void startOfElement() override;
43  void endOfElement() override;
44  void endOfAttributes() override {}
45  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
46  void text(const char *value) override;
47 
48 private:
50 };
51 
53 {
54 public:
56 
57 private:
59  void startOfElement() override;
60  void endOfElement() override;
61  void endOfAttributes() override {}
62  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
63  void text(const char *value) override;
64 };
65 
67 {
68 public:
70 
71 private:
73  void startOfElement() override;
74  void endOfElement() override;
75  void endOfAttributes() override {}
76  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
77  void text(const char *value) override;
78 };
79 
81 {
82 public:
83  explicit FictionBook2CityContext(FictionBook2ParserContext *parentContext);
84 
85 private:
87  void startOfElement() override;
88  void endOfElement() override;
89  void endOfAttributes() override {}
90  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
91  void text(const char *value) override;
92 };
93 
95 {
96 public:
98 
99 private:
101  void startOfElement() override;
102  void endOfElement() override;
103  void endOfAttributes() override {}
104  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
105  void text(const char *value) override;
106 };
107 
109 {
110 public:
112 
113 private:
115  void startOfElement() override;
116  void endOfElement() override;
117  void endOfAttributes() override {}
118  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
119  void text(const char *value) override;
120 
121 private:
122  librevenge::RVNGString m_type;
123  librevenge::RVNGString m_text;
124 };
125 
127 {
128  // no copying
131 
132 public:
133  FictionBook2DateContext(FictionBook2ParserContext *parentContext, const char *name);
134 
135 private:
137  void startOfElement() override;
138  void endOfElement() override;
139  void endOfAttributes() override {}
140  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
141  void text(const char *value) override;
142 
143 private:
144  const char *const m_name;
145 };
146 
148 {
149 public:
151 
152 private:
154  void startOfElement() override;
155  void endOfElement() override;
156  void endOfAttributes() override {}
157  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
158  void text(const char *value) override;
159 };
160 
162 {
163  // no copying
166 
167 public:
169 
170 private:
171  ~FictionBook2TextInfoContext() override;
172 
174  void startOfElement() override;
175  void endOfElement() override;
176  void endOfAttributes() override {}
177  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
178  void text(const char *value) override;
179 
180 private:
181  std::unique_ptr<FictionBook2Authors> m_authors;
182 };
183 
185 {
186 public:
187  explicit FictionBook2EmailContext(FictionBook2ParserContext *parentContext);
188 
189 private:
191  void startOfElement() override;
192  void endOfElement() override;
193  void endOfAttributes() override {}
194  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
195  void text(const char *value) override;
196 };
197 
199 {
200 public:
202 
203 private:
205  void startOfElement() override;
206  void endOfElement() override;
207  void endOfAttributes() override {}
208  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
209  void text(const char *value) override;
210 
211 private:
213 };
214 
216 {
217 public:
218  explicit FictionBook2GenreContext(FictionBook2ParserContext *parentContext);
219 
220 private:
222  void startOfElement() override;
223  void endOfElement() override;
224  void endOfAttributes() override {}
225  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
226  void text(const char *value) override;
227 };
228 
230 {
231 public:
232  explicit FictionBook2HistoryContext(FictionBook2ParserContext *parentContext);
233 
234 private:
236  void startOfElement() override;
237  void endOfElement() override;
238  void endOfAttributes() override {}
239  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
240  void text(const char *value) override;
241 };
242 
244 {
245 public:
247 
248 private:
250  void startOfElement() override;
251  void endOfElement() override;
252  void endOfAttributes() override {}
253  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
254  void text(const char *value) override;
255 };
256 
258 {
259 public:
260  explicit FictionBook2IdContext(FictionBook2ParserContext *parentContext);
261 
262 private:
264  void startOfElement() override;
265  void endOfElement() override;
266  void endOfAttributes() override {}
267  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
268  void text(const char *value) override;
269 };
270 
272 {
273 public:
274  explicit FictionBook2IsbnContext(FictionBook2ParserContext *parentContext);
275 
276 private:
278  void startOfElement() override;
279  void endOfElement() override;
280  void endOfAttributes() override {}
281  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
282  void text(const char *value) override;
283 };
284 
286 {
287 public:
289 
290 private:
292  void startOfElement() override;
293  void endOfElement() override;
294  void endOfAttributes() override {}
295  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
296  void text(const char *value) override;
297 };
298 
300 {
301 public:
302  explicit FictionBook2LangContext(FictionBook2ParserContext *parentContext);
303 
304 private:
306  void startOfElement() override;
307  void endOfElement() override;
308  void endOfAttributes() override {}
309  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
310  void text(const char *value) override;
311 };
312 
314 {
315 public:
317 
318 private:
320  void startOfElement() override;
321  void endOfElement() override;
322  void endOfAttributes() override {}
323  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
324  void text(const char *value) override;
325 
326 private:
328 };
329 
331 {
332 public:
334 
335 private:
337  void startOfElement() override;
338  void endOfElement() override;
339  void endOfAttributes() override {}
340  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
341  void text(const char *value) override;
342 
343 private:
345 };
346 
348 {
349 public:
351 
352 private:
354  void startOfElement() override;
355  void endOfElement() override;
356  void endOfAttributes() override {}
357  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
358  void text(const char *value) override;
359 
360 private:
362 };
363 
365 {
366 public:
367  explicit FictionBook2OutputContext(FictionBook2ParserContext *parentContext);
368 
369 private:
371  void startOfElement() override;
372  void endOfElement() override;
373  void endOfAttributes() override {}
374  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
375  void text(const char *value) override;
376 };
377 
379 {
380 public:
382 
383 private:
385  void startOfElement() override;
386  void endOfElement() override;
387  void endOfAttributes() override {}
388  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
389  void text(const char *value) override;
390 };
391 
393 {
394 public:
395  explicit FictionBook2PartContext(FictionBook2ParserContext *parentContext);
396 
397 private:
399  void startOfElement() override;
400  void endOfElement() override;
401  void endOfAttributes() override {}
402  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
403  void text(const char *value) override;
404 };
405 
407 {
408 public:
410 
411 private:
413  void startOfElement() override;
414  void endOfElement() override;
415  void endOfAttributes() override {}
416  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
417  void text(const char *value) override;
418 };
419 
421 {
422 public:
424 
425 private:
427  void startOfElement() override;
428  void endOfElement() override;
429  void endOfAttributes() override {}
430  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
431  void text(const char *value) override;
432 };
433 
435 {
436 public:
438 
439 private:
441  void startOfElement() override;
442  void endOfElement() override;
443  void endOfAttributes() override {}
444  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
445  void text(const char *value) override;
446 };
447 
449 {
450 public:
452 
453 private:
455  void startOfElement() override;
456  void endOfElement() override;
457  void endOfAttributes() override {}
458  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
459  void text(const char *value) override;
460 };
461 
463 {
464 public:
465  explicit FictionBook2SrcLangContext(FictionBook2ParserContext *parentContext);
466 
467 private:
469  void startOfElement() override;
470  void endOfElement() override;
471  void endOfAttributes() override {}
472  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
473  void text(const char *value) override;
474 };
475 
477 {
478 public:
479  explicit FictionBook2SrcOcrContext(FictionBook2ParserContext *parentContext);
480 
481 private:
483  void startOfElement() override;
484  void endOfElement() override;
485  void endOfAttributes() override {}
486  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
487  void text(const char *value) override;
488 };
489 
491 {
492 public:
494 
495 private:
497  void startOfElement() override;
498  void endOfElement() override;
499  void endOfAttributes() override {}
500  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
501  void text(const char *value) override;
502 };
503 
505 {
506 public:
507  explicit FictionBook2SrcUrlContext(FictionBook2ParserContext *parentContext);
508 
509 private:
511  void startOfElement() override;
512  void endOfElement() override;
513  void endOfAttributes() override {}
514  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
515  void text(const char *value) override;
516 };
517 
519 {
520  // no copying
523 
524 public:
526 
527 private:
528  ~FictionBook2TitleInfoContext() override;
529 
531  void startOfElement() override;
532  void endOfElement() override;
533  void endOfAttributes() override {}
534  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
535  void text(const char *value) override;
536 
537 private:
538  std::unique_ptr<FictionBook2Authors> m_authors;
539 };
540 
542 {
543 public:
545 
546 private:
548  void startOfElement() override;
549  void endOfElement() override;
550  void endOfAttributes() override {}
551  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
552  void text(const char *value) override;
553 };
554 
556 {
557 public:
558  explicit FictionBook2VersionContext(FictionBook2ParserContext *parentContext);
559 
560 private:
562  void startOfElement() override;
563  void endOfElement() override;
564  void endOfAttributes() override {}
565  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
566  void text(const char *value) override;
567 };
568 
570 {
571 public:
572  explicit FictionBook2YearContext(FictionBook2ParserContext *parentContext);
573 
574 private:
576  void startOfElement() override;
577  void endOfElement() override;
578  void endOfAttributes() override {}
579  void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override;
580  void text(const char *value) override;
581 };
582 
583 }
584 
585 #endif // FICTIONBOOK2METADATACONTEXT_H_INCLUDED
586 
587 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: FictionBook2MetadataContext.h:126
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:387
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:103
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:457
FictionBook2Authors & m_authors
Definition: FictionBook2MetadataContext.h:361
FictionBook2XMLParserContext * element(const FictionBook2TokenData &name, const FictionBook2TokenData &ns) override
Create a context for parsing a child element.
Definition: FictionBook2MetadataContext.cpp:109
Definition: FictionBook2MetadataContext.h:161
Definition: FictionBook2MetadataContext.h:555
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:485
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:308
Definition: FictionBook2MetadataContext.h:94
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:550
Definition: FictionBook2MetadataContext.h:229
Definition: FictionBook2MetadataContext.h:364
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:193
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:578
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:356
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:224
Definition: FictionBook2MetadataContext.h:299
Definition: FictionBook2MetadataContext.h:330
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:280
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:117
FictionBook2Authors & m_authors
Definition: FictionBook2MetadataContext.h:49
Definition: FictionBook2XMLParserContext.h:18
Definition: FictionBook2MetadataContext.h:541
Definition: FictionBook2MetadataContext.h:271
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:207
const char *const m_name
Definition: FictionBook2MetadataContext.h:144
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:294
Definition: FictionBook2MetadataContext.cpp:21
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:238
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:443
Definition: FictionBook2MetadataContext.h:52
librevenge::RVNGString m_type
Definition: FictionBook2MetadataContext.h:122
void attribute(const FictionBook2TokenData &name, const FictionBook2TokenData *ns, const char *value) override
Process an attribute.
Definition: FictionBook2MetadataContext.cpp:134
Definition: FictionBook2ParserContext.h:151
Definition: FictionBook2Style.h:35
Definition: FictionBook2MetadataContext.h:35
FictionBook2Authors & m_authors
Definition: FictionBook2MetadataContext.h:212
FictionBook2AnnotationContext(FictionBook2ParserContext *parentContext, const FictionBook2BlockFormat &format)
Definition: FictionBook2MetadataContext.cpp:104
FictionBook2Authors & m_authors
Definition: FictionBook2MetadataContext.h:344
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:75
Definition: FictionBook2MetadataContext.h:476
Definition: FictionBook2MetadataContext.h:504
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:533
std::unique_ptr< FictionBook2Authors > m_authors
Definition: FictionBook2MetadataContext.h:181
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:401
Definition: FictionBook2MetadataContext.h:184
Definition: FictionBook2Token.h:133
Definition: FictionBook2MetadataContext.h:257
Definition: FictionBook2MetadataContext.h:22
Definition: FictionBook2MetadataContext.h:518
const char * name
Definition: EBOOKHTMLToken.cpp:44
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:471
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:176
void text(const char *value) override
Process textual content of an element.
Definition: FictionBook2MetadataContext.cpp:148
Definition: FictionBook2MetadataContext.h:406
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:322
Definition: FictionBook2MetadataContext.h:80
librevenge::RVNGString m_text
Definition: FictionBook2MetadataContext.h:123
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:499
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:252
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:429
Definition: FictionBook2MetadataContext.h:147
FictionBook2Authors & m_authors
Definition: FictionBook2MetadataContext.h:327
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:373
Definition: FictionBook2MetadataContext.h:347
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:339
Definition: FictionBook2MetadataContext.h:198
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:89
Definition: FictionBook2MetadataContext.h:243
Base class for all contexts.
Definition: FictionBook2ParserContext.h:23
Definition: EBOOKOPFToken.h:54
FictionBook2ParserContext & operator=(const FictionBook2ParserContext &other)
Definition: FictionBook2MetadataContext.h:285
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:61
void endOfElement() override
Signalize the end of an element.
Definition: FictionBook2MetadataContext.cpp:129
Definition: FictionBook2MetadataContext.h:378
Definition: FictionBook2Collector.h:22
Definition: BBeBCollector.cpp:18
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:513
Definition: FictionBook2MetadataContext.h:569
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:415
qi::rule< Iterator, AttrValue_t, qi::space_type > value
Definition: TealDocParser.cpp:231
Definition: FictionBook2MetadataContext.h:490
Definition: FictionBook2MetadataContext.h:448
Definition: FictionBook2MetadataContext.h:392
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:266
Definition: FictionBook2MetadataContext.h:108
Definition: FictionBook2MetadataContext.h:462
std::unique_ptr< FictionBook2Authors > m_authors
Definition: FictionBook2MetadataContext.h:538
Definition: FictionBook2MetadataContext.h:434
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:139
Definition: FictionBook2MetadataContext.h:313
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:564
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:156
void endOfAttributes() override
Signalize the end of attributes.
Definition: FictionBook2MetadataContext.h:44
Definition: FictionBook2MetadataContext.h:215
void startOfElement() override
Signalize the start of an element.
Definition: FictionBook2MetadataContext.cpp:124
Definition: FictionBook2MetadataContext.h:66
Definition: FictionBook2MetadataContext.h:420

Generated for libe-book by doxygen 1.8.13