Use LTTngUSTLogger logger plugin in logtest regression test
[deliverable/titan.core.git] / xsdconvert / GeneralTypes.hh
CommitLineData
d44e3c4f 1/******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Balasko, Jeno
10 * Godar, Marton
11 * Raduly, Csaba
12 * Szabados, Kristof
13 * Szabo, Bence Janos
14 *
15 ******************************************************************************/
970ed795
EL
16#ifndef GENERAL_TYPES_H_
17#define GENERAL_TYPES_H_
18
19#include "Mstring.hh"
20
3abe9331 21enum ConstructType {
970ed795
EL
22 c_unknown,
23 c_schema,
24 c_simpleType,
25 c_complexType,
26 c_element,
27 c_attribute,
28 c_attributeGroup,
29 c_group,
30 c_annotation,
31 c_include,
3abe9331 32 c_import,
33 c_idattrib
970ed795
EL
34};
35
3abe9331 36enum NameConversionMode {
970ed795
EL
37 nameMode,
38 typeMode,
39 fieldMode
40};
41
3abe9331 42enum UseValue {
970ed795
EL
43 optional,
44 prohibited,
45 required
46};
47
3abe9331 48enum FormValue {
970ed795
EL
49 notset,
50 qualified,
51 unqualified
52};
53
3abe9331 54enum BlockValue {
55 not_set,
56 all,
57 substitution,
58 restriction,
59 extension
60};
61
62enum TagName {
63 // XSD Elements:
64 n_all,
65 n_annotation,
66 n_any,
67 n_anyAttribute,
68 n_appinfo,
69 n_attribute,
70 n_attributeGroup,
71 n_choice,
72 n_complexContent,
73 n_complexType,
74 n_documentation,
75 n_element,
76 n_extension,
77 n_field, // Not supported by now
78 n_group,
79 n_import,
80 n_include,
81 n_key, // Not supported by now
82 n_keyref, // Not supported by now
83 n_list,
84 n_notation, // Not supported by now
85 n_redefine,
86 n_restriction,
87 n_schema,
88 n_selector, // Not supported by now
89 n_sequence,
90 n_simpleContent,
91 n_simpleType,
92 n_union,
93 n_unique, // Not supported by now
94
95 // XSD Restrictions / Facets for Datatypes:
96 n_enumeration,
97 n_fractionDigits, // Not supported by now
98 n_length,
99 n_maxExclusive,
100 n_maxInclusive,
101 n_maxLength,
102 n_minExclusive,
103 n_minInclusive,
104 n_minLength,
105 n_pattern,
106 n_totalDigits,
107 n_whiteSpace,
108
109 // Others - non-standard, but used:
110 n_label, // ???
111 n_definition, // ???
112
113 n_NOTSET
114};
115
970ed795 116/** This type just stores the textual information about an XML namespace */
3abe9331 117class NamespaceType {
970ed795
EL
118public:
119 Mstring prefix;
120 Mstring uri;
121
122 NamespaceType()
3abe9331 123 : prefix(), uri() {
124 }
970ed795
EL
125
126 NamespaceType(const Mstring& p, const Mstring& u)
3abe9331 127 : prefix(p), uri(u) {
128 }
970ed795 129
3abe9331 130 bool operator<(const NamespaceType & rhs) const {
131 return uri < rhs.uri;
132 }
133
134 bool operator==(const NamespaceType & rhs) const {
970ed795
EL
135 return (uri == rhs.uri) && (prefix == rhs.prefix);
136 }
137};
138
139class QualifiedName {
140public:
141 Mstring nsuri;
142 Mstring name;
3abe9331 143 Mstring orig_name;
144 bool dup;
970ed795
EL
145
146 QualifiedName()
3abe9331 147 : nsuri(), name(), orig_name(), dup(false) {
148 }
970ed795
EL
149
150 QualifiedName(const Mstring& ns, const Mstring nm)
3abe9331 151 : nsuri(ns), name(nm), dup(false) {
152 }
153
154 QualifiedName(const Mstring& ns, const Mstring nm, const Mstring orig)
155 : nsuri(ns), name(nm), orig_name(orig), dup(false) {
156 }
157
158 bool operator<(const QualifiedName& rhs) const {
159 return name < rhs.name;
160 }
970ed795 161
970ed795
EL
162 bool operator==(const QualifiedName& rhs) const {
163 return (nsuri == rhs.nsuri) && (name == rhs.name);
164 }
3abe9331 165
166 bool operator!=(const QualifiedName& rhs) const {
167 return (nsuri != rhs.nsuri) || (name != rhs.name);
168 }
970ed795
EL
169};
170
3abe9331 171enum wanted {
172 want_CT, want_ST, want_BOTH
173};
970ed795
EL
174
175#endif /*GENERAL_TYPES_H_*/
This page took 0.032747 seconds and 5 git commands to generate.