te::xsd::Annotation Class Reference

A class that models a XSD annotation element. More...

#include <Annotation.h>

Inheritance diagram for te::xsd::Annotation:
te::xsd::Identifiable

Public Member Functions

void add (AnnotationItem *item)
 It inserts the documentation (for human or for machine) into the annotation. More...
 
 Annotation (std::string *id=0)
 Constructor. More...
 
 Annotation (const Annotation &rhs)
 Copy constructor. More...
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
const boost::ptr_vector< AnnotationItem > & getItems () const
 Add a property with non-schema namespace to the attribute. More...
 
Annotationoperator= (const Annotation &rhs)
 Assignment operator. More...
 
void setId (std::string *id)
 it sets the id. More...
 
 ~Annotation ()
 Destructor. More...
 

Private Attributes

boost::ptr_vector< AnnotationItemm_itemVec
 It returns a map with other properties of the attribute element. More...
 

Detailed Description

A class that models a XSD annotation element.

See also
AnnotationItem, AppInfo, Documentation, Identifiable, Annotated, Attribute
Note
Parent element: any element.

Definition at line 55 of file Annotation.h.

Constructor & Destructor Documentation

te::xsd::Annotation::Annotation ( std::string *  id = 0)

Constructor.

Parameters
idIt specifies a unique ID for the annotation.
Note
The annotation will take the ownership of the id.
te::xsd::Annotation::Annotation ( const Annotation rhs)

Copy constructor.

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

Destructor.

Member Function Documentation

void te::xsd::Annotation::add ( AnnotationItem item)

It inserts the documentation (for human or for machine) into the annotation.

Parameters
itemSome documentation.
Precondition
Don't inform a NULL pointer
Note
The annotation will take the ownership of the given item.
std::string* te::xsd::Identifiable::getId ( ) const
inherited

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

const boost::ptr_vector<AnnotationItem>& te::xsd::Annotation::getItems ( ) const

Add a property with non-schema namespace to the attribute.

Parameters
keyThe name of the property.
valueThe value of the property.

Returns a pointer to the vector of Annotation's items (AppInfos and/or Documentations)

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

Assignment operator.

Parameters
rhsRight-hand-side object.
Returns
A reference to this object.
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.

Member Data Documentation

boost::ptr_vector<AnnotationItem> te::xsd::Annotation::m_itemVec
private

It returns a map with other properties of the attribute element.

Returns
Other properties of the attribute element as a key-value map.The list of comments for humans or for machines. (Optional)

Definition at line 118 of file Annotation.h.


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