libSBML C API  5.18.0
Transition_t Class Reference

Detailed Description

qual A transition of a QualitativeSpecies_t.

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_tTransition_clone (Transition_t *t)
 Returns a copy of the given Transition_t structure. More...
 
Transition_tTransition_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_tTransition_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_tTransition_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_tTransition_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_tTransition_getFunctionTerm (Transition_t *t, unsigned int n)
 Return a specific FunctionTerm_t structure of the given Transition_t. More...
 
FunctionTerm_tTransition_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_tTransition_getInput (Transition_t *t, unsigned int n)
 Return a specific Input_t structure of the given Transition_t. More...
 
Input_tTransition_getInputById (Transition_t *t, const char *sid)
 Return the Input_t indicated by the given sid. More...
 
ListOf_tTransition_getListOfFunctionTerms (Transition_t *t)
 Get the list of FunctionTerm_t structures from the given Transition_t structure. More...
 
ListOf_tTransition_getListOfInputs (Transition_t *t)
 Get the list of Input_t structures from the given Transition_t structure. More...
 
ListOf_tTransition_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_tTransition_getOutput (Transition_t *t, unsigned int n)
 Return a specific Output_t structure of the given Transition_t. More...
 
Output_tTransition_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_tTransition_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_tTransition_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_tTransition_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_tTransition_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_tTransition_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_tTransition_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...
 

Member Function Documentation

int Transition_addFunctionTerm ( Transition_t t,
FunctionTerm_t ft 
)

Appends a copy of the given FunctionTerm_t structure to the given Transition_t structure.

Parameters
tthe Transition_t structure to which the FunctionTerm_t should be added.
fta FunctionTerm_t structure to add.
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:
int Transition_addInput ( Transition_t t,
Input_t i 
)

Appends a copy of the given Input_t structure to the given Transition_t structure.

Parameters
tthe Transition_t structure to which the Input_t should be added.
ian Input_t structure to add.
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:
int Transition_addOutput ( Transition_t t,
Output_t o 
)

Appends a copy of the given Output_t structure to the given Transition_t structure.

Parameters
tthe Transition_t structure to which the Output_t should be added.
oan Output_t structure to add.
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:
Transition_t * Transition_clone ( Transition_t t)

Returns a copy of the given Transition_t structure.

Parameters
tthe Transition_t structure to copy.
Returns
a (deep) copy of the Transition_t.
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.

Parameters
levelan unsigned int, the SBML Level to assign to this Transition_t.
versionan unsigned int, the SBML Version to assign to this Transition_t.
pkgVersionan unsigned int, the SBML 'Qual' package Version to assign to this Transition_t.
Returns
a pointer to the newly created Transition_t structure.
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.

Parameters
tthe Transition_t structure to which the FunctionTerm_t should be added.
Returns
the newly-created empty FunctionTerm_t.
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.

Parameters
tthe Transition_t structure to which the Input_t should be added.
Returns
the newly-created empty Input_t.
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.

Parameters
tthe Transition_t structure to which the Output_t should be added.
Returns
the newly-created empty Output_t.
void Transition_free ( Transition_t t)

Frees the given Transition_t structure.

Parameters
tthe 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.

Parameters
tthe Transition_t structure to use.
nan integer, the index of the FunctionTerm_t structure to return.
Returns
the nth FunctionTerm_t of the given Transition_t, or 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.

Parameters
tthe Transition_t structure to use.
sida string, the identifier of the FunctionTerm_t being sought.
Returns
the FunctionTerm_t for the given variable, or NULL if no such FunctionTerm_t exists.
char * Transition_getId ( Transition_t t)

Takes an Transition_t structure and returns its identifier.

Parameters
tthe Transition_t structure whose identifier is sought.
Returns
the identifier of this Transition_t, as a pointer to a string.
Input_t * Transition_getInput ( Transition_t t,
unsigned int  n 
)

Return a specific Input_t structure of the given Transition_t.

Parameters
tthe Transition_t structure to use.
nan integer, the index of the Input_t structure to return.
Returns
the nth Input_t of the given Transition_t, or 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.

