File indexing completed on 2025-12-16 10:34:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #if !defined(XERCESC_INCLUDE_GUARD_ALLCONTENTMODEL_HPP)
0023 #define XERCESC_INCLUDE_GUARD_ALLCONTENTMODEL_HPP
0024
0025 #include <xercesc/framework/XMLContentModel.hpp>
0026 #include <xercesc/util/ValueVectorOf.hpp>
0027 #include <xercesc/validators/common/ContentLeafNameTypeVector.hpp>
0028
0029 XERCES_CPP_NAMESPACE_BEGIN
0030
0031 class ContentSpecNode;
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 class AllContentModel : public XMLContentModel
0043 {
0044 public :
0045
0046
0047
0048 AllContentModel
0049 (
0050 ContentSpecNode* const parentContentSpec
0051 , const bool isMixed
0052 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0053 );
0054
0055 ~AllContentModel();
0056
0057
0058
0059
0060 virtual bool validateContent
0061 (
0062 QName** const children
0063 , XMLSize_t childCount
0064 , unsigned int emptyNamespaceId
0065 , XMLSize_t* indexFailingChild
0066 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0067 ) const;
0068
0069 virtual bool validateContentSpecial
0070 (
0071 QName** const children
0072 , XMLSize_t childCount
0073 , unsigned int emptyNamespaceId
0074 , GrammarResolver* const pGrammarResolver
0075 , XMLStringPool* const pStringPool
0076 , XMLSize_t* indexFailingChild
0077 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0078 ) const;
0079
0080 virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector() const ;
0081
0082 virtual unsigned int getNextState(unsigned int currentState,
0083 XMLSize_t elementIndex) const;
0084
0085 virtual bool handleRepetitions( const QName* const curElem,
0086 unsigned int curState,
0087 unsigned int currentLoop,
0088 unsigned int& nextState,
0089 unsigned int& nextLoop,
0090 XMLSize_t elementIndex,
0091 SubstitutionGroupComparator * comparator) const;
0092
0093 virtual void checkUniqueParticleAttribution
0094 (
0095 SchemaGrammar* const pGrammar
0096 , GrammarResolver* const pGrammarResolver
0097 , XMLStringPool* const pStringPool
0098 , XMLValidator* const pValidator
0099 , unsigned int* const pContentSpecOrgURI
0100 , const XMLCh* pComplexTypeName = 0
0101 ) ;
0102
0103 private :
0104
0105
0106
0107 void buildChildList
0108 (
0109 ContentSpecNode* const curNode
0110 , ValueVectorOf<QName*>& toFill
0111 , ValueVectorOf<bool>& toType
0112 );
0113
0114
0115
0116
0117 AllContentModel();
0118 AllContentModel(const AllContentModel&);
0119 AllContentModel& operator=(const AllContentModel&);
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142 MemoryManager* fMemoryManager;
0143 XMLSize_t fCount;
0144 QName** fChildren;
0145 bool* fChildOptional;
0146 unsigned int fNumRequired;
0147 bool fIsMixed;
0148 bool fHasOptionalContent;
0149 };
0150
0151 inline ContentLeafNameTypeVector* AllContentModel::getContentLeafNameTypeVector() const
0152 {
0153 return 0;
0154 }
0155
0156 inline unsigned int
0157 AllContentModel::getNextState(unsigned int,
0158 XMLSize_t) const {
0159
0160 return XMLContentModel::gInvalidTrans;
0161 }
0162
0163 inline bool
0164 AllContentModel::handleRepetitions( const QName* const ,
0165 unsigned int ,
0166 unsigned int ,
0167 unsigned int& ,
0168 unsigned int& ,
0169 XMLSize_t ,
0170 SubstitutionGroupComparator * ) const
0171 {
0172 return true;
0173 }
0174
0175 XERCES_CPP_NAMESPACE_END
0176
0177 #endif