00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(XERCESC_INCLUDE_GUARD_XSCOMPLEXTYPEDEFINITION_HPP)
00023 #define XERCESC_INCLUDE_GUARD_XSCOMPLEXTYPEDEFINITION_HPP
00024
00025 #include <xercesc/framework/psvi/XSTypeDefinition.hpp>
00026
00027 XERCES_CPP_NAMESPACE_BEGIN
00028
00037
00038 class XSAnnotation;
00039 class XSAttributeUse;
00040 class XSSimpleTypeDefinition;
00041 class XSParticle;
00042 class XSWildcard;
00043 class ComplexTypeInfo;
00044
00045 class XMLPARSER_EXPORT XSComplexTypeDefinition : public XSTypeDefinition
00046 {
00047 public:
00048
00049
00050 enum CONTENT_TYPE {
00056 CONTENTTYPE_EMPTY = 0,
00061 CONTENTTYPE_SIMPLE = 1,
00067 CONTENTTYPE_ELEMENT = 2,
00071 CONTENTTYPE_MIXED = 3
00072 };
00073
00074
00075
00078
00092 XSComplexTypeDefinition
00093 (
00094 ComplexTypeInfo* const complexTypeInfo
00095 , XSWildcard* const xsWildcard
00096 , XSSimpleTypeDefinition* const xsSimpleType
00097 , XSAttributeUseList* const xsAttList
00098 , XSTypeDefinition* const xsBaseType
00099 , XSParticle* const xsParticle
00100 , XSAnnotation* const headAnnot
00101 , XSModel* const xsModel
00102 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00103 );
00104
00106
00109 ~XSComplexTypeDefinition();
00111
00112
00116
00122 XSConstants::DERIVATION_TYPE getDerivationMethod() const;
00123
00129 bool getAbstract() const;
00130
00134 XSAttributeUseList *getAttributeUses();
00135
00139 XSWildcard *getAttributeWildcard() const;
00140
00147 CONTENT_TYPE getContentType() const;
00148
00153 XSSimpleTypeDefinition *getSimpleType() const;
00154
00159 XSParticle *getParticle() const;
00160
00168 bool isProhibitedSubstitution(XSConstants::DERIVATION_TYPE toTest);
00169
00175 short getProhibitedSubstitutions() const;
00176
00180 XSAnnotationList *getAnnotations();
00181
00186 const XMLCh* getName() const;
00187
00192 const XMLCh* getNamespace();
00193
00199 XSNamespaceItem *getNamespaceItem();
00200
00205 bool getAnonymous() const;
00206
00211 XSTypeDefinition *getBaseType();
00212
00220 bool derivedFromType(const XSTypeDefinition* const ancestorType);
00221
00223
00224
00228
00229
00231
00232 private:
00233
00237 void setBaseType(XSTypeDefinition* const xsBaseType);
00238 friend class XSObjectFactory;
00239
00240
00241
00242
00243 XSComplexTypeDefinition(const XSComplexTypeDefinition&);
00244 XSComplexTypeDefinition & operator=(const XSComplexTypeDefinition &);
00245
00246 protected:
00247
00248
00249
00250
00251 ComplexTypeInfo* fComplexTypeInfo;
00252 XSWildcard* fXSWildcard;
00253 XSAttributeUseList* fXSAttributeUseList;
00254 XSSimpleTypeDefinition* fXSSimpleTypeDefinition;
00255 XSAnnotationList* fXSAnnotationList;
00256 XSParticle* fParticle;
00257 short fProhibitedSubstitution;
00258 };
00259
00260
00261 inline XSAttributeUseList* XSComplexTypeDefinition::getAttributeUses()
00262 {
00263 return fXSAttributeUseList;
00264 }
00265
00266 inline XSWildcard* XSComplexTypeDefinition::getAttributeWildcard() const
00267 {
00268 return fXSWildcard;
00269 }
00270
00271 inline XSSimpleTypeDefinition* XSComplexTypeDefinition::getSimpleType() const
00272 {
00273 return fXSSimpleTypeDefinition;
00274 }
00275
00276 inline short XSComplexTypeDefinition::getProhibitedSubstitutions() const
00277 {
00278 return fProhibitedSubstitution;
00279 }
00280
00281 inline XSParticle *XSComplexTypeDefinition::getParticle() const
00282 {
00283 return fParticle;
00284 }
00285
00286 inline void
00287 XSComplexTypeDefinition::setBaseType(XSTypeDefinition* const xsBaseType)
00288 {
00289 fBaseType = xsBaseType;
00290 }
00291
00292 XERCES_CPP_NAMESPACE_END
00293
00294 #endif