libNuML 1.1.1
Library for reading / writing NuML documents
CompositeDescription Class Reference

this class stores the component descriptions More...

#include <CompositeDescription.h>

Inheritance diagram for CompositeDescription:
DimensionDescription NUMLList NMBase

Public Member Functions

 CompositeDescription ()
 
 ~CompositeDescription ()
 
 CompositeDescription (unsigned int level, unsigned int version)
 Creates a new CompositeDescription using the given NUML level and version values. More...
 
 CompositeDescription (NUMLNamespaces *numlns)
 Creates a new CompositeDescription using the given NUMLNamespaces object numlns. More...
 
virtual CompositeDescriptionclone () const
 Creates and returns a deep copy of this CompositeDescription instance. More...
 
virtual bool accept (NUMLVisitor &v) const
 Accepts the given NUMLVisitor for this instance of Dimension. More...
 
virtual const std::string & getName () const
 Returns the value of the "name" attribute of this CompositeDescription. More...
 
virtual const std::string & getId () const
 
virtual int setId (const std::string &id)
 
const std::string & getIndexType () const
 Returns the value of the "indexType" attribute of this CompositeDescription. More...
 
bool isContentCompositeDescription () const
 Predicate returning true or false depending on whether this CompositeDescription object's content is another CompositeDescription object. More...
 
bool isContentTupleDescription () const
 Predicate returning true or false depending on whether this CompositeDescription object's content is TupleDescription object. More...
 
bool isContentAtomicDescription () const
 Predicate returning true or false depending on whether this CompositeDescription object's content is AtomicDescription object. More...
 
const std::string & getOntologyTerm () const
 Returns the value of the "ontologyTerm" attribute of this CompositeDescription. More...
 
virtual int setName (const std::string &name)
 Sets the value of the "name" attribute of this NUML object. More...
 
int setIndexType (const std::string &indexType)
 Sets the value of the "indexType" attribute of this NUML object. More...
 
int setOntologyTerm (const std::string &ontologyTerm)
 Sets the value of the "ontologyTerm" attribute of this NUML object. More...
 
virtual const std::string & getElementName () const
 Returns the XML element name of this object, which for CompositeDescription, is always "CompositeDescription". More...
 
virtual NUMLTypeCode_t getTypeCode () const
 Returns the libNUML type code for this NUML object. More...
 
virtual NUMLTypeCode_t getItemTypeCode () const
 Returns the libNUML type code for the objects contained in this NUMLList (i.e., CompositeDescription objects, if the list is non-empty). More...
 
CompositeDescriptiongetCompositeDescription (unsigned int n)
 Get a CompositeDescription from the CompositeDescription. More...
 
TupleDescriptiongetTupleDescription ()
 Get a TupleDescription from the CompositeDescription. More...
 
AtomicDescriptiongetAtomicDescription ()
 Get AtomicDescription from the CompositeDescription. More...
 
virtual CompositeDescriptionget (unsigned int n)
 Get a CompositeDescription from the CompositeDescription. More...
 
virtual const CompositeDescriptionget (unsigned int n) const
 Get a CompositeDescription from the CompositeDescription. More...
 
virtual CompositeDescriptionremove (unsigned int n)
 Removes the nth item from this CompositeDescription items and returns a pointer to it. More...
 
CompositeDescriptioncreateCompositeDescription ()
 Creates a new CompositeDescription object inside this CompositeDescription add to it's List and return it. More...
 
TupleDescriptioncreateTupleDescription ()
 Creates a new TupleDescription inside this CompositeDescription and return it. More...
 
AtomicDescriptioncreateAtomicDescription ()
 Creates a new AtomicDescription to this CompositeDescription and returns it. More...
 
- Public Member Functions inherited from DimensionDescription
 DimensionDescription ()
 
 DimensionDescription (unsigned int level, unsigned int version)
 Creates a new DimensionDescription using the given NUML level and version values. More...
 
 DimensionDescription (NUMLNamespaces *numlns)
 Creates a new DimensionDescription using the given NUMLNamespaces object numlns. More...
 
virtual bool accept (NUMLVisitor &v) const
 Accepts the given NUMLVisitor for this instance of NMBase. More...
 
virtual DimensionDescriptionclone () const
 Creates and returns a deep copy of this NMBase object. More...
 
CompositeDescriptioncreateCompositeDescription ()
 Returns a list of the XML Namespaces declared on this NUML document. More...
 
TupleDescriptioncreateTupleDescription ()
 creates a new tupledescription and adds it to the dimensiondescription More...
 
AtomicDescriptioncreateAtomicDescription ()
 creates a new atomic description and adds it to the dimensiondescription More...
 
virtual const std::string & getElementName () const
 Returns the XML element name of this object, which for DimensionDescription, is always "model". More...
 
virtual NUMLTypeCode_t getTypeCode () const
 Returns the libNUML type code for this NUML object. More...
 
virtual NUMLTypeCode_t getItemTypeCode () const
 Returns the libNUML type code for the objects contained in this NUMLList (i.e., CompositeDescription objects, if the list is non-empty). More...
 
virtual DimensionDescriptionget (unsigned int n)
 Returns the XML element name of this object. More...
 
virtual const DimensionDescriptionget (unsigned int n) const
 Get a CompositeDescription from the DimensionDescription. More...
 
virtual DimensionDescriptionget (const std::string &sid)
 Get a CompositeDescription from the DimensionDescription based on its identifier. More...
 
virtual const DimensionDescriptionget (const std::string &sid) const
 Get a CompositeDescription from the DimensionDescription based on its identifier. More...
 
virtual const std::string & getId () const
 
virtual int setId (const std::string &id)
 
virtual const std::string & getName () const
 
virtual int setName (const std::string &name)
 
virtual DimensionDescriptionremove (unsigned int n)
 Removes the nth item from this DimensionDescription items and returns a pointer to it. More...
 
virtual DimensionDescriptionremove (const std::string &sid)
 Removes item in this DimensionDescription items with the given identifier. More...
 
virtual int getElementPosition () const
 Get the ordinal position of this element in the containing object (which in this case is the Model object). More...
 
virtual ~DimensionDescription ()
 
- Public Member Functions inherited from NUMLList
 NUMLList (unsigned int level, unsigned int version)
 Creates a new NUMLList using the given NUML level and version values. More...
 
 NUMLList (NUMLNamespaces *numlns)
 Creates a new DimensionDescription using the given NUMLNamespaces object numlns. More...
 
 NUMLList ()
 
virtual ~NUMLList ()
 
 NUMLList (const NUMLList &orig)
 Copy constructor. More...
 
NUMLListoperator= (const NUMLList &rhs)
 Assignment operator for NUMLList. More...
 
virtual bool accept (NUMLVisitor &v) const
 Accepts the given NUMLVisitor. More...
 
virtual NMBaseclone () const
 Creates and returns a deep copy of this NUMLList. More...
 
void append (const NMBase *item)
 Adds item to the end of this NUMLList. More...
 
void appendAndOwn (NMBase *item)
 Adds item to the end of this NUMLList. More...
 
virtual const NMBaseget (unsigned int n) const
 Get an item from the list. More...
 
virtual NMBaseget (unsigned int n)
 Get an item from the list. More...
 
void clear (bool doDelete=true)
 Removes all items in this NUMLList object. More...
 
virtual NMBaseremove (unsigned int n)
 Removes the nth item from this NUMLList items and returns a pointer to it. More...
 
unsigned int size () const
 Get the size of this NUMLList. More...
 
virtual void setNUMLDocument (NUMLDocument *d)
 Sets the parent NUMLDocument of this NUML object. More...
 
virtual void setParentNUMLObject (NMBase *sb)
 Sets the parent NUML object of this NUML object. More...
 
