All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Definition at line 29 of file Restriction4SimpleType.cpp.

te::xsd::Restriction4SimpleType::Restriction4SimpleType ( const Restriction4SimpleType rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.

Definition at line 35 of file Restriction4SimpleType.cpp.

References m_base.

te::xsd::Restriction4SimpleType::~Restriction4SimpleType ( )

Destructor.

Definition at line 43 of file Restriction4SimpleType.cpp.

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.

Definition at line 86 of file Restriction4SimpleType.cpp.

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.

Definition at line 92 of file Restriction4SimpleType.cpp.

te::xsd::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.

Definition at line 97 of file Restriction4SimpleType.cpp.

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

It returns the associated annotation.

Returns
The associated annotation.

Definition at line 30 of file Annotated.cpp.

References te::xsd::Annotated::m_annotation.

te::xsd::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.

Definition at line 64 of file Restriction4SimpleType.cpp.

const boost::ptr_vector< te::xsd::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.

Definition at line 69 of file Restriction4SimpleType.cpp.

std::string * te::xsd::Identifiable::getId ( ) const
inherited

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

Definition at line 35 of file Identifiable.cpp.

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

Assignment operator.

Parameters
rhsRight-hand-side object.
Returns
A reference to this object.

Definition at line 48 of file Restriction4SimpleType.cpp.

References m_base, and te::xsd::SimpleTypeConstructor::operator=().

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.

Definition at line 35 of file Annotated.cpp.

Referenced by te::xsd::serialize::ReadAnnotated().

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.

Definition at line 74 of file Restriction4SimpleType.cpp.

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.

Definition at line 29 of file Identifiable.cpp.

References te::xsd::Identifiable::m_id.

Referenced by te::xsd::serialize::ReadIdentifiable().

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.

Definition at line 80 of file Restriction4SimpleType.cpp.

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.

Referenced by operator=(), and Restriction4SimpleType().

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 files: