| API Docs for SAX and DOM |

- Main Page
- Classes
- Files
- Related Pages

# XSComplexTypeDefinition.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: XSComplexTypeDefinition.hpp 568078 2007-08-21 11:43:25Z amassari $
    00020  */
    00021
    00022 #if !defined(XSCOMPLEXTYPEDEFINITION_HPP)
    00023 #define XSCOMPLEXTYPEDEFINITION_HPP
    00024
    00025 #include <xercesc/framework/psvi/XSTypeDefinition.hpp>
    00026
    00027 XERCES_CPP_NAMESPACE_BEGIN
    00028
    00037 // forward declarations
    00038 class XSAnnotation;
    00039 class XSAttributeUse;
    00040 class XSSimpleTypeDefinition;
    00041 class XSParticle;
    00042 class XSWildcard;
    00043 class ComplexTypeInfo;
    00044
    00045 class  XSComplexTypeDefinition : public XSTypeDefinition
    00046 {
    00047 public:
    00048
    00049     // Content Model Types
    00050     enum CONTENT_TYPE {
    00056          CONTENTTYPE_EMPTY         = 0,
    00061          CONTENTTYPE_SIMPLE        = 1,
    00067          CONTENTTYPE_ELEMENT       = 2,
    00071          CONTENTTYPE_MIXED         = 3
    00072     };
    00073
    00074     //  Constructors and Destructor
    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();
    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     //  Unimplemented constructors and operators
    00242     // -----------------------------------------------------------------------
    00243     XSComplexTypeDefinition(const XSComplexTypeDefinition&);
    00244     XSComplexTypeDefinition & operator=(const XSComplexTypeDefinition &);
    00245
    00246 protected:
    00247
    00248     // -----------------------------------------------------------------------
    00249     //  data members
    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

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.