RBToken.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 RBTOKEN_H_INCLUDED
00011 #define RBTOKEN_H_INCLUDED
00012 
00013 #include <boost/static_assert.hpp>
00014 
00015 #include "EBOOKToken.h"
00016 
00017 namespace libebook
00018 {
00019 
00020 namespace RBToken
00021 {
00022 
00023 enum
00024 {
00025   INVALID_TOKEN = 0,
00026   FIRST_TOKEN = EBOOKToken<RBParser>::FIRST_TOKEN,
00027 
00028   // keys
00029   AUTHOR,
00030   BODY,
00031   COMMENT,
00032   COPYRIGHT,
00033   COPYTITLE,
00034   COPY_ID,
00035   GENERATOR,
00036   ISBN,
00037   MENUMARK,
00038   OUTPUT,
00039   PARSE,
00040   PUBSERVER_ID,
00041   PUB_NAME,
00042   REVISION,
00043   SuggestedRetailPrice,
00044   TITLE,
00045   TITLE_LANGUAGE,
00046   TYPE,
00047   URL,
00048   USERNAME,
00049 
00050   // values
00051   unknown,
00052 
00053   LAST_TOKEN
00054 };
00055 
00056 BOOST_STATIC_ASSERT(EBOOKToken<RBParser>::LAST_TOKEN >= LAST_TOKEN);
00057 
00058 }
00059 
00060 int getRBTokenId(const char *name, const char *ns = 0);
00061 int getRBTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
00062 int getRBTokenId(const char *name, std::size_t nameLen);
00063 
00064 }
00065 
00066 #endif // RBTOKEN_H_INCLUDED
00067 
00068 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */