XSComplexTypeDefinition.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSCOMPLEXTYPEDEFINITION_HPP)
#define XERCESC_INCLUDE_GUARD_XSCOMPLEXTYPEDEFINITION_HPP
#include <xercesc/framework/psvi/XSTypeDefinition.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// forward declarations
class XSAnnotation;
class XSAttributeUse;
class XSSimpleTypeDefinition;
class XSParticle;
class XSWildcard;
class ComplexTypeInfo;
class XMLPARSER_EXPORT XSComplexTypeDefinition : public XSTypeDefinition
{
public:
// Content Model Types
enum CONTENT_TYPE {
CONTENTTYPE_EMPTY = 0,
CONTENTTYPE_SIMPLE = 1,
CONTENTTYPE_ELEMENT = 2,
CONTENTTYPE_MIXED = 3
};
// Constructors and Destructor
// -----------------------------------------------------------------------
XSComplexTypeDefinition
(
ComplexTypeInfo* const complexTypeInfo
, XSWildcard* const xsWildcard
, XSSimpleTypeDefinition* const xsSimpleType
, XSAttributeUseList* const xsAttList
, XSTypeDefinition* const xsBaseType
, XSParticle* const xsParticle
, XSAnnotation* const headAnnot
, XSModel* const xsModel
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
~XSComplexTypeDefinition();
//---------------------
XSConstants::DERIVATION_TYPE getDerivationMethod() const;
bool getAbstract() const;
XSAttributeUseList *getAttributeUses();
XSWildcard *getAttributeWildcard() const;
CONTENT_TYPE getContentType() const;
XSSimpleTypeDefinition *getSimpleType() const;
XSParticle *getParticle() const;
bool isProhibitedSubstitution(XSConstants::DERIVATION_TYPE toTest);
short getProhibitedSubstitutions() const;
XSAnnotationList *getAnnotations();
const XMLCh* getName() const;
const XMLCh* getNamespace() const;
XSNamespaceItem *getNamespaceItem();
bool getAnonymous() const;
XSTypeDefinition *getBaseType();
bool derivedFromType(const XSTypeDefinition* const ancestorType);
//----------------------------------
private:
void setBaseType(XSTypeDefinition* const xsBaseType);
friend class XSObjectFactory;
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSComplexTypeDefinition(const XSComplexTypeDefinition&);
XSComplexTypeDefinition & operator=(const XSComplexTypeDefinition &);
protected:
// -----------------------------------------------------------------------
// data members
// -----------------------------------------------------------------------
ComplexTypeInfo* fComplexTypeInfo;
XSWildcard* fXSWildcard;
XSAttributeUseList* fXSAttributeUseList;
XSSimpleTypeDefinition* fXSSimpleTypeDefinition;
XSAnnotationList* fXSAnnotationList;
XSParticle* fParticle;
short fProhibitedSubstitution;
};
inline XSAttributeUseList* XSComplexTypeDefinition::getAttributeUses()
{
return fXSAttributeUseList;
}
inline XSWildcard* XSComplexTypeDefinition::getAttributeWildcard() const
{
return fXSWildcard;
}
inline XSSimpleTypeDefinition* XSComplexTypeDefinition::getSimpleType() const
{
return fXSSimpleTypeDefinition;
}
inline short XSComplexTypeDefinition::getProhibitedSubstitutions() const
{
return fProhibitedSubstitution;
}
inline XSParticle *XSComplexTypeDefinition::getParticle() const
{
return fParticle;
}
inline void
XSComplexTypeDefinition::setBaseType(XSTypeDefinition* const xsBaseType)
{
fBaseType = xsBaseType;
}
XERCES_CPP_NAMESPACE_END
#endif
XSAnnotationList
RefVectorOf< XSAnnotation > XSAnnotationList
Definition: XSConstants.hpp:41
XSAttributeUseList
RefVectorOf< XSAttributeUse > XSAttributeUseList
Definition: XSConstants.hpp:48
XSTypeDefinition.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSAnnotation
Definition: XSAnnotation.hpp:42
XSAttributeUse
Definition: XSAttributeUse.hpp:40
XSComplexTypeDefinition
Definition: XSComplexTypeDefinition.hpp:46
XSComplexTypeDefinition::getAnnotations
XSAnnotationList * getAnnotations()
A set of [annotations].
XSComplexTypeDefinition::fXSSimpleTypeDefinition
XSSimpleTypeDefinition * fXSSimpleTypeDefinition
Definition: XSComplexTypeDefinition.hpp:254
XSComplexTypeDefinition::getDerivationMethod
XSConstants::DERIVATION_TYPE getDerivationMethod() const
[derivation method]: either DERIVATION_EXTENSION, DERIVATION_RESTRICTION, or DERIVATION_NONE (see XSO...
XSComplexTypeDefinition::XSComplexTypeDefinition
XSComplexTypeDefinition(ComplexTypeInfo *const complexTypeInfo, XSWildcard *const xsWildcard, XSSimpleTypeDefinition *const xsSimpleType, XSAttributeUseList *const xsAttList, XSTypeDefinition *const xsBaseType, XSParticle *const xsParticle, XSAnnotation *const headAnnot, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.
XSComplexTypeDefinition::derivedFromType
bool derivedFromType(const XSTypeDefinition *const ancestorType)
Convenience method: check if this type is derived from the given ancestorType.
XSComplexTypeDefinition::fXSWildcard
XSWildcard * fXSWildcard
Definition: XSComplexTypeDefinition.hpp:252
XSComplexTypeDefinition::fParticle
XSParticle * fParticle
Definition: XSComplexTypeDefinition.hpp:256
XSComplexTypeDefinition::getProhibitedSubstitutions
short getProhibitedSubstitutions() const
[prohibited substitutions]: A subset of {extension, restriction} or DERIVATION_NONE represented as a ...
Definition: XSComplexTypeDefinition.hpp:276
XSComplexTypeDefinition::getSimpleType
XSSimpleTypeDefinition * getSimpleType() const
A simple type definition corresponding to simple content model, otherwise null
Definition: XSComplexTypeDefinition.hpp:271
XSComplexTypeDefinition::CONTENT_TYPE
CONTENT_TYPE
Definition: XSComplexTypeDefinition.hpp:50
XSComplexTypeDefinition::getAttributeWildcard
XSWildcard * getAttributeWildcard() const
Optional.An attribute wildcard.
Definition: XSComplexTypeDefinition.hpp:266
XSComplexTypeDefinition::getNamespace
const XMLCh * getNamespace() const
The [target namespace] of this object, or null if it is unspecified.
XSComplexTypeDefinition::getContentType
CONTENT_TYPE getContentType() const
[content type]: one of empty (CONTENTTYPE_EMPTY), a simple type definition (CONTENTTYPE_SIMPLE),...
XSComplexTypeDefinition::getAbstract
bool getAbstract() const
[abstract]: a boolean.
XSComplexTypeDefinition::fComplexTypeInfo
ComplexTypeInfo * fComplexTypeInfo
Definition: XSComplexTypeDefinition.hpp:251
XSComplexTypeDefinition::getName
const XMLCh * getName() const
The name of type NCName of this declaration as defined in XML Namespaces.
XSComplexTypeDefinition::fProhibitedSubstitution
short fProhibitedSubstitution
Definition: XSComplexTypeDefinition.hpp:257
XSComplexTypeDefinition::isProhibitedSubstitution
bool isProhibitedSubstitution(XSConstants::DERIVATION_TYPE toTest)
[prohibited substitutions]: a subset of {extension, restriction}
XSComplexTypeDefinition::getAnonymous
bool getAnonymous() const
A boolean that specifies if the type definition is anonymous.
XSComplexTypeDefinition::getParticle
XSParticle * getParticle() const
A particle for mixed or element-only content model, otherwise null
Definition: XSComplexTypeDefinition.hpp:281
XSComplexTypeDefinition::getAttributeUses
XSAttributeUseList * getAttributeUses()
A set of attribute uses.
Definition: XSComplexTypeDefinition.hpp:261
XSComplexTypeDefinition::getNamespaceItem
XSNamespaceItem * getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component,...
XSComplexTypeDefinition::~XSComplexTypeDefinition
~XSComplexTypeDefinition()
XSComplexTypeDefinition::getBaseType
XSTypeDefinition * getBaseType()
{base type definition}: either a simple type definition or a complex type definition.
XSComplexTypeDefinition::fXSAnnotationList
XSAnnotationList * fXSAnnotationList
Definition: XSComplexTypeDefinition.hpp:255
XSComplexTypeDefinition::fXSAttributeUseList
XSAttributeUseList * fXSAttributeUseList
Definition: XSComplexTypeDefinition.hpp:253
XSConstants::DERIVATION_TYPE
DERIVATION_TYPE
Definition: XSConstants.hpp:122
XSModel
Definition: XSModel.hpp:60
XSNamespaceItem
Definition: XSNamespaceItem.hpp:54
XSParticle
Definition: XSParticle.hpp:42
XSSimpleTypeDefinition
Definition: XSSimpleTypeDefinition.hpp:44
XSTypeDefinition
This class represents a complexType or simpleType definition.
Definition: XSTypeDefinition.hpp:40
XSTypeDefinition::fBaseType
XSTypeDefinition * fBaseType
Definition: XSTypeDefinition.hpp:198
XSWildcard
Definition: XSWildcard.hpp:42