EventAssignment.h File Reference

Detailed Description

Definition of EventAssignment and ListOfEventAssignments.

Author:
Ben Bornstein
Include dependency graph for EventAssignment.h:
This graph shows which files directly or indirectly include this file:

Functions

EventAssignment_t * EventAssignment_clone (const EventAssignment_t *ea)
 Creates a (deep) copy of the given EventAssignment_t structure.
int EventAssignment_containsUndeclaredUnits (EventAssignment_t *ea)
 Predicate returning true or false depending on whether the math expression of this EventAssignment_t contains parameters/numbers with undeclared units.
EventAssignment_t * EventAssignment_create (unsigned int level, unsigned int version)
 Creates a new EventAssignment_t structure using the given SBML level and version values.
EventAssignment_t * EventAssignment_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new EventAssignment_t structure using the given SBMLNamespaces_t structure.
void EventAssignment_free (EventAssignment_t *ea)
 Frees the given EventAssignment_t structure.
UnitDefinition_t * EventAssignment_getDerivedUnitDefinition (EventAssignment_t *ea)
 Calculates and returns a UnitDefinition_t that expresses the units returned by the math expression of this EventAssignment_t.
const ASTNode_t * EventAssignment_getMath (const EventAssignment_t *ea)
 Gets the mathematical formula stored in the given EventAssignment_t structure.
const XMLNamespaces_t * EventAssignment_getNamespaces (EventAssignment_t *c)
 Returns a list of XMLNamespaces_t associated with this EventAssignment_t structure.
const char * EventAssignment_getVariable (const EventAssignment_t *ea)
 Gets the value of the "variable" attribute of this EventAssignment_t structure.
int EventAssignment_isSetMath (const EventAssignment_t *ea)
 Predicate for testing whether the attribute "variable" of the given EventAssignment_t structure is set.
int EventAssignment_isSetVariable (const EventAssignment_t *ea)
 Predicate for testing whether the attribute "variable" of the given EventAssignment_t structure is set.
int EventAssignment_setMath (EventAssignment_t *ea, const ASTNode_t *math)
 Sets the "math" subelement content of the given EventAssignment_t structure to the given ASTNode.
int EventAssignment_setVariable (EventAssignment_t *ea, const char *sid)
 Sets the attribute "variable" of the given EventAssignment_t structure to a copy of the given identifier string.
EventAssignment_t * ListOfEventAssignments_getById (ListOf_t *lo, const char *sid)
EventAssignment_t * ListOfEventAssignments_removeById (ListOf_t *lo, const char *sid)
 Removes item in this ListOf items with the given id or NULL if no such item exists.

Function Documentation

EventAssignment_t* EventAssignment_clone ( const EventAssignment_t *  ea)

Creates a (deep) copy of the given EventAssignment_t structure.

Parameters:
eathe EventAssignment_t to be copied
Returns:
a (deep) copy of ea.
int EventAssignment_containsUndeclaredUnits ( EventAssignment_t *  ea)

Predicate returning true or false depending on whether the math expression of this EventAssignment_t contains parameters/numbers with undeclared units.

Returns:
true if the math expression of this EventAssignment_t includes parameters/numbers with undeclared units, false otherwise.
Note:
a return value of true indicates that the UnitDefinition_t returned by the getDerivedUnitDefinition function may not accurately represent the units of the expression.
See also:
EventAssignment_getDerivedUnitDefinition()
EventAssignment_t* EventAssignment_create ( unsigned int  level,
unsigned int  version 
)

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

Parameters:
levelan unsigned int, the SBML Level to assign to this EventAssignment
versionan unsigned int, the SBML Version to assign to this EventAssignment
Returns:
a pointer to the newly created EventAssignment_t structure.
Note:
Once a EventAssignment has been added to an SBMLDocument, the level and version for the document override those used to create the EventAssignment. 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.
EventAssignment_t* EventAssignment_createWithNS ( SBMLNamespaces_t *  sbmlns)

Creates a new EventAssignment_t structure using the given SBMLNamespaces_t structure.

Parameters:
sbmlnsSBMLNamespaces, a pointer to an SBMLNamespaces structure to assign to this EventAssignment
Returns:
a pointer to the newly created EventAssignment_t structure.
Note:
Once a EventAssignment has been added to an SBMLDocument, the sbmlns namespaces for the document override those used to create the EventAssignment. 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 EventAssignment_free ( EventAssignment_t *  ea)

Frees the given EventAssignment_t structure.

Parameters:
eathe EventAssignment_t to be freed.
UnitDefinition_t* EventAssignment_getDerivedUnitDefinition ( EventAssignment_t *  ea)

Calculates and returns a UnitDefinition_t that expresses the units returned by the math expression of this EventAssignment_t.

Returns:
a UnitDefinition_t that expresses the units of the math expression of this EventAssignment_t.

Note that the functionality that facilitates unit analysis depends on the model as a whole. Thus, in cases where the object has not been added to a model or the model itself is incomplete, unit analysis is not possible and this method will return NULL.

Note:
The units are calculated by applying the mathematics from the expression to the units of the <ci> elements used within the expression. Where there are parameters/numbers with undeclared units the UnitDefinition_t returned by this function may not accurately represent the units of the expression.
See also:
EventAssignment_containsUndeclaredUnits()
const ASTNode_t* EventAssignment_getMath ( const EventAssignment_t *  ea)

Gets the mathematical formula stored in the given EventAssignment_t structure.

Parameters:
eathe EventAssignment_t structure to query.
Returns:
the ASTNode tree stored in ea.
const XMLNamespaces_t* EventAssignment_getNamespaces ( EventAssignment_t *  ea)

Returns a list of XMLNamespaces_t associated with this EventAssignment_t structure.

Parameters:
eathe EventAssignment_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
const char* EventAssignment_getVariable ( const EventAssignment_t *  ea)

Gets the value of the "variable" attribute of this EventAssignment_t structure.

Parameters:
eathe EventAssignment_t structure to query.
Returns:
the identifier stored in the "variable" attribute of ea.
int EventAssignment_isSetMath ( const EventAssignment_t *  ea)

Predicate for testing whether the attribute "variable" of the given EventAssignment_t structure is set.

Parameters:
eathe EventAssignment_t structure to query.
Returns:
nonzero (for true) if the "variable" attribute of ea is set, zero (0) otherwise.
int EventAssignment_isSetVariable ( const EventAssignment_t *  ea)

Predicate for testing whether the attribute "variable" of the given EventAssignment_t structure is set.

Parameters:
eathe EventAssignment_t structure to query.
Returns:
nonzero (for true) if the "variable" attribute of ea is set, zero (0) otherwise.
int EventAssignment_setMath ( EventAssignment_t *  ea,
const ASTNode_t *  math 
)

Sets the "math" subelement content of the given EventAssignment_t structure to the given ASTNode.

The given math ASTNode is copied.

Parameters:
eathe EventAssignment_t to set.
maththe ASTNode to copy into ea
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
int EventAssignment_setVariable ( EventAssignment_t *  ea,
const char *  sid 
)

Sets the attribute "variable" of the given EventAssignment_t structure to a copy of the given identifier string.

Parameters:
eathe EventAssignment_t to set.
sidthe identifier of a Compartment, Species or (global) Parameter defined in this model.
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_ATTRIBUTE_VALUE
Note:
Using this function with an id of NULL is equivalent to unsetting the "variable" attribute.
EventAssignment_t* ListOfEventAssignments_getById ( ListOf_t *  lo,
const char *  sid 
)
Returns:
item in this ListOfEventAssignment with the given id or NULL if no such item exists.
EventAssignment_t* ListOfEventAssignments_removeById ( ListOf_t *  lo,
const char *  sid 
)

Removes item in this ListOf items with the given id or NULL if no such item exists.

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

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines