Titan Core Initial Contribution
[deliverable/titan.core.git] / xsdconvert / GeneralTypes.hh
CommitLineData
970ed795
EL
1///////////////////////////////////////////////////////////////////////////////
2// Copyright (c) 2000-2014 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#ifndef GENERAL_TYPES_H_
9#define GENERAL_TYPES_H_
10
11#include "Mstring.hh"
12
13enum ConstructType
14{
15 c_unknown,
16 c_schema,
17 c_simpleType,
18 c_complexType,
19 c_element,
20 c_attribute,
21 c_attributeGroup,
22 c_group,
23 c_annotation,
24 c_include,
25 c_import
26};
27
28enum NameConversionMode
29{
30 nameMode,
31 typeMode,
32 fieldMode
33};
34
35enum UseValue
36{
37 optional,
38 prohibited,
39 required
40};
41
42enum FormValue
43{
44 notset,
45 qualified,
46 unqualified
47};
48
49/** This type just stores the textual information about an XML namespace */
50class NamespaceType
51{
52public:
53 Mstring prefix;
54 Mstring uri;
55
56 NamespaceType()
57 : prefix(), uri()
58 {}
59
60 NamespaceType(const Mstring& p, const Mstring& u)
61 : prefix(p), uri(u)
62 {}
63
64 bool operator < (const NamespaceType & rhs) const { return uri < rhs.uri; }
65 bool operator== (const NamespaceType & rhs) const {
66 return (uri == rhs.uri) && (prefix == rhs.prefix);
67 }
68};
69
70class QualifiedName {
71public:
72 Mstring nsuri;
73 Mstring name;
74 bool dup;
75
76 QualifiedName()
77 : nsuri(), name(), dup(false)
78 {}
79
80 QualifiedName(const Mstring& ns, const Mstring nm)
81 : nsuri(ns), name(nm), dup(false)
82 {}
83
84 bool operator <(const QualifiedName& rhs) const { return name < rhs.name; }
85 bool operator==(const QualifiedName& rhs) const {
86 return (nsuri == rhs.nsuri) && (name == rhs.name);
87 }
88};
89
90enum wanted { want_CT, want_ST };
91
92#endif /*GENERAL_TYPES_H_*/
This page took 0.026428 seconds and 5 git commands to generate.