KineticLaw.h File Reference

Detailed Description

Definition of KineticLaw.

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

Functions

int KineticLaw_addLocalParameter (KineticLaw_t *kl, const LocalParameter_t *p)
 Adds a copy of the given LocalParameter_t structure to the list of local parameters in the given KineticLaw_t structure.
int KineticLaw_addParameter (KineticLaw_t *kl, const Parameter_t *p)
 Adds a copy of the given Parameter_t structure to the list of local parameters in the given KineticLaw_t structure.
KineticLaw_t * KineticLaw_clone (const KineticLaw_t *kl)
 Returns a deep copy of the given KineticLaw_t structure.
int KineticLaw_containsUndeclaredUnits (KineticLaw_t *kl)
 Predicate returning true or false depending on whether the math expression of this KineticLaw_t contains parameters/numbers with undeclared units.
KineticLaw_t * KineticLaw_create (unsigned int level, unsigned int version)
 Creates a new KineticLaw_t structure using the given SBML level and version values.
LocalParameter_t * KineticLaw_createLocalParameter (KineticLaw_t *kl)
 Creates a new LocalParameter_t structure, adds it to the given KineticLaw_t structures's list of local parameters, and returns a pointer to the Parameter_t created.
Parameter_t * KineticLaw_createParameter (KineticLaw_t *kl)
 Creates a new Parameter_t structure, adds it to the given KineticLaw_t structures's list of local parameters, and returns a pointer to the Parameter_t created.
KineticLaw_t * KineticLaw_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new KineticLaw_t structure using the given SBMLNamespaces_t structure.
void KineticLaw_free (KineticLaw_t *kl)
 Frees the given KineticLaw_t structure.
UnitDefinition_t * KineticLaw_getDerivedUnitDefinition (KineticLaw_t *kl)
 Calculates and returns a UnitDefinition_t that expresses the units returned by the math expression of this KineticLaw_t.
const char * KineticLaw_getFormula (const KineticLaw_t *kl)
 Gets the mathematical expression of this KineticLaw_t structure as a formula in text-string form.
ListOf_t * KineticLaw_getListOfLocalParameters (KineticLaw_t *kl)
 Get the list of local parameters defined for the given KineticLaw_t structure.
ListOf_t * KineticLaw_getListOfParameters (KineticLaw_t *kl)
 Get the list of local parameters defined for the given KineticLaw_t structure.
LocalParameter_t * KineticLaw_getLocalParameter (KineticLaw_t *kl, unsigned int n)
 Get the nth parameter in the list of local parameters in the given KineticLaw_t structure.
LocalParameter_t * KineticLaw_getLocalParameterById (KineticLaw_t *kl, const char *sid)
 Get a parameter with identifier "id" out of the list of local parameters defined for the given KineticLaw_t structure.
const ASTNode_t * KineticLaw_getMath (const KineticLaw_t *kl)
 Gets the mathematical expression of this KineticLaw_t structure as an ASTNode_t structure.
const XMLNamespaces_t * KineticLaw_getNamespaces (KineticLaw_t *kl)
 Returns a list of XMLNamespaces_t associated with this KineticLaw_t structure.
unsigned int KineticLaw_getNumLocalParameters (const KineticLaw_t *kl)
 Get the number of local parameters defined in the given KineticLaw_t structure.
unsigned int KineticLaw_getNumParameters (const KineticLaw_t *kl)
 Get the number of local parameters defined in the given KineticLaw_t structure.
Parameter_t * KineticLaw_getParameter (KineticLaw_t *kl, unsigned int n)
 Get the nth parameter in the list of local parameters in the given KineticLaw_t structure.
Parameter_t * KineticLaw_getParameterById (KineticLaw_t *kl, const char *sid)
 Get a parameter with identifier "id" out of the list of local parameters defined for the given KineticLaw_t structure.
const char * KineticLaw_getSubstanceUnits (const KineticLaw_t *kl)
 Gets the value of the "substanceUnits" attribute of the given KineticLaw_t structure.
const char * KineticLaw_getTimeUnits (const KineticLaw_t *kl)
 Gets the value of the "timeUnits" attribute of the given KineticLaw_t structure.
int KineticLaw_isSetFormula (const KineticLaw_t *kl)
 Predicate returning nonzero (for true) or zero (for false) depending on whether the "formula" attribute of the given KineticLaw_t structure is set.
int KineticLaw_isSetMath (const KineticLaw_t *kl)
 Predicate returning nonzero (for true) or zero (for false) depending on whether the "math" subelement of the given KineticLaw_t structure is set.
int KineticLaw_isSetSubstanceUnits (const KineticLaw_t *kl)
 Predicate returning nonzero (for true) or zero (for false) depending on whether the "timeUnits" attribute of the given KineticLaw_t structure is set.
int KineticLaw_isSetTimeUnits (const KineticLaw_t *kl)
 Predicate returning nonzero (for true) or zero (for false) depending on whether the "timeUnits" attribute of the given KineticLaw_t structure is set.
LocalParameter_t * KineticLaw_removeLocalParameter (KineticLaw_t *kl, unsigned int n)
 Removes the nth LocalParameter_t object from the list of local parameters in this KineticLaw_t object and returns a pointer to it.
LocalParameter_t * KineticLaw_removeLocalParameterById (KineticLaw_t *kl, const char *sid)
 Removes the LocalParameter_t object with the given "id" attribute from the list of local parameters in this KineticLaw_t object and returns a pointer to it.
Parameter_t * KineticLaw_removeParameter (KineticLaw_t *kl, unsigned int n)
 Removes the nth Parameter_t object from the list of local parameters in this KineticLaw_t object and returns a pointer to it.
Parameter_t * KineticLaw_removeParameterById (KineticLaw_t *kl, const char *sid)
 Removes the Parameter_t object with the given "id" attribute from the list of local parameters in this KineticLaw_t object and returns a pointer to it.
int KineticLaw_setFormula (KineticLaw_t *kl, const char *formula)
 Sets the formula of the given KineticLaw_t structure.
int KineticLaw_setMath (KineticLaw_t *kl, const ASTNode_t *math)
 Sets the formula of the given KineticLaw_t structure.
int KineticLaw_setSubstanceUnits (KineticLaw_t *kl, const char *sid)
 Sets the "substanceUnits" attribute of the given KineticLaw_t structure.
int KineticLaw_setTimeUnits (KineticLaw_t *kl, const char *sid)
 Sets the "timeUnits" attribute of the given KineticLaw_t structure.
int KineticLaw_unsetSubstanceUnits (KineticLaw_t *kl)
 Unsets the "substanceUnits" attribute of the given KineticLaw_t structure.
int KineticLaw_unsetTimeUnits (KineticLaw_t *kl)
 Unsets the "timeUnits" attribute of the given KineticLaw_t structure.

Function Documentation

int KineticLaw_addLocalParameter ( KineticLaw_t *  kl,
const LocalParameter_t *  p 
)

Adds a copy of the given LocalParameter_t structure to the list of local parameters in the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
pa pointer to a LocalParameter_t structure
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_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_OPERATION_FAILED
  • LIBSBML_DUPLICATE_OBJECT_ID
int KineticLaw_addParameter ( KineticLaw_t *  kl,
const Parameter_t *  p 
)

Adds a copy of the given Parameter_t structure to the list of local parameters in the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
pa pointer to a Parameter_t structure
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_LEVEL_MISMATCH
  • LIBSBML_VERSION_MISMATCH
  • LIBSBML_OPERATION_FAILED
  • LIBSBML_DUPLICATE_OBJECT_ID
KineticLaw_t* KineticLaw_clone ( const KineticLaw_t *  kl)

Returns a deep copy of the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
a (deep) copy of this KineticLaw_t structure.
int KineticLaw_containsUndeclaredUnits ( KineticLaw_t *  kl)

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

Returns:
true if the math expression of this KineticLaw_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:
KineticLaw_getDerivedUnitDefinition()
KineticLaw_t* KineticLaw_create ( unsigned int  level,
unsigned int  version 
)

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

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

Creates a new LocalParameter_t structure, adds it to the given KineticLaw_t structures's list of local parameters, and returns a pointer to the Parameter_t created.

Parameters:
klthe KineticLaw_t structure.
Returns:
a pointer to a LocalParameter_t structure
Parameter_t* KineticLaw_createParameter ( KineticLaw_t *  kl)

Creates a new Parameter_t structure, adds it to the given KineticLaw_t structures's list of local parameters, and returns a pointer to the Parameter_t created.

Parameters:
klthe KineticLaw_t structure.
Returns:
a pointer to a Parameter_t structure
KineticLaw_t* KineticLaw_createWithNS ( SBMLNamespaces_t *  sbmlns)

Creates a new KineticLaw_t structure using the given SBMLNamespaces_t structure.

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

Frees the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure
UnitDefinition_t* KineticLaw_getDerivedUnitDefinition ( KineticLaw_t *  kl)

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

Returns:
a UnitDefinition_t that expresses the units of the math expression of this KineticLaw_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:
KineticLaw_containsUndeclaredUnits()
const char* KineticLaw_getFormula ( const KineticLaw_t *  kl)

Gets the mathematical expression of this KineticLaw_t structure as a formula in text-string form.

This is fundamentally equivalent to KineticLaw_getMath(). It is provided principally for compatibility with SBML Level 1.

Parameters:
klthe KineticLaw_t structure.
Returns:
the formula of this KineticLaw_t structure.
See also:
KineticLaw_getMath().
Note:
SBML Level 1 uses a text-string format for mathematical formulas. SBML Level 2 uses MathML, an XML format for representing mathematical expressions. LibSBML provides an Abstract Syntax Tree API for working with mathematical expressions; this API is more powerful than working with formulas directly in text form, and ASTs can be translated into either MathML or the text-string syntax. The libSBML methods that accept text-string formulas directly (such as this constructor) are provided for SBML Level 1 compatibility, but developers are encouraged to use the AST mechanisms. See KineticLaw_createWithMath for a version that takes an ASTNode_t structure.
ListOf_t* KineticLaw_getListOfLocalParameters ( KineticLaw_t *  kl)

Get the list of local parameters defined for the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
a list of LocalParameters
ListOf_t* KineticLaw_getListOfParameters ( KineticLaw_t *  kl)

Get the list of local parameters defined for the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
a list of Parameters
LocalParameter_t* KineticLaw_getLocalParameter ( KineticLaw_t *  kl,
unsigned int  n 
)

Get the nth parameter in the list of local parameters in the given KineticLaw_t structure.

Callers should first find out how many parameters are in the list by calling KineticLaw_getNumLocalParameters().

Parameters:
klthe KineticLaw_t structure.
nthe index of the LocalParameter_t structure sought
Returns:
a pointer to the LocalParameter_t structure
See also:
KineticLaw_getNumLocalParameters().
LocalParameter_t* KineticLaw_getLocalParameterById ( KineticLaw_t *  kl,
const char *  sid 
)

Get a parameter with identifier "id" out of the list of local parameters defined for the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
sidthe identifier of the LocalParameter_t structure sought
Returns:
the LocalParameter_t structure with the given id, or NULL if no such LocalParameter_t exists in the given KineticLaw_t structure.
const ASTNode_t* KineticLaw_getMath ( const KineticLaw_t *  kl)

Gets the mathematical expression of this KineticLaw_t structure as an ASTNode_t structure.

This is fundamentally equivalent to KineticLaw_getFormula(). The latter is provided principally for compatibility with SBML Level 1, which represented mathematical formulas in text-string form.

Parameters:
klthe KineticLaw_t structure.
Returns:
the formula in the form of an ASTNode_t structure
See also:
KineticLaw_getFormula().
const XMLNamespaces_t* KineticLaw_getNamespaces ( KineticLaw_t *  kl)

Returns a list of XMLNamespaces_t associated with this KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
unsigned int KineticLaw_getNumLocalParameters ( const KineticLaw_t *  kl)

Get the number of local parameters defined in the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
the number of LocalParameter_t structures in the given KineticLaw_t structure.
unsigned int KineticLaw_getNumParameters ( const KineticLaw_t *  kl)

Get the number of local parameters defined in the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
the number of Parameter_t structures in the given KineticLaw_t structure.
Parameter_t* KineticLaw_getParameter ( KineticLaw_t *  kl,
unsigned int  n 
)

Get the nth parameter in the list of local parameters in the given KineticLaw_t structure.

Callers should first find out how many parameters are in the list by calling KineticLaw_getNumParameters().

Parameters:
klthe KineticLaw_t structure.
nthe index of the Parameter_t structure sought
Returns:
a pointer to the Parameter_t structure
See also:
KineticLaw_getNumParameters().
Parameter_t* KineticLaw_getParameterById ( KineticLaw_t *  kl,
const char *  sid 
)

Get a parameter with identifier "id" out of the list of local parameters defined for the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
sidthe identifier of the Parameter_t structure sought
Returns:
the Parameter_t structure with the given id, or NULL if no such Parameter_t exists in the given KineticLaw_t structure.
const char* KineticLaw_getSubstanceUnits ( const KineticLaw_t *  kl)

Gets the value of the "substanceUnits" attribute of the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
the "substanceUnits" attribute value
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
const char* KineticLaw_getTimeUnits ( const KineticLaw_t *  kl)

Gets the value of the "timeUnits" attribute of the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
Returns:
the "timeUnits" attribute value
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
int KineticLaw_isSetFormula ( const KineticLaw_t *  kl)

Predicate returning nonzero (for true) or zero (for false) depending on whether the "formula" attribute of the given KineticLaw_t structure is set.

This is fundamentally equivalent to KineticLaw_isSetMath(). It is provided principally for compatibility with SBML Level 1.

Parameters:
klthe KineticLaw_t structure.
Returns:
nonzero (meaning true) if the formula (or equivalently the "math" subelement) of the given KineticLaw_t structure is set, zero (meaning false) otherwise.
Note:
SBML Level 1 uses a text-string format for mathematical formulas. SBML Level 2 uses MathML, an XML format for representing mathematical expressions. LibSBML provides an Abstract Syntax Tree API for working with mathematical expressions; this API is more powerful than working with formulas directly in text form, and ASTs can be translated into either MathML or the text-string syntax. The libSBML methods that accept text-string formulas directly (such as this constructor) are provided for SBML Level 1 compatibility, but developers are encouraged to use the AST mechanisms. See KineticLaw_createWithMath for a version that takes an ASTNode_t structure.
int KineticLaw_isSetMath ( const KineticLaw_t *  kl)

Predicate returning nonzero (for true) or zero (for false) depending on whether the "math" subelement of the given KineticLaw_t structure is set.

This is fundamentally equivalent to KineticLaw_isSetFormula(). The latter provided principally for compatibility with SBML Level 1, which represented mathematical formulas in text-string form.

Parameters:
klthe KineticLaw_t structure.
Returns:
nonzero (meaning true) if the "math" subelement of the given KineticLaw_t structure is set, zero (meaning false) otherwise.
int KineticLaw_isSetSubstanceUnits ( const KineticLaw_t *  kl)

Predicate returning nonzero (for true) or zero (for false) depending on whether the "timeUnits" attribute of the given KineticLaw_t structure is set.

Parameters:
klthe KineticLaw_t structure.
Returns:
nonzero (meaning true) if the "timeUnits" attribute of the given KineticLaw_t structure is set, zero (meaning false) otherwise.
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
int KineticLaw_isSetTimeUnits ( const KineticLaw_t *  kl)

Predicate returning nonzero (for true) or zero (for false) depending on whether the "timeUnits" attribute of the given KineticLaw_t structure is set.

Parameters:
klthe KineticLaw_t structure.
Returns:
nonzero (meaning true) if the "timeUnits" attribute of the given KineticLaw_t structure is set, zero (meaning false) otherwise.
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
LocalParameter_t* KineticLaw_removeLocalParameter ( KineticLaw_t *  kl,
unsigned int  n 
)

Removes the nth LocalParameter_t object from the list of local parameters in this KineticLaw_t object and returns a pointer to it.

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

Parameters:
mthe Model_t structure
nthe integer index of the LocalParameter_t sought
Returns:
the LocalParameter_t object removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
LocalParameter_t* KineticLaw_removeLocalParameterById ( KineticLaw_t *  kl,
const char *  sid 
)

Removes the LocalParameter_t object with the given "id" attribute from the list of local parameters in this KineticLaw_t object and returns a pointer to it.

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

Parameters:
mthe KineticLaw_t structure
sidthe string of the "id" attribute of the LocalParameter_t sought
Returns:
the LocalParameter_t object removed. As mentioned above, the caller owns the returned object. NULL is returned if no KineticLaw_t object with the identifier exists in this KineticLaw_t object.
Parameter_t* KineticLaw_removeParameter ( KineticLaw_t *  kl,
unsigned int  n 
)

Removes the nth Parameter_t object from the list of local parameters in this KineticLaw_t object and returns a pointer to it.

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

Parameters:
mthe Model_t structure
nthe integer index of the Parameter_t sought
Returns:
the Parameter_t object removed. As mentioned above, the caller owns the returned item. NULL is returned if the given index is out of range.
Parameter_t* KineticLaw_removeParameterById ( KineticLaw_t *  kl,
const char *  sid 
)

Removes the Parameter_t object with the given "id" attribute from the list of local parameters in this KineticLaw_t object and returns a pointer to it.

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

Parameters:
mthe KineticLaw_t structure
sidthe string of the "id" attribute of the Parameter_t sought
Returns:
the Parameter_t object removed. As mentioned above, the caller owns the returned object. NULL is returned if no KineticLaw_t object with the identifier exists in this KineticLaw_t object.
int KineticLaw_setFormula ( KineticLaw_t *  kl,
const char *  formula 
)

Sets the formula of the given KineticLaw_t structure.

This is fundamentally equivalent to KineticLaw_setMath(). It is provided principally for compatibility with SBML Level 1.

Parameters:
klthe KineticLaw_t structure.
formulathe mathematical expression, in text-string form.
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
Note:
SBML Level 1 uses a text-string format for mathematical formulas. SBML Level 2 uses MathML, an XML format for representing mathematical expressions. LibSBML provides an Abstract Syntax Tree API for working with mathematical expressions; this API is more powerful than working with formulas directly in text form, and ASTs can be translated into either MathML or the text-string syntax. The libSBML methods that accept text-string formulas directly (such as this constructor) are provided for SBML Level 1 compatibility, but developers are encouraged to use the AST mechanisms. See KineticLaw_createWithMath for a version that takes an ASTNode_t structure.
int KineticLaw_setMath ( KineticLaw_t *  kl,
const ASTNode_t *  math 
)

Sets the formula of the given KineticLaw_t structure.

This is fundamentally equivalent to KineticLaw_setFormula(). The latter provided principally for compatibility with SBML Level 1, which represented mathematical formulas in text-string form.

Parameters:
klthe KineticLaw_t structure.
mathan ASTNode_t structure representing the mathematical formula
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 KineticLaw_setSubstanceUnits ( KineticLaw_t *  kl,
const char *  sid 
)

Sets the "substanceUnits" attribute of the given KineticLaw_t structure.

The identifier string sid is copied.

Parameters:
klthe KineticLaw_t structure.
sidthe identifier of the units
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
  • LIBSBML_UNEXPECTED_ATTRIBUTE
Note:
Using this function with an id of NULL is equivalent to unsetting the "substanceUnits" attribute.
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
int KineticLaw_setTimeUnits ( KineticLaw_t *  kl,
const char *  sid 
)

Sets the "timeUnits" attribute of the given KineticLaw_t structure.

The identifier string sid is copied.

Parameters:
klthe KineticLaw_t structure.
sidthe identifier of the units
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
  • LIBSBML_UNEXPECTED_ATTRIBUTE
Note:
Using this function with an id of NULL is equivalent to unsetting the "timeUnits" attribute.
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
int KineticLaw_unsetSubstanceUnits ( KineticLaw_t *  kl)

Unsets the "substanceUnits" attribute of the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
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_OPERATION_FAILED
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
int KineticLaw_unsetTimeUnits ( KineticLaw_t *  kl)

Unsets the "timeUnits" attribute of the given KineticLaw_t structure.

Parameters:
klthe KineticLaw_t structure.
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_OPERATION_FAILED
Warning:
In SBML Level 2 Version 2, the "timeUnits" and "substanceUnits" attributes were removed. For compatibility with new versions of SBML, users are cautioned to avoid these attributes.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines