EBOOKToken.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003  * This file is part of the libe-book project.
00004  *
00005  * This Source Code Form is subject to the terms of the Mozilla Public
00006  * License, v. 2.0. If a copy of the MPL was not distributed with this
00007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
00008  */
00009 
00010 #ifndef EBOOKTOKEN_H_INCLUDED
00011 #define EBOOKTOKEN_H_INCLUDED
00012 
00013 namespace libebook
00014 {
00015 
00016 template<class Parser>
00017 struct EBOOKToken
00018 {
00019 };
00020 
00021 class EBOOKHTMLParser;
00022 class EBOOKOPFParser;
00023 class EPUBParser;
00024 class FB2Parser;
00025 class RBParser;
00026 
00027 template<>
00028 struct EBOOKToken<EBOOKHTMLParser>
00029 {
00030   static const int FIRST_TOKEN = 1;
00031   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
00032 };
00033 
00034 template<>
00035 struct EBOOKToken<EBOOKOPFParser>
00036 {
00037   static const int FIRST_TOKEN = EBOOKToken<EBOOKHTMLParser>::LAST_TOKEN + 1;
00038   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
00039 };
00040 
00041 template<>
00042 struct EBOOKToken<EPUBParser>
00043 {
00044   static const int FIRST_TOKEN = EBOOKToken<EBOOKOPFParser>::LAST_TOKEN + 1;
00045   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
00046 };
00047 
00048 template<>
00049 struct EBOOKToken<FB2Parser>
00050 {
00051   static const int FIRST_TOKEN = EBOOKToken<EPUBParser>::LAST_TOKEN + 1;
00052   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
00053 };
00054 
00055 template<>
00056 struct EBOOKToken<RBParser>
00057 {
00058   static const int FIRST_TOKEN = EBOOKToken<FB2Parser>::LAST_TOKEN + 1;
00059   static const int LAST_TOKEN = FIRST_TOKEN + 1000;
00060 };
00061 
00062 }
00063 
00064 #endif // EBOOKTOKEN_H_INCLUDED
00065 
00066 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */