00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 #if !defined(XSCOMPLEXTYPEDEFINITION_HPP)
00052 #define XSCOMPLEXTYPEDEFINITION_HPP
00053
00054 #include <xercesc/framework/psvi/XSTypeDefinition.hpp>
00055
00056 XERCES_CPP_NAMESPACE_BEGIN
00057
00066
00067 class XSAnnotation;
00068 class XSAttributeUse;
00069 class XSSimpleTypeDefinition;
00070 class XSParticle;
00071 class XSWildcard;
00072 class ComplexTypeInfo;
00073
00074 class XSComplexTypeDefinition : public XSTypeDefinition
00075 {
00076 public:
00077
00078
00079 enum CONTENT_TYPE {
00085 CONTENTTYPE_EMPTY = 0,
00090 CONTENTTYPE_SIMPLE = 1,
00096 CONTENTTYPE_ELEMENT = 2,
00100 CONTENTTYPE_MIXED = 3
00101 };
00102
00103
00104
00107
00121 XSComplexTypeDefinition
00122 (
00123 ComplexTypeInfo* const complexTypeInfo
00124 , XSWildcard* const xsWildcard
00125 , XSSimpleTypeDefinition* const xsSimpleType
00126 , XSAttributeUseList* const xsAttList
00127 , XSTypeDefinition* const xsBaseType
00128 , XSParticle* const xsParticle
00129 , XSAnnotation* const headAnnot
00130 , XSModel* const xsModel
00131 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00132 );
00133
00135
00138 ~XSComplexTypeDefinition();
00140
00141
00145
00151 XSConstants::DERIVATION_TYPE getDerivationMethod() const;
00152
00158 bool getAbstract() const;
00159
00163 XSAttributeUseList *getAttributeUses();
00164
00168 XSWildcard *getAttributeWildcard() const;
00169
00176 CONTENT_TYPE getContentType() const;
00177
00182 XSSimpleTypeDefinition *getSimpleType() const;
00183
00188 XSParticle *getParticle() const;
00189
00197 bool isProhibitedSubstitution(XSConstants::DERIVATION_TYPE toTest);
00198
00204 short getProhibitedSubstitutions() const;
00205
00209 XSAnnotationList *getAnnotations();
00210
00215 const XMLCh* getName();
00216
00221 const XMLCh* getNamespace();
00222
00228 XSNamespaceItem *getNamespaceItem();
00229
00234 bool getAnonymous() const;
00235
00240 XSTypeDefinition *getBaseType();
00241
00249 bool derivedFromType(const XSTypeDefinition* const ancestorType);
00250
00252
00253
00257
00258
00260
00261 private:
00262
00266 void setBaseType(XSTypeDefinition* const xsBaseType);
00267 friend class XSObjectFactory;
00268
00269
00270
00271
00272 XSComplexTypeDefinition(const XSComplexTypeDefinition&);
00273 XSComplexTypeDefinition & operator=(const XSComplexTypeDefinition &);
00274
00275 protected:
00276
00277
00278
00279
00280 ComplexTypeInfo* fComplexTypeInfo;
00281 XSWildcard* fXSWildcard;
00282 XSAttributeUseList* fXSAttributeUseList;
00283 XSSimpleTypeDefinition* fXSSimpleTypeDefinition;
00284 XSAnnotationList* fXSAnnotationList;
00285 XSParticle* fParticle;
00286 short fProhibitedSubstitution;
00287 };
00288
00289
00290 inline XSAttributeUseList* XSComplexTypeDefinition::getAttributeUses()
00291 {
00292 return fXSAttributeUseList;
00293 }
00294
00295 inline XSWildcard* XSComplexTypeDefinition::getAttributeWildcard() const
00296 {
00297 return fXSWildcard;
00298 }
00299
00300 inline XSSimpleTypeDefinition* XSComplexTypeDefinition::getSimpleType() const
00301 {
00302 return fXSSimpleTypeDefinition;
00303 }
00304
00305 inline short XSComplexTypeDefinition::getProhibitedSubstitutions() const
00306 {
00307 return fProhibitedSubstitution;
00308 }
00309
00310 inline XSParticle *XSComplexTypeDefinition::getParticle() const
00311 {
00312 return fParticle;
00313 }
00314
00315 inline void
00316 XSComplexTypeDefinition::setBaseType(XSTypeDefinition* const xsBaseType)
00317 {
00318 fBaseType = xsBaseType;
00319 }
00320
00321 XERCES_CPP_NAMESPACE_END
00322
00323 #endif