EBOOKOPFToken.h Source File documentation

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

EBOOKOPFToken.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 EBOOKOPFTOKEN_H_INCLUDED
11 #define EBOOKOPFTOKEN_H_INCLUDED
12
13 #include <boost/static_assert.hpp>
14
15 #include "EBOOKToken.h"
16
17 namespace libebook
18 {
19
20 namespace EBOOKOPFToken
21 {
22
23 enum
24 {
25 INVALID_TOKEN = 0,
26 FIRST_TOKEN = EBOOKToken<EBOOKOPFParser>::FIRST_TOKEN,
27
28 // namespace prefixes
29 dc,
30 opf,
31 xml,
32 xmlns,
33
34 // elements
35 Contributor,
36 Coverage,
37 Creator,
38 Date,
39 Description,
40 Format,
41 Identifier,
42 Language,
43 Publisher,
44 Relation,
45 Rights,
46 Source,
47 Subject,
48 Title,
49 Type,
50 contributor,
51 coverage,
52 creator,
53 date,
54 dc_metadata,
55 description,
56 format,
57 guide,
58 identifier,
59 item,
60 itemref,
61 language,
62 manifest,
63 meta,
64 metadata,
65 package,
66 publisher,
67 reference,
68 relation,
69 rights,
70 site,
71 source,
72 spine,
73 subject,
74 title,
75 tour,
76 tours,
77 type,
78 x_metadata,
79
80 // attributes
81 content,
82 event,
83 fallback,
84 fallback_style,
85 file_as,
86 href,
87 id,
88 idref,
89 lang,
90 linear,
91 media_type,
92 name,
93 required_modules,
94 required_namespace,
95 role,
96 scheme,
97 toc,
98 unique_identifier,
99 version,
100
101 // attribute values
102 MIME_image,
103 MIME_oeb,
104 MIME_xhtml,
105 _2_0,
106 _3_0,
107 aut,
108 creation,
109 edt,
110 modification,
111 no,
112 publication,
113 yes,
114
115 LAST_TOKEN
116 };
117
118 BOOST_STATIC_ASSERT(EBOOKToken<EBOOKOPFParser>::LAST_TOKEN >= LAST_TOKEN);
119
120 enum Namespace
121 {
122 NS_dc = dc << 16,
123 NS_opf = opf << 16,
124 NS_xml = xml << 16,
125 NS_xmlns = xmlns << 16
126 };
127
128 }
129
130 int getOPFTokenId(const char *name, const char *ns = 0);
131 int getOPFTokenId(const char *name, std::size_t nameLen, const char *ns, std::size_t nsLen);
132 int getOPFTokenId(const char *name, std::size_t nameLen);
133
134 }
135
136 #endif // EBOOKOPFTOKEN_H_INCLUDED
137
138 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libebook::EBOOKOPFToken::Title
Definition: EBOOKOPFToken.h:48
libebook::EBOOKOPFToken::href
Definition: EBOOKOPFToken.h:86
libebook::EBOOKOPFToken::type
Definition: EBOOKOPFToken.h:77
libebook::EBOOKOPFToken::guide
Definition: EBOOKOPFToken.h:57
libebook::EBOOKOPFToken::publisher
Definition: EBOOKOPFToken.h:66
libebook::EBOOKOPFToken::NS_xmlns
Definition: EBOOKOPFToken.h:125
libebook::EBOOKOPFToken::spine
Definition: EBOOKOPFToken.h:72
libebook::EBOOKOPFToken::Identifier
Definition: EBOOKOPFToken.h:41
libebook::EBOOKOPFToken::xmlns
Definition: EBOOKOPFToken.h:32
libebook::EBOOKOPFToken::Subject
Definition: EBOOKOPFToken.h:47
libebook::EBOOKOPFToken::date
Definition: EBOOKOPFToken.h:53
libebook::EBOOKOPFToken::item
Definition: EBOOKOPFToken.h:59
libebook::EBOOKOPFToken::fallback_style
Definition: EBOOKOPFToken.h:84
libebook::EBOOKOPFToken::identifier
Definition: EBOOKOPFToken.h:58
libebook::EBOOKOPFToken::edt
Definition: EBOOKOPFToken.h:109
libebook::EBOOKOPFToken::publication
Definition: EBOOKOPFToken.h:112
libebook::EBOOKOPFToken::dc_metadata
Definition: EBOOKOPFToken.h:54
libebook::EBOOKOPFToken::fallback
Definition: EBOOKOPFToken.h:83
libebook::EBOOKOPFToken::lang
Definition: EBOOKOPFToken.h:89
libebook::EBOOKOPFToken::Date
Definition: EBOOKOPFToken.h:38
libebook::EBOOKOPFToken::version
Definition: EBOOKOPFToken.h:99
libebook::EBOOKOPFToken::scheme
Definition: EBOOKOPFToken.h:96
libebook::EBOOKOPFToken::modification
Definition: EBOOKOPFToken.h:110
libebook::EBOOKOPFToken::Format
Definition: EBOOKOPFToken.h:40
libebook::EBOOKOPFToken::xml
Definition: EBOOKOPFToken.h:31
libebook::EBOOKOPFToken::Type
Definition: EBOOKOPFToken.h:49
libebook::EBOOKOPFToken::package
Definition: EBOOKOPFToken.h:65
libebook::EBOOKOPFToken::Rights
Definition: EBOOKOPFToken.h:45
libebook::EBOOKOPFToken::media_type
Definition: EBOOKOPFToken.h:91
libebook::EBOOKOPFToken::FIRST_TOKEN
Definition: EBOOKOPFToken.h:26
libebook::EBOOKOPFToken::meta
Definition: EBOOKOPFToken.h:63
libebook::EBOOKOPFToken::toc
Definition: EBOOKOPFToken.h:97
libebook::EBOOKOPFToken::title
Definition: EBOOKOPFToken.h:74
libebook::EBOOKOPFToken::role
Definition: EBOOKOPFToken.h:95
libebook::EBOOKOPFToken::unique_identifier
Definition: EBOOKOPFToken.h:98
libebook::EBOOKOPFToken::creator
Definition: EBOOKOPFToken.h:52
libebook::EBOOKOPFToken::metadata
Definition: EBOOKOPFToken.h:64
libebook::EBOOKOPFToken::Relation
Definition: EBOOKOPFToken.h:44
libebook::EBOOKOPFToken::NS_opf
Definition: EBOOKOPFToken.h:123
libebook::EBOOKOPFToken::source
Definition: EBOOKOPFToken.h:71
libebook::EBOOKOPFToken::language
Definition: EBOOKOPFToken.h:61
libebook::EBOOKOPFToken::rights
Definition: EBOOKOPFToken.h:69
libebook::EBOOKOPFToken::Contributor
Definition: EBOOKOPFToken.h:35
libebook::EBOOKOPFToken::idref
Definition: EBOOKOPFToken.h:88
libebook::EBOOKOPFToken::INVALID_TOKEN
Definition: EBOOKOPFToken.h:25
libebook::EBOOKOPFToken::no
Definition: EBOOKOPFToken.h:111
libebook::EBOOKOPFToken::description
Definition: EBOOKOPFToken.h:55
libebook::EBOOKToken
Definition: EBOOKToken.h:17
libebook::EBOOKOPFToken::reference
Definition: EBOOKOPFToken.h:67
libebook::EBOOKOPFToken::MIME_image
Definition: EBOOKOPFToken.h:102
libebook::EBOOKOPFToken::event
Definition: EBOOKOPFToken.h:82
libebook::getOPFTokenId
int getOPFTokenId(const char *const name, const char *const ns)
Definition: EBOOKOPFToken.cpp:27
libebook::EBOOKOPFToken::content
Definition: EBOOKOPFToken.h:81
libebook::EBOOKOPFToken::Creator
Definition: EBOOKOPFToken.h:37
libebook::EBOOKOPFToken::coverage
Definition: EBOOKOPFToken.h:51
libebook::EBOOKOPFToken::Source
Definition: EBOOKOPFToken.h:46
libebook::EBOOKOPFToken::MIME_xhtml
Definition: EBOOKOPFToken.h:104
libebook::EBOOKOPFToken::LAST_TOKEN
Definition: EBOOKOPFToken.h:115
libebook::EBOOKOPFToken::manifest
Definition: EBOOKOPFToken.h:62
libebook::EBOOKOPFToken::required_modules
Definition: EBOOKOPFToken.h:93
libebook::EBOOKOPFToken::_2_0
Definition: EBOOKOPFToken.h:105
name
string name
Definition: CHMStream.cpp:80
libebook::EBOOKOPFToken::Description
Definition: EBOOKOPFToken.h:39
libebook::EBOOKOPFToken::Publisher
Definition: EBOOKOPFToken.h:43
libebook::EBOOKOPFToken::MIME_oeb
Definition: EBOOKOPFToken.h:103
libebook::EBOOKOPFToken::site
Definition: EBOOKOPFToken.h:70
EBOOKToken.h
libebook::EBOOKOPFToken::format
Definition: EBOOKOPFToken.h:56
libebook::EBOOKOPFToken::Coverage
Definition: EBOOKOPFToken.h:36
libebook::EBOOKOPFToken::Language
Definition: EBOOKOPFToken.h:42
libebook::EBOOKOPFToken::required_namespace
Definition: EBOOKOPFToken.h:94
libebook::EBOOKOPFToken::yes
Definition: EBOOKOPFToken.h:113
libebook::EBOOKOPFToken::creation
Definition: EBOOKOPFToken.h:108
libebook::EBOOKOPFToken::aut
Definition: EBOOKOPFToken.h:107
libebook::EBOOKOPFToken::file_as
Definition: EBOOKOPFToken.h:85
libebook::EBOOKOPFToken::id
Definition: EBOOKOPFToken.h:87
libebook::EBOOKOPFToken::opf
Definition: EBOOKOPFToken.h:30
libebook::EBOOKOPFToken::_3_0
Definition: EBOOKOPFToken.h:106
libebook::EBOOKOPFToken::subject
Definition: EBOOKOPFToken.h:73
libebook::EBOOKOPFToken::NS_xml
Definition: EBOOKOPFToken.h:124
libebook
Definition: CHMParser.cpp:20
libebook::EBOOKOPFToken::name
Definition: EBOOKOPFToken.h:92
libebook::EBOOKOPFToken::dc
Definition: EBOOKOPFToken.h:29
libebook::EBOOKOPFToken::linear
Definition: EBOOKOPFToken.h:90
libebook::EBOOKOPFToken::relation
Definition: EBOOKOPFToken.h:68
libebook::EBOOKOPFToken::tours
Definition: EBOOKOPFToken.h:76
libebook::EBOOKOPFToken::tour
Definition: EBOOKOPFToken.h:75
libebook::EBOOKOPFToken::x_metadata
Definition: EBOOKOPFToken.h:78
libebook::EBOOKOPFToken::itemref
Definition: EBOOKOPFToken.h:60
libebook::EBOOKOPFToken::contributor
Definition: EBOOKOPFToken.h:50
libebook::EBOOKOPFToken::NS_dc
Definition: EBOOKOPFToken.h:122
libebook::EBOOKOPFToken::BOOST_STATIC_ASSERT
BOOST_STATIC_ASSERT(EBOOKToken< EBOOKOPFParser >::LAST_TOKEN >=LAST_TOKEN)
libebook::EBOOKOPFToken::Namespace
Namespace
Definition: EBOOKOPFToken.h:120