libSBML C API
5.18.0
|
LocalParameter_t has been introduced in SBML Level 3 to serve as the object class for parameter definitions that are intended to be local to a Reaction_t. Objects of class LocalParameter_t never appear at the Model_t level; they are always contained within ListOfLocalParameters_t lists which are in turn contained within KineticLaw_t objects.
Like its global Parameter_t counterpart, the LocalParameter_t object class is used to define a symbol associated with a value; this symbol can then be used in a model's mathematical formulas (and specifically, for LocalParameter_t, reaction rate formulas). Unlike Parameter_t, the LocalParameter_t class does not have a "constant" attribute: local parameters within reactions are always constant.
LocalParameter_t has one required attribute, "id", to give the parameter a unique identifier by which other parts of an SBML model definition can refer to it. A parameter can also have an optional "name" attribute of type string
. Identifiers and names must be used according to the guidelines described in the SBML specifications.
The optional attribute "value" determines the value (of type double
) assigned to the parameter. A missing value for "value" implies that the value either is unknown, or to be obtained from an external source, or determined by an initial assignment. The unit of measurement associated with the value of the parameter can be specified using the optional attribute "units". Here we only mention briefly some notable points about the possible unit choices, but readers are urged to consult the SBML specification documents for more information:
In SBML Level 3, there are no constraints on the units that can be assigned to parameters in a model; there are also no units to inherit from the enclosing Model_t object.
"substance"
, "time"
, "volume"
, "area"
or "length"
; or the identifier of a new unit defined in the list of unit definitions in the enclosing Model_t structure. There are no constraints on the units that can be chosen from these sets. There are no default units for local parameters. As with all other major SBML components, LocalParameter_t is derived from SBase_t, and the methods defined on SBase_t are available on LocalParameter_t.
In SBML Level 3 Version 2, the scope of the LocalParameter_t was expanded slightly to officially encompass the entire Reaction_t instead of just the KineticLaw_t in which it appears. This has no effect on models using only SBML Level 3 Core constructs, but has the potential to allow SBML Level 3 Packages to include elements in a Reaction_t that could reference a LocalParameter_t from that Reaction_t's KineticLaw_t. It also means that no LocalParameter_t may have the same "id"
as a referenced Species_t in any SimpleSpeciesReference_t in that Reaction_t.
Public Member Functions | |
LocalParameter_t * | LocalParameter_clone (const LocalParameter_t *p) |
Creates a deep copy of the given LocalParameter_t structure. More... | |
LocalParameter_t * | LocalParameter_create (unsigned int level, unsigned int version) |
Creates a new LocalParameter_t structure using the given SBML level and version values. More... | |
LocalParameter_t * | LocalParameter_createWithNS (SBMLNamespaces_t *sbmlns) |
Creates a new LocalParameter_t structure using the given SBMLNamespaces_t structure. More... | |
void | LocalParameter_free (LocalParameter_t *p) |
Frees the given LocalParameter_t structure. More... | |
int | LocalParameter_getConstant (const LocalParameter_t *p) |
Because a LocalParameter_t has no 'constant' attribute, always returns 'true', as local parameters in SBML may not vary. More... | |
UnitDefinition_t * | LocalParameter_getDerivedUnitDefinition (LocalParameter_t *p) |
Constructs and returns a UnitDefinition_t structure that expresses the units of this LocalParameter_t structure. More... | |
const char * | LocalParameter_getId (const LocalParameter_t *p) |
Takes a LocalParameter_t structure and returns its identifier. More... | |
const char * | LocalParameter_getName (const LocalParameter_t *p) |
Takes a LocalParameter_t structure and returns its name. More... | |
const XMLNamespaces_t * | LocalParameter_getNamespaces (LocalParameter_t *p) |
Returns a list of XMLNamespaces_t associated with this LocalParameter_t structure. More... | |
const char * | LocalParameter_getUnits (const LocalParameter_t *p) |
Takes a LocalParameter_t structure and returns its units. More... | |
double | LocalParameter_getValue (const LocalParameter_t *p) |
Takes a LocalParameter_t structure and returns its value. More... | |
int | LocalParameter_hasRequiredAttributes (LocalParameter_t *p) |
Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for this LocalParameter_t object have been set. More... | |
void | LocalParameter_initDefaults (LocalParameter_t *p) |
Does nothing: this function initializes structures according to their defaults in SBML Level 2, but Local Parameters did not exist in SBML Level 2. More... | |
int | LocalParameter_isSetId (const LocalParameter_t *p) |
Predicate returning 1 (true) or 0 (false) depending on whether the given LocalParameter_t structure's identifier is set. More... | |
int | LocalParameter_isSetName (const LocalParameter_t *p) |
Predicate returning 1 (true) or 0 (false) depending on whether the given LocalParameter_t structure's name is set. More... | |
int | LocalParameter_isSetUnits (const LocalParameter_t *p) |
Predicate returning 1 (true) or 0 (false) depending on whether the given LocalParameter_t structure's units have been set. More... | |
int | LocalParameter_isSetValue (const LocalParameter_t *p) |
Predicate returning 1 (true) or 0 (false) depending on whether the given LocalParameter_t structure's value is set. More... | |
int | LocalParameter_setConstant (LocalParameter_t *p, int value) |
Because LocalParameter_t structures don't have a 'constant' attribute, this function always returns LIBSBML_INVALID_ATTRIBUTE_VALUE, or LIBSBML_INVALID_OBJECT if p is NULL . More... | |
int | LocalParameter_setId (LocalParameter_t *p, const char *sid) |
Assigns the identifier of a LocalParameter_t structure. More... | |
int | LocalParameter_setName (LocalParameter_t *p, const char *name) |
Assign the name of a LocalParameter_t structure. More... | |
int | LocalParameter_setUnits (LocalParameter_t *p, const char *units) |
Assign the units of a LocalParameter_t structure. More... | |
int | LocalParameter_setValue (LocalParameter_t *p, double value) |
Assign the value of a LocalParameter_t structure. More... | |
int | LocalParameter_unsetConstant (LocalParameter_t *p) |
Because LocalParameter_t structures don't have a 'constant' attribute, this function always returns LIBSBML_INVALID_ATTRIBUTE_VALUE, or LIBSBML_INVALID_OBJECT if p is NULL . More... | |
int | LocalParameter_unsetName (LocalParameter_t *p) |
Unsets the name of this LocalParameter_t structure. More... | |
int | LocalParameter_unsetUnits (LocalParameter_t *p) |
Unsets the units of this LocalParameter_t structure. More... | |
int | LocalParameter_unsetValue (LocalParameter_t *p) |
Unsets the value of this LocalParameter_t structure. More... | |
LocalParameter_t * LocalParameter_clone | ( | const LocalParameter_t * | p | ) |
Creates a deep copy of the given LocalParameter_t structure.
p | the LocalParameter_t structure to be copied. |
LocalParameter_t * LocalParameter_create | ( | unsigned int | level, |
unsigned int | version | ||
) |
Creates a new LocalParameter_t structure using the given SBML level
and version
values.
level | an unsigned int, the SBML Level to assign to this LocalParameter_t. |
version | an unsigned int, the SBML Version to assign to this LocalParameter_t. |
LocalParameter_t * LocalParameter_createWithNS | ( | SBMLNamespaces_t * | sbmlns | ) |
Creates a new LocalParameter_t structure using the given SBMLNamespaces_t structure.
sbmlns | SBMLNamespaces_t, a pointer to an SBMLNamespaces_t structure to assign to this LocalParameter_t. |
void LocalParameter_free | ( | LocalParameter_t * | p | ) |
Frees the given LocalParameter_t structure.
p | the LocalParameter_t structure to be freed. |
int LocalParameter_getConstant | ( | const LocalParameter_t * | p | ) |
Because a LocalParameter_t has no 'constant' attribute, always returns 'true', as local parameters in SBML may not vary.
p | the LocalParameter_t to ignore. |
1
(true), or 0
(false) if p
is NULL
. UnitDefinition_t * LocalParameter_getDerivedUnitDefinition | ( | LocalParameter_t * | p | ) |
Constructs and returns a UnitDefinition_t structure that expresses the units of this LocalParameter_t structure.
p | the LocalParameter_t structure whose units are to be returned. |
NULL
is returned. const char * LocalParameter_getId | ( | const LocalParameter_t * | p | ) |
Takes a LocalParameter_t structure and returns its identifier.
p | the LocalParameter_t structure whose identifier is sought. |
const char * LocalParameter_getName | ( | const LocalParameter_t * | p | ) |
Takes a LocalParameter_t structure and returns its name.
p | the LocalParameter_t whose name is sought. |
const XMLNamespaces_t * LocalParameter_getNamespaces | ( | LocalParameter_t * | p | ) |
Returns a list of XMLNamespaces_t associated with this LocalParameter_t structure.
p | the LocalParameter_t structure. |
const char * LocalParameter_getUnits | ( | const LocalParameter_t * | p | ) |
Takes a LocalParameter_t structure and returns its units.
p | the LocalParameter_t whose units are sought. |
double LocalParameter_getValue | ( | const LocalParameter_t * | p | ) |
Takes a LocalParameter_t structure and returns its value.
p | the LocalParameter_t whose value is sought. |
double
. int LocalParameter_hasRequiredAttributes | ( | LocalParameter_t * | p | ) |
Predicate returning 1
(true) or 0
(false) depending on whether all the required attributes for this LocalParameter_t object have been set.
p | the LocalParameter_t structure to check. |
The required attributes for a LocalParameter_t object are:
1
(true) if all the required attributes for this object have been defined, 0
(false) otherwise. void LocalParameter_initDefaults | ( | LocalParameter_t * | p | ) |
Does nothing: this function initializes structures according to their defaults in SBML Level 2, but Local Parameters did not exist in SBML Level 2.
p | the LocalParameter_t structure to be ignored. |
int LocalParameter_isSetId | ( | const LocalParameter_t * | p | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given LocalParameter_t structure's identifier is set.
p | the LocalParameter_t structure to query. |
1
(true) if the "id" attribute of the given LocalParameter_t structure is set, 0
(false) otherwise. int LocalParameter_isSetName | ( | const LocalParameter_t * | p | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given LocalParameter_t structure's name is set.
p | the LocalParameter_t structure to query. |
1
(true) if the "name" attribute of the given LocalParameter_t structure is set, 0
(false) otherwise. int LocalParameter_isSetUnits | ( | const LocalParameter_t * | p | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given LocalParameter_t structure's units have been set.
p | the LocalParameter_t structure to query. |
1
(true) if the "units" attribute of the given LocalParameter_t structure is set, 0
(false) otherwise. int LocalParameter_isSetValue | ( | const LocalParameter_t * | p | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given LocalParameter_t structure's value is set.
p | the LocalParameter_t structure to query. |
1
(true) if the "value" attribute of the given LocalParameter_t structure is set, 0
(false) otherwise. int LocalParameter_setConstant | ( | LocalParameter_t * | p, |
int | value | ||
) |
Because LocalParameter_t structures don't have a 'constant' attribute, this function always returns LIBSBML_INVALID_ATTRIBUTE_VALUE, or LIBSBML_INVALID_OBJECT if p
is NULL
.
p | the LocalParameter_t structure to leave unchanged. |
value | the integer value to ignore. |
int LocalParameter_setId | ( | LocalParameter_t * | p, |
const char * | sid | ||
) |
Assigns the identifier of a LocalParameter_t structure.
This makes a copy of the string passed in the parameter sid
.
p | the LocalParameter_t structure to set. |
sid | the string to use as the identifier. |
sid
of NULL is equivalent to unsetting the "id" attribute. int LocalParameter_setName | ( | LocalParameter_t * | p, |
const char * | name | ||
) |
Assign the name of a LocalParameter_t structure.
This makes a copy of the string passed in as the argument name
.
p | the LocalParameter_t structure to set. |
name | the string to use as the name. |
int LocalParameter_setUnits | ( | LocalParameter_t * | p, |
const char * | units | ||
) |
Assign the units of a LocalParameter_t structure.
This makes a copy of the string passed in as the argument units
.
p | the LocalParameter_t structure to set. |
units | the string to use as the identifier of the units to assign. |
int LocalParameter_setValue | ( | LocalParameter_t * | p, |
double | value | ||
) |
Assign the value of a LocalParameter_t structure.
p | the LocalParameter_t structure to set. |
value | the double value to use. |
int LocalParameter_unsetConstant | ( | LocalParameter_t * | p | ) |
Because LocalParameter_t structures don't have a 'constant' attribute, this function always returns LIBSBML_INVALID_ATTRIBUTE_VALUE, or LIBSBML_INVALID_OBJECT if p
is NULL
.
p | the LocalParameter_t structure to leave unchanged. |
int LocalParameter_unsetName | ( | LocalParameter_t * | p | ) |
Unsets the name of this LocalParameter_t structure.
p | the LocalParameter_t structure whose name is to be unset. |
int LocalParameter_unsetUnits | ( | LocalParameter_t * | p | ) |
Unsets the units of this LocalParameter_t structure.
p | the LocalParameter_t structure whose units are to be unset. |
int LocalParameter_unsetValue | ( | LocalParameter_t * | p | ) |
Unsets the value of this LocalParameter_t structure.
p | the LocalParameter_t structure whose value is to be unset. |