te::xsd::Restriction4SimpleType Class Reference

The restriction element defines restrictions on a simpleType definition. More...

#include <Restriction4SimpleType.h>

Inheritance diagram for te::xsd::Restriction4SimpleType:
te::xsd::SimpleTypeConstructor te::xsd::Identifiable te::xsd::Annotated

Public Member Functions

void addFacet (FacetType fType, const std::string &value)
 Adds a new facet to this restriction. More...
 
void addFacet (Facet *f)
 Adds a new facet to this restriction. More...
 
SimpleTypeConstructorclone () const
 It creates a clone of the object. More...
 
AnnotationgetAnnotation () const
 It returns the associated annotation. More...
 
QNamegetBase () const
 It returns the name of the built-in data type simpleType element that will be restricted. More...
 
const boost::ptr_vector< Facet > & getFacets () const
 It returns the list of facets defined on this restriction. More...
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
Restriction4SimpleTypeoperator= (const Restriction4SimpleType &rhs)
 Assignment operator. More...
 
 Restriction4SimpleType (QName *base=0, Annotation *ann=0, std::string *id=0)
 Constructor. More...
 
 Restriction4SimpleType (const Restriction4SimpleType &rhs)
 Copy constructor. More...
 
void setAnnotation (Annotation *ann)
 It sets the associated annotation. More...
 
void setBase (QName *base)
 It sets the name of the built-in data type simpleType element that will be restricted. More...
 
void setId (std::string *id)
 it sets the id. More...
 
void setSimpleType (SimpleType *simpleType)
 It sets the simpleType element that will be restricted. More...
 
 ~Restriction4SimpleType ()
 Destructor. More...
 

Private Attributes

QNamem_base
 It specifies the name of the built-in data type simpleType element that will be restricted. (Required) More...
 
boost::ptr_vector< Facetm_facetVec
 The list of facets. (Optional) More...
 
SimpleTypem_simpleType
 Optional. More...
 

Detailed Description

The restriction element defines restrictions on a simpleType definition.

Note
Parent elements: simpleType.

Definition at line 52 of file Restriction4SimpleType.h.

Constructor & Destructor Documentation

te::xsd::Restriction4SimpleType::Restriction4SimpleType ( QName base = 0,
Annotation ann = 0,
std::string *  id = 0 
)

Constructor.

Parameters
baseThe name of a built-in data type simpleType element defined in a schema.
annAn annotation.
idIt specifies a unique ID for the element.
Note
The List object will take the ownership of the given pointers.
te::xsd::Restriction4SimpleType::Restriction4SimpleType ( const Restriction4SimpleType rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.
te::xsd::Restriction4SimpleType::~Restriction4SimpleType ( )

Destructor.

Member Function Documentation

void te::xsd::Restriction4SimpleType::addFacet ( FacetType  fType,
const std::string &  value 
)

Adds a new facet to this restriction.

Parameters
fTypeThe facet type.
valueThe facet associated value.
void te::xsd::Restriction4SimpleType::addFacet ( Facet f)

Adds a new facet to this restriction.

Parameters
fThe facet that will be added.
Note
The Restriction4SimpleType object will take the ownership of the given pointer.
SimpleTypeConstructor* te::xsd::Restriction4SimpleType::clone ( ) const
virtual

It creates a clone of the object.

Returns
A clone of the object. The caller will take the ownership of the returned pointer.

Implements te::xsd::SimpleTypeConstructor.

Annotation* te::xsd::Annotated::getAnnotation ( ) const
inherited

It returns the associated annotation.

Returns
The associated annotation.
QName* te::xsd::Restriction4SimpleType::getBase ( ) const

It returns the name of the built-in data type simpleType element that will be restricted.

Returns
The name of the built-in data type simpleType element that will be restricted.
const boost::ptr_vector<Facet>& te::xsd::Restriction4SimpleType::getFacets ( ) const

It returns the list of facets defined on this restriction.

Returns
The list of facets defined on this restriction.
std::string* te::xsd::Identifiable::getId ( ) const
inherited

It returns a pointer (may be NULL) to the object id.

Restriction4SimpleType& te::xsd::Restriction4SimpleType::operator= ( const Restriction4SimpleType rhs)

Assignment operator.

Parameters
rhsRight-hand-side object.
Returns
A reference to this object.
void te::xsd::Annotated::setAnnotation ( Annotation ann)
inherited

It sets the associated annotation.

Parameters
annThe annotation to be associated to the object. The annotated class will take the ownership of the given pointer.
void te::xsd::Restriction4SimpleType::setBase ( QName base)

It sets the name of the built-in data type simpleType element that will be restricted.

Parameters
baseThe name of the built-in data type simpleType element that will be restricted.
void te::xsd::Identifiable::setId ( std::string *  id)
inherited

it sets the id.

Parameters
idThe id to be associated to the object. It will take the ownership of the given string.
void te::xsd::Restriction4SimpleType::setSimpleType ( SimpleType simpleType)

It sets the simpleType element that will be restricted.

Parameters
baseThe name of the built-in data type simpleType element that will be restricted.

Member Data Documentation

QName* te::xsd::Restriction4SimpleType::m_base
private

It specifies the name of the built-in data type simpleType element that will be restricted. (Required)

Definition at line 139 of file Restriction4SimpleType.h.

boost::ptr_vector<Facet> te::xsd::Restriction4SimpleType::m_facetVec
private

The list of facets. (Optional)

Definition at line 141 of file Restriction4SimpleType.h.

SimpleType* te::xsd::Restriction4SimpleType::m_simpleType
private

Optional.

Definition at line 140 of file Restriction4SimpleType.h.


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