Priority.cpp File Reference

Detailed Description

Implementation of Priority.

Author:
Sarah Keating
Include dependency graph for Priority.cpp:

Functions

Priority_t * Priority_clone (const Priority_t *p)
 Creates and returns a deep copy of the given Priority_t structure.
Priority_t * Priority_create (unsigned int level, unsigned int version)
 Creates a new Priority_t structure using the given SBML level and version values.
Priority_t * Priority_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new Priority_t structure using the given SBMLNamespaces_t structure.
void Priority_free (Priority_t *t)
 Frees the given Priority_t structure.
const ASTNode_t * Priority_getMath (const Priority_t *p)
 Get the mathematical formula for a Priority_t structure and return it as as an ASTNode structure.
const XMLNamespaces_t * Priority_getNamespaces (Priority_t *p)
 Returns a list of XMLNamespaces_t associated with this Priority_t structure.
int Priority_isSetMath (const Priority_t *p)
 Predicate to test whether the formula for the given Priority_t structure is set.
int Priority_setMath (Priority_t *p, const ASTNode_t *math)
 Sets the math expression of the given Priority_t instance to a copy of the given ASTNode_t structure.

Function Documentation

Priority_t* Priority_clone ( const Priority_t *  p)

Creates and returns a deep copy of the given Priority_t structure.

Parameters:
tthe Priority_t structure to copy.
Returns:
a (deep) copy of the given Priority_t structure t.
Priority_t* Priority_create ( unsigned int  level,
unsigned int  version 
)

Creates a new Priority_t structure using the given SBML level and version values.

Parameters:
levelan unsigned int, the SBML Level to assign to this Priority
versionan unsigned int, the SBML Version to assign to this Priority
Returns:
a pointer to the newly created Priority_t structure.
Note:
Once a Priority has been added to an SBMLDocument, the level and version for the document override those used to create the Priority. Despite this, the ability to supply the values at creation time is an important aid to creating valid SBML. Knowledge of the intended SBML 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 SBMLDocument.
Priority_t* Priority_createWithNS ( SBMLNamespaces_t *  sbmlns)

Creates a new Priority_t structure using the given SBMLNamespaces_t structure.

Parameters:
sbmlnsSBMLNamespaces, a pointer to an SBMLNamespaces structure to assign to this Priority
Returns:
a pointer to the newly created Priority_t structure.
Note:
Once a Priority has been added to an SBMLDocument, the sbmlns namespaces for the document override those used to create the Priority. Despite this, the ability to supply the values at creation time is an important aid to creating valid SBML. Knowledge of the intended SBML 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 SBMLDocument.
void Priority_free ( Priority_t *  t)

Frees the given Priority_t structure.

Parameters:
tthe Priority_t structure to free.
const ASTNode_t* Priority_getMath ( const Priority_t *  p)

Get the mathematical formula for a Priority_t structure and return it as as an ASTNode structure.

Parameters:
tthe Priority_t structure to query.
Returns:
an ASTNode_t structure representing the expression tree.
const XMLNamespaces_t* Priority_getNamespaces ( Priority_t *  p)

Returns a list of XMLNamespaces_t associated with this Priority_t structure.

Parameters:
dthe Priority_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
int Priority_isSetMath ( const Priority_t *  p)

Predicate to test whether the formula for the given Priority_t structure is set.

Parameters:
tthe Priority_t structure to query
Returns:
true if the formula (meaning the math subelement) of this Priority is set, false otherwise.
int Priority_setMath ( Priority_t *  p,
const ASTNode_t *  math 
)

Sets the math expression of the given Priority_t instance to a copy of the given ASTNode_t structure.

Parameters:
tthe Priority_t structure to set.
mathan ASTNode representing a formula tree.
Returns:
integer value indicating success/failure of the function. The value is drawn from the enumeration #OperationReturnValues_t.The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_OBJECT
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines