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 EBOOKTOKEN_H_INCLUDED
11 #define EBOOKTOKEN_H_INCLUDED
12 
13 namespace libebook
14 {
15 
16 template<class Parser>
17 struct EBOOKToken
18 {
19 };
20 
21 class EBOOKHTMLParser;
22 class EBOOKOPFParser;
23 class EPubParser;
24 class FictionBook2Parser;
25 class FictionBook3Parser;
26 class RocketEBookParser;
27 
28 template<>
29 struct EBOOKToken<EBOOKHTMLParser>
30 {
31   static const int FIRST_TOKEN = 1;
32   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
33 };
34 
35 template<>
36 struct EBOOKToken<EBOOKOPFParser>
37 {
38   static const int FIRST_TOKEN = EBOOKToken<EBOOKHTMLParser>::LAST_TOKEN + 1;
39   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
40 };
41 
42 template<>
43 struct EBOOKToken<EPubParser>
44 {
45   static const int FIRST_TOKEN = EBOOKToken<EBOOKOPFParser>::LAST_TOKEN + 1;
46   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
47 };
48 
49 template<>
50 struct EBOOKToken<FictionBook2Parser>
51 {
52   static const int FIRST_TOKEN = EBOOKToken<EPubParser>::LAST_TOKEN + 1;
53   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
54 };
55 
56 template<>
57 struct EBOOKToken<RocketEBookParser>
58 {
59   static const int FIRST_TOKEN = EBOOKToken<FictionBook2Parser>::LAST_TOKEN + 1;
60   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
61 };
62 
63 template<>
64 struct EBOOKToken<FictionBook3Parser>
65 {
66   static const int FIRST_TOKEN = EBOOKToken<RocketEBookParser>::LAST_TOKEN + 1;
67   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
68 };
69 
70 }
71 
72 #endif // EBOOKTOKEN_H_INCLUDED
73 
74 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
75