http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XSTypeDefinition Class Reference

This class represents a complexType or simpleType definition. More...

Inheritance diagram for XSTypeDefinition:

Inheritance graph
[legend]
Collaboration diagram for XSTypeDefinition:

Collaboration graph
[legend]
List of all members.

Public Types

enum  TYPE_CATEGORY { COMPLEX_TYPE = 15, SIMPLE_TYPE = 16 }

Public Methods

Constructors
 XSTypeDefinition (TYPE_CATEGORY typeCategory, XSTypeDefinition *const xsBaseType, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
 The default constructor. More...

Destructor
virtual ~XSTypeDefinition ()
overloaded XSObject methods
virtual const XMLCh * getName ()=0
 The name of type NCName of this declaration as defined in XML Namespaces. More...

virtual const XMLCh * getNamespace ()=0
 The [target namespace] of this object, or null if it is unspecified. More...

virtual XSNamespaceItemgetNamespaceItem ()=0
 A namespace schema information item corresponding to the target namespace of the component, if it's globally declared; or null otherwise. More...

XSTypeDefinition methods
TYPE_CATEGORY getTypeCategory () const
 Return whether this type definition is a simple type or complex type. More...

virtual XSTypeDefinition * getBaseType ()=0
 {base type definition}: either a simple type definition or a complex type definition. More...

bool isFinal (short toTest)
 {final}. More...

short getFinal () const
 For complex types the returned value is a bit combination of the subset of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to final set of this type or DERIVATION_NONE. More...

virtual bool getAnonymous () const=0
 A boolean that specifies if the type definition is anonymous. More...

virtual bool derivedFromType (const XSTypeDefinition *const ancestorType)=0
 Convenience method: check if this type is derived from the given ancestorType. More...

bool derivedFrom (const XMLCh *typeNamespace, const XMLCh *name)
 Convenience method: check if this type is derived from the given ancestor type. More...


Protected Attributes

TYPE_CATEGORY fTypeCategory
short fFinal
XSTypeDefinition * fBaseType

Detailed Description

This class represents a complexType or simpleType definition.

This is *always* owned by the validator /parser object from which it is obtained.


Member Enumeration Documentation

enum XSTypeDefinition::TYPE_CATEGORY
 

Enumeration values:
COMPLEX_TYPE  This constant value signifies a complex type.
SIMPLE_TYPE  This constant value signifies a simple type.


Constructor & Destructor Documentation

XSTypeDefinition::XSTypeDefinition TYPE_CATEGORY    typeCategory,
XSTypeDefinition *const    xsBaseType,
XSModel *const    xsModel,
MemoryManager *const    manager = XMLPlatformUtils::fgMemoryManager
 

The default constructor.

Parameters:
typeCategory 
xsBaseType 
xsModel 
manager  The configurable memory manager

virtual XSTypeDefinition::~XSTypeDefinition   [virtual]
 


Member Function Documentation

bool XSTypeDefinition::derivedFrom const XMLCh *    typeNamespace,
const XMLCh *    name
 

Convenience method: check if this type is derived from the given ancestor type.

Parameters:
typeNamespace  An ancestor type namespace.
name  An ancestor type name.
Returns:
Return true if this type is derived from the ancestor defined by typeNamespace and name.

virtual bool XSTypeDefinition::derivedFromType const XSTypeDefinition *const    ancestorType [pure virtual]
 

Convenience method: check if this type is derived from the given ancestorType.

Parameters:
ancestorType  An ancestor type definition.
Returns:
Return true if this type is derived from ancestorType.

Implemented in XSComplexTypeDefinition.

virtual bool XSTypeDefinition::getAnonymous   const [pure virtual]
 

A boolean that specifies if the type definition is anonymous.

Convenience attribute.

Implemented in XSComplexTypeDefinition.

virtual XSTypeDefinition* XSTypeDefinition::getBaseType   [pure virtual]
 

{base type definition}: either a simple type definition or a complex type definition.

Implemented in XSComplexTypeDefinition.

short XSTypeDefinition::getFinal   const
 

For complex types the returned value is a bit combination of the subset of {DERIVATION_EXTENSION, DERIVATION_RESTRICTION} corresponding to final set of this type or DERIVATION_NONE.

For simple types the returned value is a bit combination of the subset of { DERIVATION_RESTRICTION, DERIVATION_EXTENSION, DERIVATION_UNION, DERIVATION_LIST } corresponding to final set of this type or DERIVATION_NONE.

virtual const XMLCh* XSTypeDefinition::getName   [pure virtual]
 

The name of type NCName of this declaration as defined in XML Namespaces.

Reimplemented from XSObject.

Implemented in XSComplexTypeDefinition.

virtual const XMLCh* XSTypeDefinition::getNamespace   [pure virtual]
 

The [target namespace] of this object, or null if it is unspecified.

Reimplemented from XSObject.

Implemented in XSComplexTypeDefinition.

virtual XSNamespaceItem* XSTypeDefinition::getNamespaceItem   [pure virtual]
 

A namespace schema information item corresponding to the target namespace of the component, if it's globally declared; or null otherwise.

Reimplemented from XSObject.

Implemented in XSComplexTypeDefinition.

XSTypeDefinition::TYPE_CATEGORY XSTypeDefinition::getTypeCategory   const
 

Return whether this type definition is a simple type or complex type.

bool XSTypeDefinition::isFinal short    toTest
 

{final}.

For complex type definition it is a subset of {extension, restriction}. For simple type definition it is a subset of {extension, list, restriction, union}.

Parameters:
toTest  Extension, restriction, list, union constants (defined in XSObject).
Returns:
True if toTest is in the final set, otherwise false.


Member Data Documentation

XSTypeDefinition* XSTypeDefinition::fBaseType [protected]
 

short XSTypeDefinition::fFinal [protected]
 

TYPE_CATEGORY XSTypeDefinition::fTypeCategory [protected]
 


The documentation for this class was generated from the following file:


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