libSBML C API
5.18.0
|
A Transition_t element contains at most one ListOfInputs_t and one ListOfOutputs_t and exactly one ListOfFunctionTerms_t.
A Transition_t defines the changes in level associated with the QualitativeSpecies_t that occur when a Transition_t is enabled.
In logical models, a Transition_t is used to specify the logical rule associated with a QualitativeSpecies_t (that appears as an Output_t of this Transition_t). For example, the rule "if A > 1 : B = 2" would be encapsulated as a Transition_t with QualitativeSpecies_t "A" as an Input_t and "B" as an Output_t; the "if A > 1" rule being encode by the math element of a FunctionTerm_t with the resultLevel attribute having a value "2".
In Petri net models, a Transition_t is interpreted, using the common Petri net semantics, as events that might occur within the system causing tokens to be moved.
Public Member Functions | |
int | Transition_addFunctionTerm (Transition_t *t, FunctionTerm_t *ft) |
Appends a copy of the given FunctionTerm_t structure to the given Transition_t structure. More... | |
int | Transition_addInput (Transition_t *t, Input_t *i) |
Appends a copy of the given Input_t structure to the given Transition_t structure. More... | |
int | Transition_addOutput (Transition_t *t, Output_t *o) |
Appends a copy of the given Output_t structure to the given Transition_t structure. More... | |
Transition_t * | Transition_clone (Transition_t *t) |
Returns a copy of the given Transition_t structure. More... | |
Transition_t * | Transition_create (unsigned int level, unsigned int version, unsigned int pkgVersion) |
Creates a new Transition_t structure using the given SBML level and version , and the pkgVersion package version. More... | |
FunctionTerm_t * | Transition_createFunctionTerm (Transition_t *t) |
Creates a new, empty FunctionTerm_t structure, adds it to the given Transition_t, and returns the FunctionTerm_t. More... | |
Input_t * | Transition_createInput (Transition_t *t) |
Creates a new, empty Input_t structure, adds it to the given Transition_t, and returns the Input_t. More... | |
Output_t * | Transition_createOutput (Transition_t *t) |
Creates a new, empty Output_t structure, adds it to the given Transition_t, and returns the Output_t. More... | |
void | Transition_free (Transition_t *t) |
Frees the given Transition_t structure. More... | |
FunctionTerm_t * | Transition_getFunctionTerm (Transition_t *t, unsigned int n) |
Return a specific FunctionTerm_t structure of the given Transition_t. More... | |
FunctionTerm_t * | Transition_getFunctionTermById (Transition_t *t, const char *sid) |
Return the FunctionTerm_t indicated by the given sid . More... | |
char * | Transition_getId (Transition_t *t) |
Takes an Transition_t structure and returns its identifier. More... | |
Input_t * | Transition_getInput (Transition_t *t, unsigned int n) |
Return a specific Input_t structure of the given Transition_t. More... | |
Input_t * | Transition_getInputById (Transition_t *t, const char *sid) |
Return the Input_t indicated by the given sid . More... | |
ListOf_t * | Transition_getListOfFunctionTerms (Transition_t *t) |
Get the list of FunctionTerm_t structures from the given Transition_t structure. More... | |
ListOf_t * | Transition_getListOfInputs (Transition_t *t) |
Get the list of Input_t structures from the given Transition_t structure. More... | |
ListOf_t * | Transition_getListOfOutputs (Transition_t *t) |
Get the list of Output_t structures from the given Transition_t structure. More... | |
char * | Transition_getName (Transition_t *t) |
Takes a Transition_t structure and returns its name. More... | |
unsigned int | Transition_getNumFunctionTerms (Transition_t *t) |
Returns the number of EventAssignment_t structures attached to the given Transition_t. More... | |
unsigned int | Transition_getNumInputs (Transition_t *t) |
Returns the number of EventAssignment_t structures attached to the given Transition_t. More... | |
unsigned int | Transition_getNumOutputs (Transition_t *t) |
Returns the number of EventAssignment_t structures attached to the given Transition_t. More... | |
Output_t * | Transition_getOutput (Transition_t *t, unsigned int n) |
Return a specific Output_t structure of the given Transition_t. More... | |
Output_t * | Transition_getOutputById (Transition_t *t, const char *sid) |
Return the Output_t indicated by the given sid . More... | |
int | Transition_hasRequiredAttributes (Transition_t *t) |
Predicate returning true or false depending on whether all the required attributes for the given Transition_t structure have been set. More... | |
int | Transition_hasRequiredElements (Transition_t *t) |
Predicate returning true or false depending on whether all the required elements for the given Transition_t structure have been set. More... | |
int | Transition_isSetId (Transition_t *t) |
Predicate returning 1 (true) or 0 (false) depending on whether the given Transition_t structure's identifier is set. More... | |
int | Transition_isSetName (Transition_t *t) |
Predicate returning 1 (true) or 0 (false) depending on whether the given Transition_t structure's name is set. More... | |
FunctionTerm_t * | Transition_removeFunctionTerm (Transition_t *t, unsigned int n) |
Removes the nth FunctionTerm_t structure from the given Transition_t structure and returns a pointer to it. More... | |
FunctionTerm_t * | Transition_removeFunctionTermById (Transition_t *t, const char *sid) |
Removes the FunctionTerm_t structure with the given sid from the given Transition_t structure and returns a pointer to it. More... | |
Input_t * | Transition_removeInput (Transition_t *t, unsigned int n) |
Removes the nth Input_t structure from the given Transition_t structure and returns a pointer to it. More... | |
Input_t * | Transition_removeInputById (Transition_t *t, const char *sid) |
Removes the Input_t structure with the given sid from the given Transition_t structure and returns a pointer to it. More... | |
Output_t * | Transition_removeOutput (Transition_t *t, unsigned int n) |
Removes the nth Output_t structure from the given Transition_t structure and returns a pointer to it. More... | |
Output_t * | Transition_removeOutputById (Transition_t *t, const char *sid) |
Removes the Output_t structure with the given sid from the given Transition_t structure and returns a pointer to it. More... | |
int | Transition_setId (Transition_t *t, const char *sid) |
Assigns the identifier of an Transition_t structure. More... | |
int | Transition_setName (Transition_t *t, const char *name) |
Sets the name of the given Transition_t to a copy of name . More... | |
int | Transition_unsetId (Transition_t *t) |
Unsets the "id" attribute of the given Transition_t structure. More... | |
int | Transition_unsetName (Transition_t *t) |
Unsets the "name" attribute of the given Transition_t structure. More... | |
int Transition_addFunctionTerm | ( | Transition_t * | t, |
FunctionTerm_t * | ft | ||
) |
Appends a copy of the given FunctionTerm_t structure to the given Transition_t structure.
t | the Transition_t structure to which the FunctionTerm_t should be added. |
ft | a FunctionTerm_t structure to add. |
int Transition_addInput | ( | Transition_t * | t, |
Input_t * | i | ||
) |
Appends a copy of the given Input_t structure to the given Transition_t structure.
t | the Transition_t structure to which the Input_t should be added. |
i | an Input_t structure to add. |
int Transition_addOutput | ( | Transition_t * | t, |
Output_t * | o | ||
) |
Appends a copy of the given Output_t structure to the given Transition_t structure.
t | the Transition_t structure to which the Output_t should be added. |
o | an Output_t structure to add. |
Transition_t * Transition_clone | ( | Transition_t * | t | ) |
Returns a copy of the given Transition_t structure.
t | the Transition_t structure to copy. |
Transition_t * Transition_create | ( | unsigned int | level, |
unsigned int | version, | ||
unsigned int | pkgVersion | ||
) |
Creates a new Transition_t structure using the given SBML level
and version
, and the pkgVersion
package version.
level | an unsigned int, the SBML Level to assign to this Transition_t. |
version | an unsigned int, the SBML Version to assign to this Transition_t. |
pkgVersion | an unsigned int, the SBML 'Qual' package Version to assign to this Transition_t. |
FunctionTerm_t * Transition_createFunctionTerm | ( | Transition_t * | t | ) |
Creates a new, empty FunctionTerm_t structure, adds it to the given Transition_t, and returns the FunctionTerm_t.
t | the Transition_t structure to which the FunctionTerm_t should be added. |
Input_t * Transition_createInput | ( | Transition_t * | t | ) |
Creates a new, empty Input_t structure, adds it to the given Transition_t, and returns the Input_t.
t | the Transition_t structure to which the Input_t should be added. |
Output_t * Transition_createOutput | ( | Transition_t * | t | ) |
Creates a new, empty Output_t structure, adds it to the given Transition_t, and returns the Output_t.
t | the Transition_t structure to which the Output_t should be added. |
void Transition_free | ( | Transition_t * | t | ) |
Frees the given Transition_t structure.
t | the Transition_t structure to free. |
FunctionTerm_t * Transition_getFunctionTerm | ( | Transition_t * | t, |
unsigned int | n | ||
) |
Return a specific FunctionTerm_t structure of the given Transition_t.
t | the Transition_t structure to use. |
n | an integer, the index of the FunctionTerm_t structure to return. |
NULL
if no such FunctionTerm_t exists. FunctionTerm_t * Transition_getFunctionTermById | ( | Transition_t * | t, |
const char * | sid | ||
) |
Return the FunctionTerm_t indicated by the given sid
.
t | the Transition_t structure to use. |
sid | a string, the identifier of the FunctionTerm_t being sought. |
NULL
if no such FunctionTerm_t exists. char * Transition_getId | ( | Transition_t * | t | ) |
Takes an Transition_t structure and returns its identifier.
t | the Transition_t structure whose identifier is sought. |
Input_t * Transition_getInput | ( | Transition_t * | t, |
unsigned int | n | ||
) |
Return a specific Input_t structure of the given Transition_t.
t | the Transition_t structure to use. |
n | an integer, the index of the Input_t structure to return. |
NULL
if no such Input_t exists. Input_t * Transition_getInputById | ( | Transition_t * | t, |
const char * | sid | ||
) |
Return the Input_t indicated by the given sid
.
t | the Transition_t structure to use. |
sid | a string, the identifier of the Input_t being sought. |
ListOf_t * Transition_getListOfFunctionTerms | ( | Transition_t * | t | ) |
Get the list of FunctionTerm_t structures from the given Transition_t structure.
t | the Transition_t structure to use. |
ListOf_t * Transition_getListOfInputs | ( | Transition_t * | t | ) |
Get the list of Input_t structures from the given Transition_t structure.
t | the Transition_t structure to use. |
ListOf_t * Transition_getListOfOutputs | ( | Transition_t * | t | ) |
Get the list of Output_t structures from the given Transition_t structure.
t | the Transition_t structure to use. |
char * Transition_getName | ( | Transition_t * | t | ) |
Takes a Transition_t structure and returns its name.
t | the Transition_t whose name is sought. |
unsigned int Transition_getNumFunctionTerms | ( | Transition_t * | t | ) |
Returns the number of EventAssignment_t structures attached to the given Transition_t.
t | the Transition_t structure to use. |
unsigned int Transition_getNumInputs | ( | Transition_t * | t | ) |
Returns the number of EventAssignment_t structures attached to the given Transition_t.
t | the Transition_t structure to use. |
unsigned int Transition_getNumOutputs | ( | Transition_t * | t | ) |
Returns the number of EventAssignment_t structures attached to the given Transition_t.
t | the Transition_t structure to use. |
Output_t * Transition_getOutput | ( | Transition_t * | t, |
unsigned int | n | ||
) |
Return a specific Output_t structure of the given Transition_t.
t | the Transition_t structure to use. |
n | an integer, the index of the Output_t structure to return. |
NULL
if no such Output_t exists. Output_t * Transition_getOutputById | ( | Transition_t * | t, |
const char * | sid | ||
) |
Return the Output_t indicated by the given sid
.
t | the Transition_t structure to use. |
sid | a string, the identifier of the Output_t being sought. |
int Transition_hasRequiredAttributes | ( | Transition_t * | t | ) |
Predicate returning true
or false
depending on whether all the required attributes for the given Transition_t structure have been set.
int Transition_hasRequiredElements | ( | Transition_t * | t | ) |
Predicate returning true
or false
depending on whether all the required elements for the given Transition_t structure have been set.
int Transition_isSetId | ( | Transition_t * | t | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given Transition_t structure's identifier is set.
t | the Transition_t structure to query. |
1
(true) if the "id" attribute of the given Transition_t structure is set, 0
(false) otherwise. int Transition_isSetName | ( | Transition_t * | t | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given Transition_t structure's name is set.
t | the Transition_t structure to query. |
1
(true) if the "name" attribute of the given Transition_t structure is set, 0
(false) otherwise. FunctionTerm_t * Transition_removeFunctionTerm | ( | Transition_t * | t, |
unsigned int | n | ||
) |
Removes the nth FunctionTerm_t structure from the given Transition_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
t | the Transition_t structure. |
n | the integer index of the FunctionTerm_t sought. |
NULL
is returned if the given index is out of range. FunctionTerm_t * Transition_removeFunctionTermById | ( | Transition_t * | t, |
const char * | sid | ||
) |
Removes the FunctionTerm_t structure with the given sid
from the given Transition_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
t | the Transition_t structure. |
sid | the string of the "id" attribute of the FunctionTerm_t sought. |
NULL
is returned if no FunctionTerm_t structure with the "id" attribute exists in the given Transition_t structure. Input_t * Transition_removeInput | ( | Transition_t * | t, |
unsigned int | n | ||
) |
Removes the nth Input_t structure from the given Transition_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
t | the Transition_t structure. |
n | the integer index of the Input_t sought. |
NULL
is returned if the given index is out of range. Input_t * Transition_removeInputById | ( | Transition_t * | t, |
const char * | sid | ||
) |
Removes the Input_t structure with the given sid
from the given Transition_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
t | the Transition_t structure. |
sid | the string of the "id" attribute of the Input_t sought. |
NULL
is returned if no Input_t structure with the "id" attribute exists in the given Transition_t structure. Output_t * Transition_removeOutput | ( | Transition_t * | t, |
unsigned int | n | ||
) |
Removes the nth Output_t structure from the given Transition_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
t | the Transition_t structure. |
n | the integer index of the Output_t sought. |
NULL
is returned if the given index is out of range. Output_t * Transition_removeOutputById | ( | Transition_t * | t, |
const char * | sid | ||
) |
Removes the Output_t structure with the given sid
from the given Transition_t structure and returns a pointer to it.
The caller owns the returned structure and is responsible for deleting it.
t | the Transition_t structure. |
sid | the string of the "id" attribute of the Output_t sought. |
NULL
is returned if no Output_t structure with the "id" attribute exists in the given Transition_t structure. int Transition_setId | ( | Transition_t * | t, |
const char * | sid | ||
) |
Assigns the identifier of an Transition_t structure.
This makes a copy of the string passed in the parameter sid
.
t | the Transition_t structure to set. |
sid | the string to use as the identifier. |
sid
of NULL is equivalent to unsetting the "id" attribute. int Transition_setName | ( | Transition_t * | t, |
const char * | name | ||
) |
Sets the name of the given Transition_t to a copy of name
.
t | the Transition_t structure to set. |
name | the name to assign to the given Transition_t's "name" attribute. |
int Transition_unsetId | ( | Transition_t * | t | ) |
Unsets the "id" attribute of the given Transition_t structure.
t | the Transition_t structure to unset. |
int Transition_unsetName | ( | Transition_t * | t | ) |
Unsets the "name" attribute of the given Transition_t structure.
t | the Transition_t structure to unset. |