Xerces-C++
3.1.3
Main Page
Related Pages
Classes
Files
File List
File Members
src
xercesc
framework
psvi
XSTypeDefinition.hpp
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
/*
19
* $Id: XSTypeDefinition.hpp 527149 2007-04-10 14:56:39Z amassari $
20
*/
21
22
#if !defined(XERCESC_INCLUDE_GUARD_XSTYPEDEFINITION_HPP)
23
#define XERCESC_INCLUDE_GUARD_XSTYPEDEFINITION_HPP
24
25
#include <
xercesc/framework/psvi/XSObject.hpp
>
26
27
XERCES_CPP_NAMESPACE_BEGIN
28
29
// forward declarations
30
class
XSNamespaceItem
;
31
39
class
XMLPARSER_EXPORT
XSTypeDefinition
:
public
XSObject
40
{
41
public
:
42
43
enum
TYPE_CATEGORY
{
47
COMPLEX_TYPE = 15,
51
SIMPLE_TYPE = 16
52
};
53
54
// Constructors and Destructor
55
// -----------------------------------------------------------------------
58
67
XSTypeDefinition
68
(
69
TYPE_CATEGORY typeCategory
70
,
XSTypeDefinition
*
const
xsBaseType
71
,
XSModel
*
const
xsModel
72
,
MemoryManager
*
const
manager =
XMLPlatformUtils::fgMemoryManager
73
);
74
76
79
virtual
~
XSTypeDefinition
();
81
82
//---------------------
85
90
virtual
const
XMLCh
*
getName
()
const
= 0;
91
96
virtual
const
XMLCh
*
getNamespace
() = 0;
97
103
virtual
XSNamespaceItem
*
getNamespaceItem
() = 0;
104
106
107
//---------------------
111
115
TYPE_CATEGORY getTypeCategory()
const
;
116
121
virtual
XSTypeDefinition
*getBaseType() = 0;
122
131
bool
isFinal(
short
toTest);
132
143
short
getFinal()
const
;
144
149
virtual
bool
getAnonymous()
const
= 0;
150
158
virtual
bool
derivedFromType(
const
XSTypeDefinition
*
const
ancestorType) = 0;
159
168
bool
derivedFrom(
const
XMLCh
* typeNamespace,
169
const
XMLCh
* name);
170
172
173
//----------------------------------
177
179
private
:
180
181
// -----------------------------------------------------------------------
182
// Unimplemented constructors and operators
183
// -----------------------------------------------------------------------
184
XSTypeDefinition
(
const
XSTypeDefinition
&);
185
XSTypeDefinition
& operator=(
const
XSTypeDefinition
&);
186
187
protected
:
188
189
// -----------------------------------------------------------------------
190
// data members
191
// -----------------------------------------------------------------------
192
// fTypeCategory
193
// whether this is a simpleType or complexType
194
// fFinal
195
// the final properties which is set by the derived class.
196
TYPE_CATEGORY
fTypeCategory
;
197
short
fFinal
;
198
XSTypeDefinition
*
fBaseType
;
// owned by XSModel
199
};
200
201
inline
XSTypeDefinition::TYPE_CATEGORY
XSTypeDefinition::getTypeCategory
()
const
202
{
203
return
fTypeCategory
;
204
}
205
206
inline
short
XSTypeDefinition::getFinal
()
const
207
{
208
return
fFinal
;
209
}
210
211
212
XERCES_CPP_NAMESPACE_END
213
214
#endif
Generated on Mon Feb 1 2016 13:04:19 for Xerces-C++ by
1.8.1.2