Parameters
tthe Transition_t structure to use.
sida string, the identifier of the Input_t being sought.
Returns
the Input_t for the given variable, or NULL if no such Input_t exists.
ListOf_t * Transition_getListOfFunctionTerms ( Transition_t t)

Get the list of FunctionTerm_t structures from the given Transition_t structure.

Parameters
tthe Transition_t structure to use.
Returns
the list of FunctionTerm_t's for the given Transition_t.
ListOf_t * Transition_getListOfInputs ( Transition_t t)

Get the list of Input_t structures from the given Transition_t structure.

Parameters
tthe Transition_t structure to use.
Returns
the list of Input_t's for the given Transition_t.
ListOf_t * Transition_getListOfOutputs ( Transition_t t)

Get the list of Output_t structures from the given Transition_t structure.

Parameters
tthe Transition_t structure to use.
Returns
the list of Output_t's for the given Transition_t.
char * Transition_getName ( Transition_t t)

Takes a Transition_t structure and returns its name.

Parameters
tthe Transition_t whose name is sought.
Returns
the name of this Transition_t, as a pointer to a string.
unsigned int Transition_getNumFunctionTerms ( Transition_t t)

Returns the number of EventAssignment_t structures attached to the given Transition_t.

Parameters
tthe Transition_t structure to use.
Returns
the number of EventAssignment_t structures in the given Transition_t.
unsigned int Transition_getNumInputs ( Transition_t t)

Returns the number of EventAssignment_t structures attached to the given Transition_t.

Parameters
tthe Transition_t structure to use.
Returns
the number of EventAssignment_t structures in the given Transition_t.
unsigned int Transition_getNumOutputs ( Transition_t t)

Returns the number of EventAssignment_t structures attached to the given Transition_t.

Parameters
tthe Transition_t structure to use.
Returns
the number of EventAssignment_t structures in the given Transition_t.
Output_t * Transition_getOutput ( Transition_t t,
unsigned int  n 
)

Return a specific Output_t structure of the given Transition_t.

Parameters
tthe Transition_t structure to use.
nan integer, the index of the Output_t structure to return.
Returns
the nth Output_t of the given Transition_t, or 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.

Parameters
tthe Transition_t structure to use.
sida string, the identifier of the Output_t being sought.
Returns
the Output_t for the given variable, or NULL if no such Output_t exists.
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.

Note
The required elements for an Transition_t structure are:
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.

Parameters
tthe Transition_t structure to query.
Returns
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.

Parameters
tthe Transition_t structure to query.
Returns
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.

Parameters
tthe Transition_t structure.
nthe integer index of the FunctionTerm_t sought.
Returns
the FunctionTerm_t structure removed. As mentioned above, the caller owns the returned item. 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.

Parameters
tthe Transition_t structure.
sidthe string of the "id" attribute of the FunctionTerm_t sought.
Returns
the FunctionTerm_t structure removed. As mentioned above, the caller owns the returned structure. 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.

Parameters
tthe Transition_t structure.
nthe integer index of the Input_t sought.
Returns
the Input_t structure removed. As mentioned above, the caller owns the returned item. 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.

Parameters
tthe Transition_t structure.
sidthe string of the "id" attribute of the Input_t sought.
Returns
the Input_t structure removed. As mentioned above, the caller owns the returned structure. 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.

Parameters
tthe Transition_t structure.
nthe integer index of the Output_t sought.
Returns
the Output_t structure removed. As mentioned above, the caller owns the returned item. 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.

Parameters
tthe Transition_t structure.
sidthe string of the "id" attribute of the Output_t sought.
Returns
the Output_t structure removed. As mentioned above, the caller owns the returned structure. 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.

Parameters
tthe Transition_t structure to set.
sidthe string to use as the identifier.
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:
Note
Using this function with an 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.

Parameters
tthe Transition_t structure to set.
namethe name to assign to the given Transition_t's "name" attribute.
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:
Note
Using this function with the name set to NULL is equivalent to unsetting the "name" attribute.
int Transition_unsetId ( Transition_t t)

Unsets the "id" attribute of the given Transition_t structure.

Parameters
tthe Transition_t structure to unset.
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:
int Transition_unsetName ( Transition_t t)

Unsets the "name" attribute of the given Transition_t structure.

Parameters
tthe Transition_t structure to unset.
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: