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: XSComplexTypeDefinition.hpp 932887 2010-04-11 13:04:59Z borisk $
*/
#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();
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
XSComplexTypeDefinition::CONTENT_TYPE
CONTENT_TYPE
Definition: XSComplexTypeDefinition.hpp:50
XSComplexTypeDefinition
Definition: XSComplexTypeDefinition.hpp:45
XSAttributeUse
Definition: XSAttributeUse.hpp:39
XSComplexTypeDefinition::getProhibitedSubstitutions
short getProhibitedSubstitutions() const
[prohibited substitutions]: A subset of {extension, restriction} or DERIVATION_NONE represented as a ...
Definition: XSComplexTypeDefinition.hpp:276
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSWildcard
Definition: XSWildcard.hpp:41
XSTypeDefinition::getNamespaceItem
virtual XSNamespaceItem * getNamespaceItem()=0
A namespace schema information item corresponding to the target namespace of the component, if it&#39;s globally declared; or null otherwise.
XSComplexTypeDefinition::fComplexTypeInfo
ComplexTypeInfo * fComplexTypeInfo
Definition: XSComplexTypeDefinition.hpp:251
XSConstants::DERIVATION_TYPE
DERIVATION_TYPE
Definition: XSConstants.hpp:122
XSTypeDefinition::derivedFromType
virtual bool derivedFromType(const XSTypeDefinition *const ancestorType)=0
Convenience method: check if this type is derived from the given ancestorType.
XSComplexTypeDefinition::getAttributeUses
XSAttributeUseList * getAttributeUses()
A set of attribute uses.
Definition: XSComplexTypeDefinition.hpp:261
XSNamespaceItem
Definition: XSNamespaceItem.hpp:53
XSComplexTypeDefinition::getAttributeWildcard
XSWildcard * getAttributeWildcard() const
Optional.An attribute wildcard.
Definition: XSComplexTypeDefinition.hpp:266
XSComplexTypeDefinition::fXSWildcard
XSWildcard * fXSWildcard
Definition: XSComplexTypeDefinition.hpp:252
XSTypeDefinition::getBaseType
virtual XSTypeDefinition * getBaseType()=0
{base type definition}: either a simple type definition or a complex type definition.
XSComplexTypeDefinition::fXSAttributeUseList
XSAttributeUseList * fXSAttributeUseList
Definition: XSComplexTypeDefinition.hpp:253
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSModel
Definition: XSModel.hpp:59
XSAttributeUseList
RefVectorOf< XSAttributeUse > XSAttributeUseList
Definition: XSConstants.hpp:48
XSAnnotation
Definition: XSAnnotation.hpp:41
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XSComplexTypeDefinition::getParticle
XSParticle * getParticle() const
A particle for mixed or element-only content model, otherwise null
Definition: XSComplexTypeDefinition.hpp:281
XSSimpleTypeDefinition
Definition: XSSimpleTypeDefinition.hpp:43
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSTypeDefinition::getName
virtual const XMLCh * getName() const =0
The name of type NCName of this declaration as defined in XML Namespaces.
XSComplexTypeDefinition::fXSAnnotationList
XSAnnotationList * fXSAnnotationList
Definition: XSComplexTypeDefinition.hpp:255
XMLCh
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSComplexTypeDefinition::fXSSimpleTypeDefinition
XSSimpleTypeDefinition * fXSSimpleTypeDefinition
Definition: XSComplexTypeDefinition.hpp:254
XSTypeDefinition.hpp
XSTypeDefinition::getNamespace
virtual const XMLCh * getNamespace()=0
The [target namespace] of this object, or null if it is unspecified.
XSTypeDefinition::getAnonymous
virtual bool getAnonymous() const =0
A boolean that specifies if the type definition is anonymous.
XSComplexTypeDefinition::fProhibitedSubstitution
short fProhibitedSubstitution
Definition: XSComplexTypeDefinition.hpp:257
XSAnnotationList
RefVectorOf< XSAnnotation > XSAnnotationList
Definition: XSConstants.hpp:41
XSComplexTypeDefinition::getSimpleType
XSSimpleTypeDefinition * getSimpleType() const
A simple type definition corresponding to simple content model, otherwise null
Definition: XSComplexTypeDefinition.hpp:271
XSParticle
Definition: XSParticle.hpp:41
XSTypeDefinition
This class represents a complexType or simpleType definition.
Definition: XSTypeDefinition.hpp:39
XSComplexTypeDefinition::fParticle
XSParticle * fParticle
Definition: XSComplexTypeDefinition.hpp:256