EPubToken.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 EPUBTOKEN_H_INCLUDED
11 #define EPUBTOKEN_H_INCLUDED
12 
13 #include "EBOOKToken.h"
14 
15 namespace libebook
16 {
17 
18 namespace EPubToken
19 {
20 
21 enum
22 {
25 
26  // namespace prefixes
28  xml,
30 
31  // elements
36 
37  // attributes
41 
42  // attribute values
46 
48 };
49 
50 static_assert(EBOOKToken<EPubParser>::LAST_TOKEN >= LAST_TOKEN, "token number overflow");
51 
53 {
55  NS_xml = xml << 16,
56  NS_xmlns = xmlns << 16
57 };
58 
59 }
60 
61 int getEPubTokenId(const char *name, const char *ns = nullptr);
62 int getEPubTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
63 int getEPubTokenId(const char *name, std::size_t nameLen);
64 
65 }
66 
67 #endif // EPUBTOKEN_H_INCLUDED
68 
69 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Namespace
Definition: EPubToken.h:52
Definition: EPubToken.h:44
Definition: EPubToken.h:45
Definition: EPubToken.h:54
Definition: EPubToken.h:40
Definition: EPubToken.h:23
int getEPubTokenId(const char *const name, const char *const ns)
Definition: EPubToken.cpp:27
Definition: EPubToken.h:33
Definition: EPubToken.h:29
Definition: EPubToken.h:39
Definition: EBOOKToken.h:17
Definition: EPubToken.h:38
Definition: EPubToken.h:55
Definition: EPubToken.h:56
const char * name
Definition: EBOOKHTMLToken.cpp:44
Definition: EPubToken.h:35
Definition: EPubToken.h:43
Definition: EPubToken.h:47
Definition: EPubToken.h:34
Definition: EPubToken.h:32
Definition: BBeBCollector.cpp:18
Definition: EPubToken.h:24
Definition: EPubToken.h:28
Definition: EPubToken.h:27

Generated for libe-book by doxygen 1.8.14