source: icXML/icXML-devel/src/xercesc/framework/psvi/XSConstants.hpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 5.6 KB
Line 
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: XSConstants.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XSCONSTANTS_HPP)
23#define XERCESC_INCLUDE_GUARD_XSCONSTANTS_HPP
24
25#include <xercesc/util/RefVectorOf.hpp>
26#include <xercesc/util/RefArrayVectorOf.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30/**
31 * This contains constants needed in the schema component model.
32 */
33
34// forward definitions for typedefs
35class XSAnnotation;
36class XSAttributeUse;
37class XSFacet;
38class XSMultiValueFacet;
39class XSNamespaceItem;
40class XSParticle;
41class XSSimpleTypeDefinition;
42
43// these typedefs are intended to help hide dependence on utility
44// classes, as well as to define more intuitive names for commonly
45// used concepts.
46
47typedef RefVectorOf <XSAnnotation> XSAnnotationList;
48typedef RefVectorOf <XSAttributeUse> XSAttributeUseList;
49typedef RefVectorOf <XSFacet> XSFacetList;
50typedef RefVectorOf <XSMultiValueFacet> XSMultiValueFacetList;
51typedef RefVectorOf <XSNamespaceItem> XSNamespaceItemList;
52typedef RefVectorOf <XSParticle> XSParticleList;
53typedef RefVectorOf <XSSimpleTypeDefinition> XSSimpleTypeDefinitionList;
54typedef RefArrayVectorOf <XMLCh> StringList;
55
56class XMLPARSER_EXPORT XSConstants
57{
58public:
59
60    // XML Schema Components
61    enum COMPONENT_TYPE {
62            /**
63             * The object describes an attribute declaration.
64             */
65              ATTRIBUTE_DECLARATION     = 1,
66            /**
67             * The object describes an element declaration.
68             */
69              ELEMENT_DECLARATION       = 2,
70            /**
71             * The object describes a complex type or simple type definition.
72             */
73              TYPE_DEFINITION           = 3,
74            /**
75             * The object describes an attribute use definition.
76             */
77              ATTRIBUTE_USE             = 4,
78            /**
79             * The object describes an attribute group definition.
80             */
81              ATTRIBUTE_GROUP_DEFINITION= 5,
82            /**
83             * The object describes a model group definition.
84             */
85              MODEL_GROUP_DEFINITION    = 6,
86            /**
87             * A model group.
88             */
89              MODEL_GROUP               = 7,
90            /**
91             * The object describes a particle.
92             */
93              PARTICLE                  = 8,
94            /**
95             * The object describes a wildcard.
96             */
97              WILDCARD                  = 9,
98            /**
99             * The object describes an identity constraint definition.
100             */
101              IDENTITY_CONSTRAINT       = 10,
102            /**
103             * The object describes a notation declaration.
104             */
105              NOTATION_DECLARATION      = 11,
106            /**
107             * The object describes an annotation.
108             */
109              ANNOTATION                = 12,
110            /**
111             * The object describes a constraining facet.
112             */
113              FACET                     = 13,
114           
115            /**
116             * The object describes enumeration/pattern facets.
117             */
118              MULTIVALUE_FACET           = 14
119    };
120
121    // Derivation constants
122    enum DERIVATION_TYPE {
123            /**
124             * No constraint is available.
125             */
126             DERIVATION_NONE     = 0,
127            /**
128             * <code>XSTypeDefinition</code> final set or
129             * <code>XSElementDeclaration</code> disallowed substitution group.
130             */
131             DERIVATION_EXTENSION      = 1,
132            /**
133             * <code>XSTypeDefinition</code> final set or
134             * <code>XSElementDeclaration</code> disallowed substitution group.
135             */
136             DERIVATION_RESTRICTION    = 2,
137            /**
138             * <code>XSTypeDefinition</code> final set.
139             */
140             DERIVATION_SUBSTITUTION   = 4,
141            /**
142             * <code>XSTypeDefinition</code> final set.
143             */
144             DERIVATION_UNION          = 8,
145            /**
146             * <code>XSTypeDefinition</code> final set.
147             */
148             DERIVATION_LIST           = 16
149    };
150
151    // Scope
152    enum SCOPE {
153            /**
154             * The scope of a declaration within named model groups or attribute
155             * groups is <code>absent</code>. The scope of such declaration is
156             * determined when it is used in the construction of complex type
157             * definitions.
158             */
159             SCOPE_ABSENT              = 0,
160            /**
161             * A scope of <code>global</code> identifies top-level declarations.
162             */
163             SCOPE_GLOBAL              = 1,
164            /**
165             * <code>Locally scoped</code> declarations are available for use only
166             * within the complex type.
167             */
168             SCOPE_LOCAL               = 2
169    };
170
171    // Value Constraint
172    enum VALUE_CONSTRAINT {
173            /**
174             * Indicates that the component does not have any value constraint.
175             */
176             VALUE_CONSTRAINT_NONE          = 0,
177            /**
178             * Indicates that there is a default value constraint.
179             */
180             VALUE_CONSTRAINT_DEFAULT       = 1,
181            /**
182             * Indicates that there is a fixed value constraint for this attribute.
183             */
184             VALUE_CONSTRAINT_FIXED         = 2
185    };
186
187private:
188    // -----------------------------------------------------------------------
189    //  Unimplemented constructors and operators
190    // -----------------------------------------------------------------------
191    XSConstants();
192};
193
194XERCES_CPP_NAMESPACE_END
195
196#endif
Note: See TracBrowser for help on using the repository browser.