File indexing completed on 2025-01-18 10:14:52
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_XSELEMENTDECLARATION_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XSELEMENTDECLARATION_HPP
0024
0025 #include <xercesc/framework/psvi/XSObject.hpp>
0026 #include <xercesc/framework/psvi/XSNamedMap.hpp>
0027
0028 XERCES_CPP_NAMESPACE_BEGIN
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038 class XSAnnotation;
0039 class XSComplexTypeDefinition;
0040 class XSIDCDefinition;
0041 class XSTypeDefinition;
0042 class SchemaElementDecl;
0043
0044 class XMLPARSER_EXPORT XSElementDeclaration : public XSObject
0045 {
0046 public:
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066 XSElementDeclaration
0067 (
0068 SchemaElementDecl* const schemaElementDecl
0069 , XSTypeDefinition* const typeDefinition
0070 , XSElementDeclaration* const substitutionGroupAffiliation
0071 , XSAnnotation* const annot
0072 , XSNamedMap<XSIDCDefinition>* const identityConstraints
0073 , XSModel* const xsModel
0074 , XSConstants::SCOPE elemScope = XSConstants::SCOPE_ABSENT
0075 , XSComplexTypeDefinition* const enclosingTypeDefinition = 0
0076 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
0077 );
0078
0079
0080
0081
0082
0083 ~XSElementDeclaration();
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095 const XMLCh* getName() const;
0096
0097
0098
0099
0100
0101 const XMLCh* getNamespace() const;
0102
0103
0104
0105
0106
0107
0108 XSNamespaceItem *getNamespaceItem();
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121 XSTypeDefinition *getTypeDefinition() const;
0122
0123
0124
0125
0126
0127
0128 XSConstants::SCOPE getScope() const;
0129
0130
0131
0132
0133
0134 XSComplexTypeDefinition *getEnclosingCTDefinition() const;
0135
0136
0137
0138
0139 XSConstants::VALUE_CONSTRAINT getConstraintType() const;
0140
0141
0142
0143
0144
0145 const XMLCh *getConstraintValue();
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155 bool getNillable() const;
0156
0157
0158
0159
0160 XSNamedMap <XSIDCDefinition> *getIdentityConstraints();
0161
0162
0163
0164
0165
0166 XSElementDeclaration *getSubstitutionGroupAffiliation() const;
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177 bool isSubstitutionGroupExclusion(XSConstants::DERIVATION_TYPE exclusion);
0178
0179
0180
0181
0182
0183
0184
0185 short getSubstitutionGroupExclusions() const;
0186
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197 bool isDisallowedSubstitution(XSConstants::DERIVATION_TYPE disallowed);
0198
0199
0200
0201
0202
0203
0204
0205
0206 short getDisallowedSubstitutions() const;
0207
0208
0209
0210
0211 bool getAbstract() const;
0212
0213
0214
0215
0216 XSAnnotation *getAnnotation() const;
0217
0218
0219
0220
0221
0222
0223
0224
0225 void setTypeDefinition(XSTypeDefinition* typeDefinition);
0226
0227
0228 private:
0229
0230 void setEnclosingCTDefinition(XSComplexTypeDefinition* const toSet);
0231 friend class XSObjectFactory;
0232
0233
0234
0235
0236 XSElementDeclaration(const XSElementDeclaration&);
0237 XSElementDeclaration & operator=(const XSElementDeclaration &);
0238
0239 protected:
0240
0241
0242
0243
0244 short fDisallowedSubstitutions;
0245 short fSubstitutionGroupExclusions;
0246 XSConstants::SCOPE fScope;
0247 SchemaElementDecl* fSchemaElementDecl;
0248 XSTypeDefinition* fTypeDefinition;
0249 XSComplexTypeDefinition* fEnclosingTypeDefinition;
0250 XSElementDeclaration* fSubstitutionGroupAffiliation;
0251 XSAnnotation* fAnnotation;
0252 XSNamedMap<XSIDCDefinition>* fIdentityConstraints;
0253 };
0254
0255 inline XSTypeDefinition* XSElementDeclaration::getTypeDefinition() const
0256 {
0257 return fTypeDefinition;
0258 }
0259
0260 inline XSNamedMap<XSIDCDefinition>* XSElementDeclaration::getIdentityConstraints()
0261 {
0262 return fIdentityConstraints;
0263 }
0264
0265 inline XSElementDeclaration* XSElementDeclaration::getSubstitutionGroupAffiliation() const
0266 {
0267 return fSubstitutionGroupAffiliation;
0268 }
0269
0270 inline short XSElementDeclaration::getSubstitutionGroupExclusions() const
0271 {
0272 return fSubstitutionGroupExclusions;
0273 }
0274
0275 inline short XSElementDeclaration::getDisallowedSubstitutions() const
0276 {
0277 return fDisallowedSubstitutions;
0278 }
0279
0280 inline XSAnnotation *XSElementDeclaration::getAnnotation() const
0281 {
0282 return fAnnotation;
0283 }
0284
0285 inline XSConstants::SCOPE XSElementDeclaration::getScope() const
0286 {
0287 return fScope;
0288 }
0289
0290 inline XSComplexTypeDefinition *XSElementDeclaration::getEnclosingCTDefinition() const
0291 {
0292 return fEnclosingTypeDefinition;
0293 }
0294
0295 inline void XSElementDeclaration::setTypeDefinition(XSTypeDefinition* typeDefinition)
0296 {
0297 fTypeDefinition = typeDefinition;
0298 }
0299
0300 inline void XSElementDeclaration::setEnclosingCTDefinition(XSComplexTypeDefinition* const toSet)
0301 {
0302 fEnclosingTypeDefinition = toSet;
0303 }
0304
0305 XERCES_CPP_NAMESPACE_END
0306
0307 #endif