virtual NUMLTypeCode_t getTypeCode () const
 Get the type code of the objects contained in this SedListOf. More...
 
virtual NUMLTypeCode_t getItemTypeCode () const
 Get the type code of the objects contained in this NUMLList. More...
 
virtual const std::string & getElementName () const
 Returns the XML element name of this object, which for NUMLList, is always "listOf". More...
 
virtual void writeElements (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write out their contained NUML objects as XML elements. More...
 
- Public Member Functions inherited from NMBase
virtual ~NMBase ()
 Destroy this object. More...
 
NMBaseoperator= (const NMBase &orig)
 Assignment operator for NMBase. More...
 
virtual bool accept (NUMLVisitor &v) const =0
 Accepts the given NUMLVisitor for this instance of NMBase. More...
 
virtual NMBaseclone () const =0
 Creates and returns a deep copy of this NMBase object. More...
 
const std::string & getMetaId () const
 Returns the value of the "metaid" attribute of this object. More...
 
std::string & getMetaId ()
 Returns the value of the "metaid" attribute of this object. More...
 
virtual const std::string & getId () const
 
virtual const std::string & getName () const
 
virtual LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * getNamespaces () const
 Returns the content of the "annotation" subelement of this object as a character string. More...
 
const NUMLDocumentgetNUMLDocument () const
 Returns the parent NUMLDocument object. More...
 
NUMLDocumentgetNUMLDocument ()
 Returns the parent NUMLDocument object. More...
 
NMBasegetParentNUMLObject ()
 Returns the parent NUML object. More...
 
NMBasegetAncestorOfType (NUMLTypeCode_t type)
 Returns the ancestor NUML object that corresponds to the given NUMLTypeCode_t. More...
 
unsigned int getLine () const
 Returns the line number on which this object first appears in the XML representation of the NUML document. More...
 
unsigned int getColumn () const
 Returns the column number on which this object first appears in the XML representation of the NUML document. More...
 
bool isSetMetaId () const
 Predicate returning true or false depending on whether this object's "metaid" attribute has been set. More...
 
bool isSetName () const
 
int setMetaId (const std::string &metaid)
 Sets the value of the "metaid" attribute of this object. More...
 
virtual int setId (const std::string &sid)
 
virtual void setNUMLDocument (NUMLDocument *d)
 Sets the parent NUMLDocument of this NUML object. More...
 
virtual void setParentNUMLObject (NMBase *sb)
 Sets the parent NUML object of this NUML object. More...
 
int setNamespaces (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces *xmlns)
 Sets the namespaces relevant of this NUML object. More...
 
int unsetMetaId ()
 Unsets the value of the "metaid" attribute of this NUML object. More...
 
unsigned int getLevel () const
 Returns the NUML Level of the overall NUML document. More...
 
unsigned int getVersion () const
 Returns the Version within the NUML Level of the overall NUML document. More...
 
virtual NUMLTypeCode_t getTypeCode () const
 Returns the libnuml type code for this object. More...
 
bool hasValidLevelVersionNamespaceCombination ()
 Predicate returning true or false depending on whether this object's level/version and namespace values correspond to a valid NUML specification. More...
 
virtual const std::string & getElementName () const =0
 Returns the XML element name of this object. More...
 
char * toNUML ()
 Returns a string that consists of the partial NUML describing this object. More...
 
void read (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
 Reads (initializes) this NUML object by reading from XMLInputStream. More...
 
void write (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Writes (serializes) this NUML object by writing it to XMLOutputStream. More...
 
virtual void writeElements (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write out their contained NUML objects as XML elements. More...
 
virtual bool hasRequiredAttributes () const
 
virtual bool hasRequiredElements () const
 
void setNUMLNamespaces (NUMLNamespaces *numlns)
 
NUMLNamespacesgetNUMLNamespaces () const
 
void syncAnnotation ()
 
bool isSetNotes () const
 
bool isSetAnnotation () const
 
virtual int setAnnotation (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation)
 
virtual int setAnnotation (const std::string &annotation)
 
virtual int appendAnnotation (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation)
 
virtual int appendAnnotation (const std::string &annotation)
 
int removeTopLevelAnnotationElement (const std::string elementName, const std::string elementURI="")
 
int replaceTopLevelAnnotationElement (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation)
 
int replaceTopLevelAnnotationElement (const std::string &annotation)
 
int setNotes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *notes)
 
int setNotes (const std::string &notes, bool addXHTMLMarkup=false)
 
int appendNotes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *notes)
 
int appendNotes (const std::string &notes)
 
int unsetNotes ()
 
int unsetAnnotation ()
 
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * getNotes () const
 
std::string getNotesString () const
 
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * getAnnotation () const
 
std::string getAnnotationString () const
 

Protected Member Functions

virtual NMBasecreateObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
 Subclasses should override this method to write out their contained NUML objects as XML elements. More...
 
virtual void readAttributes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes &attributes)
 Subclasses should override this method to read values from the given XMLAttributes set into their specific fields. More...
 
virtual void writeAttributes (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write their XML attributes to the XMLOutputStream. More...
 
- Protected Member Functions inherited from DimensionDescription
virtual NMBasecreateObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
 
virtual void writeXMLNS (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write their xmlns attriubutes (if any) to the XMLOutputStream. More...
 
virtual void readAttributes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes &attributes)
 Subclasses should override this method to read values from the given XMLAttributes set into their specific fields. More...
 
virtual void writeAttributes (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write their XML attributes to the XMLOutputStream. More...
 
- Protected Member Functions inherited from NMBase
virtual void writeXMLNS (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write their xmlns attriubutes (if any) to the XMLOutputStream. More...
 
 NMBase (const std::string &id="", const std::string &name="")
 Only subclasses may create NMBase objects. More...
 
 NMBase (unsigned int level, unsigned int version)
 Creates a new NMBase object with the given sboTerm. More...
 
 NMBase (NUMLNamespaces *numlns)
 Creates a new NMBase object with the given NUMLNamespaces. More...
 
 NMBase (const NMBase &orig)
 Copy constructor. More...
 
virtual NMBasecreateObject (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
 Subclasses should override this method to create, store, and then return an NUML object corresponding to the next XMLToken in the XMLInputStream. More...
 
virtual bool readOtherXML (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &stream)
 Subclasses should override this method to read (and store) XHTML, MathML, etc. More...
 
virtual int getElementPosition () const
 The NUML XML Schema is written such that the order of child elements is significant. More...
 
NUMLErrorLoggetErrorLog ()
 
void logError (unsigned int id, const unsigned int level=2, const unsigned int version=3, const std::string &details="")
 Convenience method for easily logging problems from within method implementations. More...
 
void logUnknownAttribute (std::string attribute, const unsigned int level, const unsigned int version, const std::string element)
 Helper to log a common type of error. More...
 
void logUnknownElement (const std::string element, const unsigned int level, const unsigned int version)
 Helper to log a common type of error. More...
 
void logEmptyString (std::string attribute, const unsigned int level, const unsigned int version, std::string element)
 Helper to log a common type of error. More...
 
virtual void readAttributes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes &attributes)
 Subclasses should override this method to read values from the given XMLAttributes set into their specific fields. More...
 
virtual void writeAttributes (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &stream) const
 Subclasses should override this method to write their XML attributes to the XMLOutputStream. More...
 
void checkOrderAndLogError (NMBase *object, int expected)
 Checks that NUML element has been read in the proper order. More...
 
void checkNUMLListPopulated (NMBase *object)
 Checks that an NUML NUMLList element has been populated. More...
 
void checkDefaultNamespace (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces *xmlns, const std::string &elementName)
 Checks that the given default namespace in the given element is valid. More...
 
void checkXHTML (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *)
 Checks that the XHTML is valid. More...
 
void checkAnnotation ()
 Checks the annotation does not declare an numl namespace. More...
 

Protected Attributes

std::string mId
 
std::string mName
 
std::string mOntologyTerm
 
std::string mIndexType
 
NUMLTypeCode_t mContentType
 
- Protected Attributes inherited from DimensionDescription
std::string mId
 
std::string mName
 
- Protected Attributes inherited from NUMLList
std::vector< NMBase * > mItems
 
- Protected Attributes inherited from NMBase
std::string mMetaId
 
std::string mId
 
std::string mName
 
NUMLDocumentmNUML
 
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * mNotes
 
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * mAnnotation
 
NUMLNamespacesmNUMLNamespaces
 
unsigned int mLine
 
unsigned int mColumn
 
int mDept
 
NMBasemParentNUMLObject
 
bool mHasBeenDeleted
 
std::string mEmptyString
 

Detailed Description

this class stores the component descriptions

Constructor & Destructor Documentation

◆ CompositeDescription() [1/3]

CompositeDescription::CompositeDescription ( )

◆ ~CompositeDescription()

CompositeDescription::~CompositeDescription ( )

◆ CompositeDescription() [2/3]

LIBNUML_CPP_NAMESPACE_BEGIN CompositeDescription::CompositeDescription ( unsigned int  level,
unsigned int  version 
)

Creates a new CompositeDescription using the given NUML level and version values.

Parameters
levelan unsigned int, the NUML Level to assign to this CompositeDescription
versionan unsigned int, the NUML Version to assign to this CompositeDescription
Note
Once a CompositeDescription has been added to an NUMLDocument, the level, version for the document override those used to create the CompositeDescription. Despite this, the ability to supply the values at creation time is an important aid to creating valid NUML. Knowledge of the intented NUML Level and Version determine whether it is valid to assign a particular value to an attribute, or whether it is valid to add an object to an existing NUMLDocument.

◆ CompositeDescription() [3/3]

CompositeDescription::CompositeDescription ( NUMLNamespaces numlns)

Creates a new CompositeDescription using the given NUMLNamespaces object numlns.

The NUMLNamespaces object encapsulates NUML Level/Version/namespaces information. It is used to communicate the NUML Level, Version, and (in Level 3) packages used in addition to NUML Level  Core. A common approach to using this class constructor is to create an NUMLNamespaces object somewhere in a program, once, then pass it to object constructors such as this one when needed.

Parameters
numlnsan NUMLNamespaces object.
Note
Once a CompositeDescription has been added to an NUMLDocument, the level, version and xmlns namespaces for the document override those used to create the CompositeDescription. Despite this, the ability to supply the values at creation time is an important aid to creating valid NUML. Knowledge of the intented NUML Level and Version determine whether it is valid to assign a particular value to an attribute, or whether it is valid to add an object to an existing NUMLDocument.

Member Function Documentation

◆ accept()

bool CompositeDescription::accept ( NUMLVisitor v) const
virtual

Accepts the given NUMLVisitor for this instance of Dimension.

Parameters
vthe NUMLVisitor instance to be used.
Returns
the result of calling v.visit().

Reimplemented from DimensionDescription.

◆ clone()

CompositeDescription * CompositeDescription::clone ( ) const
virtual

Creates and returns a deep copy of this CompositeDescription instance.

Returns
a (deep) copy of this CompositeDescription.

Reimplemented from DimensionDescription.

◆ createAtomicDescription()

AtomicDescription * CompositeDescription::createAtomicDescription ( )

Creates a new AtomicDescription to this CompositeDescription and returns it.

Returns
the AtomicDescription object created
See also
addAtomicDescription(const AtomicValue *aDescription)

◆ createCompositeDescription()

CompositeDescription * CompositeDescription::createCompositeDescription ( )

Creates a new CompositeDescription object inside this CompositeDescription add to it's List and return it.

Returns
the CompositeDescription object created
See also
addCompositeDescription(const CompositeDescription *compDescription)

◆ createObject()

NMBase * CompositeDescription::createObject ( LIBSBML_CPP_NAMESPACE_QUALIFIER XMLInputStream &  stream)
protectedvirtual

Subclasses should override this method to write out their contained NUML objects as XML elements.

Be sure to call your parents implementation of this method as well.

Returns
the NUML object corresponding to next XMLToken in the XMLInputStream or NULL if the token was not recognized.

Reimplemented from DimensionDescription.

◆ createTupleDescription()

TupleDescription * CompositeDescription::createTupleDescription ( )

Creates a new TupleDescription inside this CompositeDescription and return it.

Returns
the TupleDescription object created
See also
addTupleDescription(const TupleDescription *tDescription)

◆ get() [1/2]

CompositeDescription * CompositeDescription::get ( unsigned int  n)
virtual

Get a CompositeDescription from the CompositeDescription.

Parameters
nthe index number of the CompositeDescription to get.
Returns
the nth CompositeDescription in this CompositeDescription.
See also
size()

Reimplemented from DimensionDescription.

◆ get() [2/2]

const CompositeDescription * CompositeDescription::get ( unsigned int  n) const
virtual

Get a CompositeDescription from the CompositeDescription.

Parameters
nthe index number of the CompositeDescription to get.
Returns
the nth CompositeDescription in this CompositeDescription.
See also
size()

Reimplemented from DimensionDescription.

◆ getAtomicDescription()

AtomicDescription * CompositeDescription::getAtomicDescription ( )

Get AtomicDescription from the CompositeDescription.

Returns
the only (0th) AtomicDescription in this CompositeDescription.
See also
size()

◆ getCompositeDescription()

CompositeDescription * CompositeDescription::getCompositeDescription ( unsigned int  n)

Get a CompositeDescription from the CompositeDescription.

Parameters
nthe index number of the CompositeDescription to get.
Returns
the nth CompositeDescription in this CompositeDescription.
See also
size()

◆ getElementName()

const string & CompositeDescription::getElementName ( ) const
virtual

Returns the XML element name of this object, which for CompositeDescription, is always "CompositeDescription".

Returns
the name of this element, i.e., "compositeDescription".

Reimplemented from DimensionDescription.

◆ getId()

const std::string & CompositeDescription::getId ( ) const
virtual

Reimplemented from DimensionDescription.

◆ getIndexType()

const string & CompositeDescription::getIndexType ( ) const

Returns the value of the "indexType" attribute of this CompositeDescription.

Returns
the indexType of this CompositeDescription.

◆ getItemTypeCode()

NUMLTypeCode_t CompositeDescription::getItemTypeCode ( ) const
virtual

Returns the libNUML type code for the objects contained in this NUMLList (i.e., CompositeDescription objects, if the list is non-empty).

Returns
the NUML type code for the objects contained in this NUMLList instance, or NUML_UNKNOWN (default).
See also
getElementName()

Reimplemented from DimensionDescription.

◆ getName()

const string & CompositeDescription::getName ( ) const
virtual

Returns the value of the "name" attribute of this CompositeDescription.

Returns
the name of this CompositeDescription.

Reimplemented from DimensionDescription.

◆ getOntologyTerm()

const string & CompositeDescription::getOntologyTerm ( ) const

Returns the value of the "ontologyTerm" attribute of this CompositeDescription.

Returns
the ontologyTerm of this CompositeDescription.

◆ getTupleDescription()

TupleDescription * CompositeDescription::getTupleDescription ( )

Get a TupleDescription from the CompositeDescription.

Returns
the only 0th TupleDescription in this CompositeDescription.
See also
size()

◆ getTypeCode()

virtual NUMLTypeCode_t CompositeDescription::getTypeCode ( ) const
inlinevirtual

Returns the libNUML type code for this NUML object.

Returns
the NUML type code for this object, or NUML_UNKNOWN (default).
See also
getElementName()

Reimplemented from DimensionDescription.

◆ isContentAtomicDescription()

bool CompositeDescription::isContentAtomicDescription ( ) const

Predicate returning true or false depending on whether this CompositeDescription object's content is AtomicDescription object.

Returns
true if the content of this CompositeDescription object is AtomicDescription object, false otherwise.
See also
getAtomicDescription()

◆ isContentCompositeDescription()

bool CompositeDescription::isContentCompositeDescription ( ) const

Predicate returning true or false depending on whether this CompositeDescription object's content is another CompositeDescription object.

Returns
true if the content of this CompositeDescription object is another CompositeDescription object, false otherwise.
See also
getCompositeDescription(unsigned int n)

◆ isContentTupleDescription()

bool CompositeDescription::isContentTupleDescription ( ) const

Predicate returning true or false depending on whether this CompositeDescription object's content is TupleDescription object.

Returns
true if the content of this CompositeDescription object is TupleDescription object, false otherwise.
See also
getTupleDescription()

◆ readAttributes()

void CompositeDescription::readAttributes ( const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLAttributes &  attributes)
protectedvirtual

Subclasses should override this method to read values from the given XMLAttributes set into their specific fields.

Be sure to call your parents implementation of this method as well.

Reimplemented from NUMLList.

◆ remove()

CompositeDescription * CompositeDescription::remove ( unsigned int  n)
virtual

Removes the nth item from this CompositeDescription items and returns a pointer to it.

The caller owns the returned item and is responsible for deleting it.

Parameters
nthe index of the item to remove
See also
size()

Reimplemented from DimensionDescription.

◆ setId()

int CompositeDescription::setId ( const std::string &  id)
virtual

Reimplemented from DimensionDescription.

◆ setIndexType()

int CompositeDescription::setIndexType ( const std::string &  indexType)

Sets the value of the "indexType" attribute of this NUML object.

The string in indexType is copied.

Parameters
indexTypethe new indexType for the object
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBNUML_OPERATION_SUCCESS
  • LIBNUML_INVALID_ATTRIBUTE_VALUE

◆ setName()

int CompositeDescription::setName ( const std::string &  name)
virtual

Sets the value of the "name" attribute of this NUML object.

The string in name is copied.

Parameters
namethe new name for the object
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBNUML_OPERATION_SUCCESS
  • LIBNUML_INVALID_ATTRIBUTE_VALUE

Reimplemented from DimensionDescription.

◆ setOntologyTerm()

int CompositeDescription::setOntologyTerm ( const std::string &  ontologyTerm)

Sets the value of the "ontologyTerm" attribute of this NUML object.

The string in ontologyTerm is copied.

Parameters
ontologyTermthe new ontologyTerm for the object
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBNUML_OPERATION_SUCCESS
  • LIBNUML_INVALID_ATTRIBUTE_VALUE

◆ writeAttributes()

void CompositeDescription::writeAttributes ( LIBSBML_CPP_NAMESPACE_QUALIFIER XMLOutputStream &  stream) const
protectedvirtual

Subclasses should override this method to write their XML attributes to the XMLOutputStream.

Be sure to call your parents implementation of this method as well. For example:

NMBase::writeAttributes(stream); stream.writeAttribute( "id" , mId ); stream.writeAttribute( "name", mName ); ...

Reimplemented from NUMLList.

Member Data Documentation

◆ mContentType

NUMLTypeCode_t CompositeDescription::mContentType
protected

◆ mId

std::string CompositeDescription::mId
protected

◆ mIndexType

std::string CompositeDescription::mIndexType
protected

◆ mName

std::string CompositeDescription::mName
protected

◆ mOntologyTerm

std::string CompositeDescription::mOntologyTerm
protected

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