XSSimpleTypeDefinition Class Reference
Inheritance diagram for XSSimpleTypeDefinition:

## Public Types

enum | VARIETY { VARIETY_ABSENT = 0, VARIETY_ATOMIC = 1, VARIETY_LIST = 2, VARIETY_UNION = 3 }
enum | FACET { FACET_NONE = 0, FACET_LENGTH = 1, FACET_MINLENGTH = 2, FACET_MAXLENGTH = 4, FACET_PATTERN = 8, FACET_WHITESPACE = 16, FACET_MAXINCLUSIVE = 32, FACET_MAXEXCLUSIVE = 64, FACET_MINEXCLUSIVE = 128, FACET_MININCLUSIVE = 256, FACET_TOTALDIGITS = 512, FACET_FRACTIONDIGITS = 1024, FACET_ENUMERATION = 2048 }
enum | ORDERING { ORDERED_FALSE = 0, ORDERED_PARTIAL = 1, ORDERED_TOTAL = 2 }
Public Types inherited from XSTypeDefinition
enum | TYPE_CATEGORY { COMPLEX_TYPE = 15, SIMPLE_TYPE = 16 }

## Public Member Functions

Constructors
| XSSimpleTypeDefinition (DatatypeValidator *const datatypeValidator, VARIETY stVariety, XSTypeDefinition *const xsBaseType, XSSimpleTypeDefinition *const primitiveOrItemType, XSSimpleTypeDefinitionList *const memberTypes, XSAnnotation *headAnnot, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor. More...
Destructor
| ~XSSimpleTypeDefinition ()
XSSimpleTypeDefinition methods
VARIETY | getVariety () const
| [variety]: one of {atomic, list, union} or absent More...
XSSimpleTypeDefinition * | getPrimitiveType ()
| If variety is `atomic` the primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwise `null`. More...
XSSimpleTypeDefinition * | getItemType ()
| If variety is `list` the item type definition (an atomic or union simple type definition) is available, otherwise `null`. More...
XSSimpleTypeDefinitionList * | getMemberTypes () const
| If variety is `union` the list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise `null`. More...
int | getDefinedFacets () const
| [facets]: get all facets defined on this type. More...
bool | isDefinedFacet (FACET facetName)
| Convenience method. More...
int | getFixedFacets () const
| [facets]: get all facets defined and fixed on this type. More...
bool | isFixedFacet (FACET facetName)
| Convenience method. More...
const XMLCh * | getLexicalFacetValue (FACET facetName)
| Convenience method. More...
StringList * | getLexicalEnumeration ()
| Returns a list of enumeration values. More...
StringList * | getLexicalPattern ()
| Returns a list of pattern values. More...
ORDERING | getOrdered () const
| Fundamental Facet: ordered. More...
bool | getFinite () const
| Fundamental Facet: cardinality. More...
bool | getBounded () const
| Fundamental Facet: bounded. More...
bool | getNumeric () const
| Fundamental Facet: numeric. More...
XSAnnotationList * | getAnnotations ()
| Optional. More...
XSFacetList * | getFacets ()
XSMultiValueFacetList * | getMultiValueFacets ()
const XMLCh * | getName () const
| The name of type `NCName` of this declaration as defined in XML Namespaces. More...
const XMLCh * | getNamespace () const
| The [target namespace] of this object, or `null` if it is unspecified. More...
XSNamespaceItem * | getNamespaceItem ()
| A namespace schema information item corresponding to the target namespace of the component, if it's globally declared; or null otherwise. More...
bool | getAnonymous () const
| A boolean that specifies if the type definition is anonymous. More...
XSTypeDefinition * | getBaseType ()
| {base type definition}: either a simple type definition or a complex type definition. More...
bool | derivedFromType (const XSTypeDefinition *const ancestorType)
| Convenience method: check if this type is derived from the given `ancestorType`. More...
DatatypeValidator * | getDatatypeValidator () const
Public Member Functions inherited from XSTypeDefinition
| XSTypeDefinition (TYPE_CATEGORY typeCategory, XSTypeDefinition *const xsBaseType, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor. More...
virtual | ~XSTypeDefinition ()
TYPE_CATEGORY | getTypeCategory () const
| Return whether this type definition is a simple type or complex type. 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...
bool | derivedFrom (const XMLCh *typeNamespace, const XMLCh *name)
| Convenience method: check if this type is derived from the given ancestor type. More...
Public Member Functions inherited from XSObject
| XSObject (XSConstants::COMPONENT_TYPE compType, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
| The default constructor. More...
virtual | ~XSObject ()
XSConstants::COMPONENT_TYPE | getType () const
| The `type` of this object, i.e. More...
virtual XMLSize_t | getId () const
| Optional. More...
void | setId (XMLSize_t id)
| methods needed by implementation More...
Public Member Functions inherited from XMemory
void * | operator new (size_t size)
| This method overrides operator new. More...
void * | operator new (size_t size, MemoryManager *memMgr)
| This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
void * | operator new (size_t size, void *ptr)
| This method overrides placement operator new. More...
void | operator delete (void *p)
| This method overrides operator delete. More...
void | operator delete (void *p, MemoryManager *memMgr)
| This method provides a matching delete for the custom operator new. More...
void | operator delete (void *p, void *ptr)
| This method provides a matching delete for the placement new. More...

## Protected Attributes

int | fDefinedFacets
int | fFixedFacets
VARIETY | fVariety
DatatypeValidator * | fDatatypeValidator
XSFacetList * | fXSFacetList
XSMultiValueFacetList * | fXSMultiValueFacetList
StringList * | fPatternList
XSSimpleTypeDefinition * | fPrimitiveOrItemType
XSSimpleTypeDefinitionList * | fMemberTypes
XSAnnotationList * | fXSAnnotationList
Protected Attributes inherited from XSTypeDefinition
TYPE_CATEGORY | fTypeCategory
short | fFinal
XSTypeDefinition * | fBaseType
Protected Attributes inherited from XSObject
XSConstants::COMPONENT_TYPE | fComponentType
XSModel * | fXSModel
MemoryManager * | fMemoryManager
XMLSize_t | fId

## Friends

class | XSObjectFactory

## Additional Inherited Members

Protected Member Functions inherited from XMemory
| XMemory ()
| Protected default constructor. More...

## Member Enumeration Documentation

## FACET

enum XSSimpleTypeDefinition::FACET

Enumerator
FACET_NONE | No facets defined.
FACET_LENGTH | 4.3.1 Length
FACET_MINLENGTH | 4.3.2 minLength.
FACET_MAXLENGTH | 4.3.3 maxLength.
FACET_PATTERN | 4.3.4 pattern.
FACET_WHITESPACE | 4.3.5 whitespace.
FACET_MAXINCLUSIVE | 4.3.7 maxInclusive.
FACET_MAXEXCLUSIVE | 4.3.9 maxExclusive.
FACET_MINEXCLUSIVE | 4.3.9 minExclusive.
FACET_MININCLUSIVE | 4.3.10 minInclusive.
FACET_TOTALDIGITS | 4.3.11 totalDigits .
FACET_FRACTIONDIGITS | 4.3.12 fractionDigits.
FACET_ENUMERATION | 4.3.5 enumeration.

## ORDERING

enum XSSimpleTypeDefinition::ORDERING

Enumerator
ORDERED_FALSE | A constant defined for the 'ordered' fundamental facet: Not ordered.
ORDERED_PARTIAL | A constant defined for the 'ordered' fundamental facet: partially ordered.
ORDERED_TOTAL | A constant defined for the 'ordered' fundamental facet: total ordered.

## VARIETY

enum XSSimpleTypeDefinition::VARIETY

Enumerator
VARIETY_ABSENT | The variety is absent for the anySimpleType definition.
VARIETY_ATOMIC | `Atomic` type.
VARIETY_LIST | `List` type.
VARIETY_UNION | `Union` type.

## Constructor & Destructor Documentation

## XSSimpleTypeDefinition()

XSSimpleTypeDefinition::XSSimpleTypeDefinition | ( | DatatypeValidator *const | datatypeValidator,
|  | VARIETY | stVariety,
|  | XSTypeDefinition *const | xsBaseType,
|  | XSSimpleTypeDefinition *const | primitiveOrItemType,
|  | XSSimpleTypeDefinitionList *const | memberTypes,
|  | XSAnnotation * | headAnnot,
|  | XSModel *const | xsModel,
|  | MemoryManager *const | manager = `XMLPlatformUtils::fgMemoryManager`
| ) |  |

The default constructor.

Parameters

  datatypeValidator |
  stVariety |
  xsBaseType |
  primitiveOrItemType |
  memberTypes |
  headAnnot |
  xsModel |
  manager | The configurable memory manager

## ~XSSimpleTypeDefinition()

XSSimpleTypeDefinition::~XSSimpleTypeDefinition | ( |  | ) |

## Member Function Documentation

## derivedFromType()

bool XSSimpleTypeDefinition::derivedFromType | ( | const XSTypeDefinition *const | ancestorType | ) |

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`.

Implements XSTypeDefinition.

## getAnnotations()

XSAnnotationList * XSSimpleTypeDefinition::getAnnotations | ( |  | ) |

Optional.

A set of [annotation]s.

## getAnonymous()

bool XSSimpleTypeDefinition::getAnonymous | ( |  | ) | const

virtual

A boolean that specifies if the type definition is anonymous.

Convenience attribute.

Implements XSTypeDefinition.

## getBaseType()

XSTypeDefinition* XSSimpleTypeDefinition::getBaseType | ( |  | ) |

virtual

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

Implements XSTypeDefinition.

## getBounded()

bool XSSimpleTypeDefinition::getBounded | ( |  | ) | const

Fundamental Facet: bounded.

## getDatatypeValidator()

DatatypeValidator * XSSimpleTypeDefinition::getDatatypeValidator | ( |  | ) | const

References XERCES_CPP_NAMESPACE_END.

## getDefinedFacets()

int XSSimpleTypeDefinition::getDefinedFacets | ( |  | ) | const

[facets]: get all facets defined on this type.

The value is a bit combination of FACET_XXX constants of all defined facets.

## getFacets()

XSFacetList * XSSimpleTypeDefinition::getFacets | ( |  | ) |

Returns
  list of constraining facets. This method must not be used to retrieve values for `enumeration` and `pattern` facets.

## getFinite()

bool XSSimpleTypeDefinition::getFinite | ( |  | ) | const

Fundamental Facet: cardinality.

## getFixedFacets()

int XSSimpleTypeDefinition::getFixedFacets | ( |  | ) | const

[facets]: get all facets defined and fixed on this type.

## getItemType()

XSSimpleTypeDefinition * XSSimpleTypeDefinition::getItemType | ( |  | ) |

If variety is `list` the item type definition (an atomic or union simple type definition) is available, otherwise `null`.

## getLexicalEnumeration()

StringList* XSSimpleTypeDefinition::getLexicalEnumeration | ( |  | ) |

Returns a list of enumeration values.

## getLexicalFacetValue()

const XMLCh* XSSimpleTypeDefinition::getLexicalFacetValue | ( | FACET | facetName | ) |

Convenience method.

Returns a value of a single constraining facet for this simple type definition. This method must not be used to retrieve values for `enumeration` and `pattern` facets.

Parameters

  facetName | The name of the facet, i.e. `FACET_LENGTH, FACET_TOTALDIGITS` (see `XSConstants`).To retrieve value for pattern or enumeration, see `enumeration` and `pattern`.

Returns
  A value of the facet specified in `facetName` for this simple type definition or `null`.

## getLexicalPattern()

StringList * XSSimpleTypeDefinition::getLexicalPattern | ( |  | ) |

Returns a list of pattern values.

## getMemberTypes()

XSSimpleTypeDefinitionList * XSSimpleTypeDefinition::getMemberTypes | ( |  | ) | const

If variety is `union` the list of member type definitions (a non-empty sequence of simple type definitions) is available, otherwise `null`.

## getMultiValueFacets()

XSMultiValueFacetList * XSSimpleTypeDefinition::getMultiValueFacets | ( |  | ) |

Returns
  list of enumeration and pattern facets.

## getName()

const XMLCh* XSSimpleTypeDefinition::getName | ( |  | ) | const

virtual

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

Implements XSTypeDefinition.

## getNamespace()

const XMLCh* XSSimpleTypeDefinition::getNamespace | ( |  | ) | const

virtual

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

Implements XSTypeDefinition.

## getNamespaceItem()

XSNamespaceItem* XSSimpleTypeDefinition::getNamespaceItem | ( |  | ) |

virtual

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

Implements XSTypeDefinition.

## getNumeric()

bool XSSimpleTypeDefinition::getNumeric | ( |  | ) | const

Fundamental Facet: numeric.

## getOrdered()

ORDERING XSSimpleTypeDefinition::getOrdered | ( |  | ) | const

Fundamental Facet: ordered.

## getPrimitiveType()

XSSimpleTypeDefinition * XSSimpleTypeDefinition::getPrimitiveType | ( |  | ) |

If variety is `atomic` the primitive type definition (a built-in primitive datatype definition or the simple ur-type definition) is available, otherwise `null`.

## getVariety()

XSSimpleTypeDefinition::VARIETY XSSimpleTypeDefinition::getVariety | ( |  | ) | const

[variety]: one of {atomic, list, union} or absent

## isDefinedFacet()

bool XSSimpleTypeDefinition::isDefinedFacet | ( | FACET | facetName | ) |

Convenience method.

[Facets]: check whether a facet is defined on this type.

Parameters

  facetName | The name of the facet.

Returns
  True if the facet is defined, false otherwise.

## isFixedFacet()

bool XSSimpleTypeDefinition::isFixedFacet | ( | FACET | facetName | ) |

Convenience method.

[Facets]: check whether a facet is defined and fixed on this type.

Parameters

  facetName | The name of the facet.

Returns
  True if the facet is fixed, false otherwise.

## Friends And Related Function Documentation

## XSObjectFactory

friend class XSObjectFactory

friend

## Member Data Documentation

## fDatatypeValidator

DatatypeValidator* XSSimpleTypeDefinition::fDatatypeValidator

protected

## fDefinedFacets

int XSSimpleTypeDefinition::fDefinedFacets

protected

## fFixedFacets

int XSSimpleTypeDefinition::fFixedFacets

protected

## fMemberTypes

XSSimpleTypeDefinitionList* XSSimpleTypeDefinition::fMemberTypes

protected

## fPatternList

StringList* XSSimpleTypeDefinition::fPatternList

protected

## fPrimitiveOrItemType

XSSimpleTypeDefinition* XSSimpleTypeDefinition::fPrimitiveOrItemType

protected

## fVariety

VARIETY XSSimpleTypeDefinition::fVariety

protected

## fXSAnnotationList

XSAnnotationList* XSSimpleTypeDefinition::fXSAnnotationList

protected

## fXSFacetList

XSFacetList* XSSimpleTypeDefinition::fXSFacetList

protected

## fXSMultiValueFacetList

XSMultiValueFacetList* XSSimpleTypeDefinition::fXSMultiValueFacetList

protected

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

- XSSimpleTypeDefinition.hpp