Implementation of SimpleSpeciesReference, SpeciesReference, ModifierSpeciesReference, and ListOfSpeciesReferences.

Functions | |
| SpeciesReference_t * | ListOfSpeciesReferences_getById (ListOf_t *lo, const char *sid) |
| SpeciesReference_t * | ListOfSpeciesReferences_removeById (ListOf_t *lo, const char *sid) |
Removes item in this ListOf items with the given id or NULL if no such item exists. | |
| SpeciesReference_t * | SpeciesReference_clone (const SpeciesReference_t *sr) |
| Creates and returns a deep copy of the given SpeciesReference_t structure. | |
| SpeciesReference_t * | SpeciesReference_create (unsigned int level, unsigned int version) |
Creates a new SpeciesReference_t structure using the given SBML level and version values. | |
| SpeciesReference_t * | SpeciesReference_createModifier (unsigned int level, unsigned int version) |
| Creates a new ModifierSpeciesReference (SpeciesReference_t) structure using the given SBMLNamespaces_t structure. | |
| SpeciesReference_t * | SpeciesReference_createModifierWithNS (SBMLNamespaces_t *sbmlns) |
| Creates a new ModifierSpeciesReference (SpeciesReference_t) structure using the given SBMLNamespaces_t structure. | |
| StoichiometryMath_t * | SpeciesReference_createStoichiometryMath (SpeciesReference_t *sr) |
| SpeciesReference_t * | SpeciesReference_createWithNS (SBMLNamespaces_t *sbmlns) |
| Creates a new SpeciesReference_t structure using the given SBMLNamespaces_t structure. | |
| void | SpeciesReference_free (SpeciesReference_t *sr) |
| Frees the given SpeciesReference_t structure. | |
| int | SpeciesReference_getConstant (const SpeciesReference_t *sr) |
| Get the value of the "constant" attribute. | |
| int | SpeciesReference_getDenominator (const SpeciesReference_t *sr) |
| Get the value of the "denominator" attribute, for the case of a rational-numbered stoichiometry or a model in SBML Level 1. | |
| const char * | SpeciesReference_getId (const SpeciesReference_t *sr) |
| Get the value of the "id" attribute of the given SpeciesReference_t structure. | |
| const char * | SpeciesReference_getName (const SpeciesReference_t *sr) |
| Get the value of the "name" attribute of the given SpeciesReference_t structure. | |
| const XMLNamespaces_t * | SpeciesReference_getNamespaces (SpeciesReference_t *sr) |
| Returns a list of XMLNamespaces_t associated with this SpeciesReference_t structure. | |
| const char * | SpeciesReference_getSpecies (const SpeciesReference_t *sr) |
| Get the value of the "species" attribute of the given SpeciesReference_t structure. | |
| double | SpeciesReference_getStoichiometry (const SpeciesReference_t *sr) |
| Get the value of the "stoichiometry" attribute of the given SpeciesReference_t structure. | |
| StoichiometryMath_t * | SpeciesReference_getStoichiometryMath (SpeciesReference_t *sr) |
| Get the content of the "stoichiometryMath" subelement of the given SpeciesReference_t structure. | |
| int | SpeciesReference_hasRequiredAttributes (SpeciesReference_t *sr) |
Predicate returning true or false depending on whether all the required attributes for this SpeciesReference object have been set. | |
| void | SpeciesReference_initDefaults (SpeciesReference_t *sr) |
| Initializes the attributes of the given SpeciesReference_t structure to their defaults: | |
| int | SpeciesReference_isModifier (const SpeciesReference_t *sr) |
Predicate returning true or false depending on whether the given SpeciesReference_t structure is a modifier. | |
| int | SpeciesReference_isSetConstant (const SpeciesReference_t *sr) |
| Predicate returning nonzero (for true) or zero (for false) depending on whether the "constant" attribute of the given SpeciesReference_t structure is set. | |
| int | SpeciesReference_isSetId (const SpeciesReference_t *sr) |
| Predicate returning nonzero (for true) or zero (for false) depending on whether the "id" attribute of the given SpeciesReference_t structure is set. | |
| int | SpeciesReference_isSetName (const SpeciesReference_t *sr) |
| Predicate returning nonzero (for true) or zero (for false) depending on whether the "name" attribute of the given SpeciesReference_t structure is set. | |
| int | SpeciesReference_isSetSpecies (const SpeciesReference_t *sr) |
| Predicate returning nonzero (for true) or zero (for false) depending on whether the "species" attribute of the given SpeciesReference_t structure is set. | |
| int | SpeciesReference_isSetStoichiometry (const SpeciesReference_t *sr) |
| Predicate returning nonzero (for true) or zero (for false) depending on whether the "stoichiometry" attribute of the given SpeciesReference_t structure is set. | |
| int | SpeciesReference_isSetStoichiometryMath (const SpeciesReference_t *sr) |
| Predicate returning nonzero (for true) or zero (for false) depending on whether the "stoichiometryMath" subelement of the given SpeciesReference_t structure is non-empty. | |
| int | SpeciesReference_setConstant (SpeciesReference_t *sr, int value) |
| Assign the "constant" attribute of a SpeciesReference_t structure. | |
| int | SpeciesReference_setDenominator (SpeciesReference_t *sr, int value) |
| Sets the value of the "denominator" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_setId (SpeciesReference_t *sr, const char *sid) |
| Sets the value of the "id" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_setName (SpeciesReference_t *sr, const char *name) |
| Sets the value of the "name" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_setSpecies (SpeciesReference_t *sr, const char *sid) |
| Sets the value of the "species" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_setStoichiometry (SpeciesReference_t *sr, double value) |
| Sets the value of the "stoichiometry" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_setStoichiometryMath (SpeciesReference_t *sr, const StoichiometryMath_t *math) |
| Sets the content of the "stoichiometryMath" subelement of the given SpeciesReference_t structure. | |
| int | SpeciesReference_unsetId (SpeciesReference_t *sr) |
| Unsets the value of the "id" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_unsetName (SpeciesReference_t *sr) |
| Unsets the value of the "name" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_unsetStoichiometry (SpeciesReference_t *sr) |
| Unsets the content of the "stoichiometry" attribute of the given SpeciesReference_t structure. | |
| int | SpeciesReference_unsetStoichiometryMath (SpeciesReference_t *sr) |
| Unsets the content of the "stoichiometryMath" subelement of the given SpeciesReference_t structure. | |
| SpeciesReference_t* ListOfSpeciesReferences_getById | ( | ListOf_t * | lo, |
| const char * | sid | ||
| ) |
NULL if no such item exists. | SpeciesReference_t* ListOfSpeciesReferences_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.
| SpeciesReference_t* SpeciesReference_clone | ( | const SpeciesReference_t * | sr | ) |
Creates and returns a deep copy of the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure to use. |
| SpeciesReference_t* SpeciesReference_create | ( | unsigned int | level, |
| unsigned int | version | ||
| ) |
Creates a new SpeciesReference_t structure using the given SBML level and version values.
| level | an unsigned int, the SBML Level to assign to this SpeciesReference |
| version | an unsigned int, the SBML Version to assign to this SpeciesReference |
level and version for the document override those used to create the SpeciesReference. 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. | SpeciesReference_t* SpeciesReference_createModifier | ( | unsigned int | level, |
| unsigned int | version | ||
| ) |
Creates a new ModifierSpeciesReference (SpeciesReference_t) structure using the given SBMLNamespaces_t structure.
| level | an unsigned int, the SBML Level to assign to this SpeciesReference |
| version | an unsigned int, the SBML Version to assign to this SpeciesReference |
level and version for the document override those used to create the ModifierSpeciesReference. 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. | SpeciesReference_t* SpeciesReference_createModifierWithNS | ( | SBMLNamespaces_t * | sbmlns | ) |
Creates a new ModifierSpeciesReference (SpeciesReference_t) structure using the given SBMLNamespaces_t structure.
| sbmlns | SBMLNamespaces, a pointer to an SBMLNamespaces structure to assign to this ModifierSpeciesReference |
sbmlns namespaces for the document override those used to create the ModifierSpeciesReference. 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. | StoichiometryMath_t* SpeciesReference_createStoichiometryMath | ( | SpeciesReference_t * | sr | ) |
| SpeciesReference_t* SpeciesReference_createWithNS | ( | SBMLNamespaces_t * | sbmlns | ) |
Creates a new SpeciesReference_t structure using the given SBMLNamespaces_t structure.
| sbmlns | SBMLNamespaces, a pointer to an SBMLNamespaces structure to assign to this SpeciesReference |
sbmlns namespaces for the document override those used to create the SpeciesReference. 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 SpeciesReference_free | ( | SpeciesReference_t * | sr | ) |
Frees the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure. |
| int SpeciesReference_getConstant | ( | const SpeciesReference_t * | sr | ) |
Get the value of the "constant" attribute.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_getDenominator | ( | const SpeciesReference_t * | sr | ) |
Get the value of the "denominator" attribute, for the case of a rational-numbered stoichiometry or a model in SBML Level 1.
The "denominator" attribute is only actually written out in the case of an SBML Level 1 model. In SBML Level 2, rational-number stoichiometries are written as MathML elements in the "stoichiometryMath" subelement. However, as a convenience to users, libSBML allows the creation and manipulation of rational-number stoichiometries by supplying the numerator and denominator directly rather than having to manually create an ASTNode structure. LibSBML will write out the appropriate constructs (either a combination of "stoichiometry" and "denominator" in the case of SBML Level 1, or a "stoichiometryMath" subelement in the case of SBML Level 2).
This function returns 0 if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| const char* SpeciesReference_getId | ( | const SpeciesReference_t * | sr | ) |
Get the value of the "id" attribute of the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure to use. |
| const char* SpeciesReference_getName | ( | const SpeciesReference_t * | sr | ) |
Get the value of the "name" attribute of the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure to use. |
| const XMLNamespaces_t* SpeciesReference_getNamespaces | ( | SpeciesReference_t * | sr | ) |
Returns a list of XMLNamespaces_t associated with this SpeciesReference_t structure.
| sr | the SpeciesReference_t structure |
| const char* SpeciesReference_getSpecies | ( | const SpeciesReference_t * | sr | ) |
Get the value of the "species" attribute of the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure to use. |
| double SpeciesReference_getStoichiometry | ( | const SpeciesReference_t * | sr | ) |
Get the value of the "stoichiometry" attribute of the given SpeciesReference_t structure.
This function returns zero if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| StoichiometryMath_t* SpeciesReference_getStoichiometryMath | ( | SpeciesReference_t * | sr | ) |
Get the content of the "stoichiometryMath" subelement of the given SpeciesReference_t structure.
This function returns NULL if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_hasRequiredAttributes | ( | SpeciesReference_t * | sr | ) |
Predicate returning true or false depending on whether all the required attributes for this SpeciesReference object have been set.
| p | the SpeciesReference_t structure to check. |
| void SpeciesReference_initDefaults | ( | SpeciesReference_t * | sr | ) |
Initializes the attributes of the given SpeciesReference_t structure to their defaults:
1 1 This function has no effect if the SpeciesReference_t structure is a modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isModifier | ( | const SpeciesReference_t * | sr | ) |
Predicate returning true or false depending on whether the given SpeciesReference_t structure is a modifier.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isSetConstant | ( | const SpeciesReference_t * | sr | ) |
Predicate returning nonzero (for true) or zero (for false) depending on whether the "constant" attribute of the given SpeciesReference_t structure is set.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isSetId | ( | const SpeciesReference_t * | sr | ) |
Predicate returning nonzero (for true) or zero (for false) depending on whether the "id" attribute of the given SpeciesReference_t structure is set.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isSetName | ( | const SpeciesReference_t * | sr | ) |
Predicate returning nonzero (for true) or zero (for false) depending on whether the "name" attribute of the given SpeciesReference_t structure is set.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isSetSpecies | ( | const SpeciesReference_t * | sr | ) |
Predicate returning nonzero (for true) or zero (for false) depending on whether the "species" attribute of the given SpeciesReference_t structure is set.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isSetStoichiometry | ( | const SpeciesReference_t * | sr | ) |
Predicate returning nonzero (for true) or zero (for false) depending on whether the "stoichiometry" attribute of the given SpeciesReference_t structure is set.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_isSetStoichiometryMath | ( | const SpeciesReference_t * | sr | ) |
Predicate returning nonzero (for true) or zero (for false) depending on whether the "stoichiometryMath" subelement of the given SpeciesReference_t structure is non-empty.
This function returns false if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_setConstant | ( | SpeciesReference_t * | sr, |
| int | value | ||
| ) |
Assign the "constant" attribute of a SpeciesReference_t structure.
| p | the SpeciesReference_t structure to set. |
| value | the value to assign as the "constant" attribute of the speciesReference, either zero for false or nonzero for true. |
| int SpeciesReference_setDenominator | ( | SpeciesReference_t * | sr, |
| int | value | ||
| ) |
Sets the value of the "denominator" attribute of the given SpeciesReference_t structure.
The "denominator" attribute is only actually written out in the case of an SBML Level 1 model. In SBML Level 2, rational-number stoichiometries are written as MathML elements in the "stoichiometryMath" subelement. However, as a convenience to users, libSBML allows the creation and manipulation of rational-number stoichiometries by supplying the numerator and denominator directly rather than having to manually create an ASTNode structure. LibSBML will write out the appropriate constructs (either a combination of "stoichiometry" and "denominator" in the case of SBML Level 1, or a "stoichiometryMath" subelement in the case of SBML Level 2).
This function has no effect if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| value | The value to assign to the "denominator" attribute. |
| int SpeciesReference_setId | ( | SpeciesReference_t * | sr, |
| const char * | sid | ||
| ) |
Sets the value of the "id" attribute of the given SpeciesReference_t structure.
The string in sid will be copied.
| sr | The SpeciesReference_t structure to use. |
| sid | The identifier string that will be copied and assigned as the "id" attribute value. |
| int SpeciesReference_setName | ( | SpeciesReference_t * | sr, |
| const char * | name | ||
| ) |
Sets the value of the "name" attribute of the given SpeciesReference_t structure.
The string in sid will be copied.
| sr | The SpeciesReference_t structure to use. |
| sid | The identifier string that will be copied and assigned as the "name" attribute value. |
| int SpeciesReference_setSpecies | ( | SpeciesReference_t * | sr, |
| const char * | sid | ||
| ) |
Sets the value of the "species" attribute of the given SpeciesReference_t structure.
The string in sid will be copied.
| sr | The SpeciesReference_t structure to use. |
| sid | The identifier string that will be copied and assigned as the "species" attribute value. |
| int SpeciesReference_setStoichiometry | ( | SpeciesReference_t * | sr, |
| double | value | ||
| ) |
Sets the value of the "stoichiometry" attribute of the given SpeciesReference_t structure.
This function has no effect if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| value | The value to assign to the "stoichiometry" attribute. |
| int SpeciesReference_setStoichiometryMath | ( | SpeciesReference_t * | sr, |
| const StoichiometryMath_t * | math | ||
| ) |
Sets the content of the "stoichiometryMath" subelement of the given SpeciesReference_t structure.
This function has no effect if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| math | An ASTNode expression tree to use as the content of the "stoichiometryMath" subelement. |
| int SpeciesReference_unsetId | ( | SpeciesReference_t * | sr | ) |
Unsets the value of the "id" attribute of the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_unsetName | ( | SpeciesReference_t * | sr | ) |
Unsets the value of the "name" attribute of the given SpeciesReference_t structure.
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_unsetStoichiometry | ( | SpeciesReference_t * | sr | ) |
Unsets the content of the "stoichiometry" attribute of the given SpeciesReference_t structure.
This function has no effect if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |
| int SpeciesReference_unsetStoichiometryMath | ( | SpeciesReference_t * | sr | ) |
Unsets the content of the "stoichiometryMath" subelement of the given SpeciesReference_t structure.
This function has no effect if the SpeciesReference_t structure is a Modifer (see SpeciesReference_isModifier()).
| sr | The SpeciesReference_t structure to use. |