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
15 ******************************************************************************/
16 #ifndef GENERAL_TYPES_H_
17 #define GENERAL_TYPES_H_
36 enum NameConversionMode {
77 n_field, // Not supported by now
81 n_key, // Not supported by now
82 n_keyref, // Not supported by now
84 n_notation, // Not supported by now
88 n_selector, // Not supported by now
93 n_unique, // Not supported by now
95 // XSD Restrictions / Facets for Datatypes:
97 n_fractionDigits, // Not supported by now
109 // Others - non-standard, but used:
116 /** This type just stores the textual information about an XML namespace */
117 class NamespaceType {
126 NamespaceType(const Mstring& p, const Mstring& u)
127 : prefix(p), uri(u) {
130 bool operator<(const NamespaceType & rhs) const {
131 return uri < rhs.uri;
134 bool operator==(const NamespaceType & rhs) const {
135 return (uri == rhs.uri) && (prefix == rhs.prefix);
139 class QualifiedName {
147 : nsuri(), name(), orig_name(), dup(false) {
150 QualifiedName(const Mstring& ns, const Mstring nm)
151 : nsuri(ns), name(nm), dup(false) {
154 QualifiedName(const Mstring& ns, const Mstring nm, const Mstring orig)
155 : nsuri(ns), name(nm), orig_name(orig), dup(false) {
158 bool operator<(const QualifiedName& rhs) const {
159 return name < rhs.name;
162 bool operator==(const QualifiedName& rhs) const {
163 return (nsuri == rhs.nsuri) && (name == rhs.name);
166 bool operator!=(const QualifiedName& rhs) const {
167 return (nsuri != rhs.nsuri) || (name != rhs.name);
172 want_CT, want_ST, want_BOTH
175 #endif /*GENERAL_TYPES_H_*/