Xerces-C++ 3.3.0
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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XMLCONTENTMODEL_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLCONTENTMODEL_HPP
24
27
29
30class ContentLeafNameTypeVector;
31class GrammarResolver;
32class XMLStringPool;
33class XMLValidator;
34class SchemaGrammar;
35class SubstitutionGroupComparator;
36
47{
48public:
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 // -----------------------------------------------------------------------
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
89 ) const = 0;
90
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
100 ) const =0;
101
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
126protected :
127 // -----------------------------------------------------------------------
128 // Hidden Constructors
129 // -----------------------------------------------------------------------
131 {
132 }
133
134
135private :
136 // -----------------------------------------------------------------------
137 // Unimplemented constructors and operators
138 // -----------------------------------------------------------------------
140 XMLContentModel& operator=(const XMLContentModel&);
141};
142
144
145#endif
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Configurable memory manager.
Definition MemoryManager.hpp:40
Definition QName.hpp:35
This class defines the abstract interface for all content models.
Definition XMLContentModel.hpp:47
virtual ~XMLContentModel()
Definition XMLContentModel.hpp:73
static const unsigned int gInvalidTrans
Definition XMLContentModel.hpp:64
XMLContentModel()
Definition XMLContentModel.hpp:130
static const unsigned int gEOCFakeId
Definition XMLContentModel.hpp:65
virtual void checkUniqueParticleAttribution(SchemaGrammar *const pGrammar, GrammarResolver *const pGrammarResolver, XMLStringPool *const pStringPool, XMLValidator *const pValidator, unsigned int *const pContentSpecOrgURI, const XMLCh *pComplexTypeName=0)=0
virtual bool handleRepetitions(const QName *const curElem, unsigned int curState, unsigned int currentLoop, unsigned int &nextState, unsigned int &nextLoop, XMLSize_t elementIndex, SubstitutionGroupComparator *comparator) const =0
virtual bool validateContentSpecial(QName **const children, XMLSize_t childCount, unsigned int emptyNamespaceId, GrammarResolver *const pGrammarResolver, XMLStringPool *const pStringPool, XMLSize_t *indexFailingChild, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) const =0
virtual ContentLeafNameTypeVector * getContentLeafNameTypeVector() const =0
static const unsigned int gEpsilonFakeId
Definition XMLContentModel.hpp:66
virtual bool validateContent(QName **const children, XMLSize_t childCount, unsigned int emptyNamespaceId, XMLSize_t *indexFailingChild, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) const =0
virtual unsigned int getNextState(unsigned int currentState, XMLSize_t elementIndex) const =0
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
This abstract class provides the interface for all validators.
Definition XMLValidator.hpp:53
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41