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

Definition at line 34 of file Annotation.cpp.

te::xsd::Annotation::Annotation ( const Annotation rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.

Definition at line 40 of file Annotation.cpp.

References m_itemVec.

te::xsd::Annotation::~Annotation ( )

Destructor.

Definition at line 47 of file Annotation.cpp.

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.

Definition at line 64 of file Annotation.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.

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

Definition at line 71 of file Annotation.cpp.

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

Assignment operator.

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

Definition at line 51 of file Annotation.cpp.

References m_itemVec, and te::xsd::Identifiable::operator=().

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().

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.

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


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