Xerces-C++ 3.1.2

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

XMLContentModel.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: XMLContentModel.hpp 677705 2008-07-17 20:15:32Z amassari $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_XMLCONTENTMODEL_HPP)
23 #define XERCESC_INCLUDE_GUARD_XMLCONTENTMODEL_HPP
24
25 #include <xercesc/util/XMemory.hpp>
26 #include <xercesc/util/QName.hpp>
27
28 XERCES_CPP_NAMESPACE_BEGIN
29
30 class ContentLeafNameTypeVector;
31 class GrammarResolver;
32 class XMLStringPool;
33 class XMLValidator;
34 class SchemaGrammar;
35 class SubstitutionGroupComparator;
36
46 class XMLPARSER_EXPORT XMLContentModel : public XMemory
47 {
48 public:
49 // ---------------------------------------------------------------------------
50 // Public static data
51 //
52 // gInvalidTrans
53 // This value represents an invalid transition in each line of the
54 // transition table.
55 //
56 // gEOCFakeId
57 // gEpsilonFakeId
58 // We have to put in a couple of special CMLeaf nodes to represent
59 // special values, using fake element ids that we know won't conflict
60 // with real element ids.
61 //
62 //
63 // ---------------------------------------------------------------------------
64 static const unsigned int gInvalidTrans;
65 static const unsigned int gEOCFakeId;
66 static const unsigned int gEpsilonFakeId;
67
68 // -----------------------------------------------------------------------
69 // Constructors are hidden, only the virtual Destructor is exposed
70 // -----------------------------------------------------------------------
73 virtual ~XMLContentModel()
74 {
75 }
77
78
79 // -----------------------------------------------------------------------
80 // The virtual content model interface provided by derived classes
81 // -----------------------------------------------------------------------
82 virtual bool validateContent
83 (
84 QName** const children
85 , XMLSize_t childCount
86 , unsigned int emptyNamespaceId
87 , XMLSize_t* indexFailingChild
88 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
89 ) const = 0;
90
91 virtual bool validateContentSpecial
92 (
93 QName** const children
94 , XMLSize_t childCount
95 , unsigned int emptyNamespaceId
96 , GrammarResolver* const pGrammarResolver
97 , XMLStringPool* const pStringPool
98 , XMLSize_t* indexFailingChild
99 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
100 ) const =0;
101
102 virtual void checkUniqueParticleAttribution
103 (
104 SchemaGrammar* const pGrammar
105 , GrammarResolver* const pGrammarResolver
106 , XMLStringPool* const pStringPool
107 , XMLValidator* const pValidator
108 , unsigned int* const pContentSpecOrgURI
109 , const XMLCh* pComplexTypeName = 0
110 ) =0;
111
112 virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector()
113 const = 0;
114
115 virtual unsigned int getNextState(unsigned int currentState,
116 XMLSize_t elementIndex) const = 0;
117
118 virtual bool handleRepetitions( const QName* const curElem,
119 unsigned int curState,
120 unsigned int currentLoop,
121 unsigned int& nextState,
122 unsigned int& nextLoop,
123 XMLSize_t elementIndex,
124 SubstitutionGroupComparator * comparator) const = 0;
125
126 protected :
127 // -----------------------------------------------------------------------
128 // Hidden Constructors
129 // -----------------------------------------------------------------------
130 XMLContentModel()
131 {
132 }
133
134
135 private :
136 // -----------------------------------------------------------------------
137 // Unimplemented constructors and operators
138 // -----------------------------------------------------------------------
139 XMLContentModel(const XMLContentModel&);
140 XMLContentModel& operator=(const XMLContentModel&);
141 };
142
143 XERCES_CPP_NAMESPACE_END
144
145 #endif
XMLContentModel::gEpsilonFakeId
static const unsigned int gEpsilonFakeId
Definition: XMLContentModel.hpp:66
XMLContentModel::~XMLContentModel
virtual ~XMLContentModel()
Definition: XMLContentModel.hpp:73
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
XMLContentModel::gInvalidTrans
static const unsigned int gInvalidTrans
Definition: XMLContentModel.hpp:64
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XMLContentModel
This class defines the abstract interface for all content models.
Definition: XMLContentModel.hpp:46
XMLContentModel::gEOCFakeId
static const unsigned int gEOCFakeId
Definition: XMLContentModel.hpp:65
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XMLContentModel::XMLContentModel
XMLContentModel()
Definition: XMLContentModel.hpp:130
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XMLSize_t
SIZE_T XMLSize_t
Definition: Xerces_autoconf_config.borland.hpp:86
QName
Definition: QName.hpp:34
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLCh
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
XMLValidator
This abstract class provides the interface for all validators.
Definition: XMLValidator.hpp:52
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
QName.hpp
XMemory.hpp