libSBML C API  5.18.0
FunctionTerm_t Class Reference

Detailed Description

qual A function term.

Each FunctionTerm_t is associated with a result and with a Boolean function inside a Math element that can be used to set the conditions under which this term is selected.

Public Member Functions

FunctionTerm_tFunctionTerm_clone (FunctionTerm_t *ft)
 Returns a copy of the given FunctionTerm_t structure. More...
 
FunctionTerm_tFunctionTerm_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new FunctionTerm_t structure using the given SBML level and version, and the pkgVersion package version. More...
 
void FunctionTerm_free (FunctionTerm_t *ft)
 Frees the given FunctionTerm_t structure. More...
 
const ASTNode_tFunctionTerm_getMath (const FunctionTerm_t *ft)
 Returns the value of the "math" element of this FunctionTerm_t. More...
 
int FunctionTerm_getResultLevel (FunctionTerm_t *ft)
 Takes a FunctionTerm_t structure and returns its resultLevel. More...
 
int FunctionTerm_hasRequiredAttributes (const FunctionTerm_t *ft)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for the given FunctionTerm_t structure have been set. More...
 
int FunctionTerm_hasRequiredElements (const FunctionTerm_t *ft)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required elements for the given FunctionTerm_t structure have been set. More...
 
int FunctionTerm_isSetMath (const FunctionTerm_t *ft)
 Predicate returning 1 (true) if this FunctionTerm_t's "math" element is set. More...
 
int FunctionTerm_isSetResultLevel (FunctionTerm_t *ft)
 Predicate returning 1 (true) or 0 (false) depending on whether the given FunctionTerm_t structure's resultLevel is set. More...
 
int FunctionTerm_setMath (FunctionTerm_t *ft, const ASTNode_t *math)
 Sets the value of the "math" element of this FunctionTerm_t. More...
 
int FunctionTerm_setResultLevel (FunctionTerm_t *ft, int resultLevel)
 Sets the "resultLevel" attribute of the given FunctionTerm_t structure. More...
 
int FunctionTerm_unsetMath (FunctionTerm_t *ft)
 Unsets the value of the "math" element of this FunctionTerm_t. More...
 
int FunctionTerm_unsetResultLevel (FunctionTerm_t *ft)
 Unsets the "resultLevel" attribute of the given FunctionTerm_t structure. More...
 
FunctionTerm_tListOfFunctionTerms_getById (ListOf_t *lo, const char *sid)
 Return the FunctionTerm_t indicated by the given sid. More...
 

Member Function Documentation

FunctionTerm_t * FunctionTerm_clone ( FunctionTerm_t ft)

Returns a copy of the given FunctionTerm_t structure.

Parameters
ftthe FunctionTerm_t structure to copy.
Returns
a (deep) copy of the FunctionTerm_t.
FunctionTerm_t * FunctionTerm_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new FunctionTerm_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 FunctionTerm_t.
versionan unsigned int, the SBML Version to assign to this FunctionTerm_t.
pkgVersionan unsigned int, the SBML 'Qual' package Version to assign to this FunctionTerm_t.
Returns
a pointer to the newly created FunctionTerm_t structure.
void FunctionTerm_free ( FunctionTerm_t ft)

Frees the given FunctionTerm_t structure.

Parameters
ftthe FunctionTerm_t structure to free.
const ASTNode_t * FunctionTerm_getMath ( const FunctionTerm_t ft)

Returns the value of the "math" element of this FunctionTerm_t.

Parameters
ftthe FunctionTerm_t structure whose math is sought.
Returns
the value of the "math" element of this FunctionTerm_t as a ASTNode_t.
int FunctionTerm_getResultLevel ( FunctionTerm_t ft)

Takes a FunctionTerm_t structure and returns its resultLevel.

Parameters
ftthe FunctionTerm_t whose resultLevel is sought.
Returns
the resultLevel attribute of the given FunctionTerm_t, as an int.
int FunctionTerm_hasRequiredAttributes ( const FunctionTerm_t ft)

Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for the given FunctionTerm_t structure have been set.

int FunctionTerm_hasRequiredElements ( const FunctionTerm_t ft)

Predicate returning 1 (true) or 0 (false) depending on whether all the required elements for the given FunctionTerm_t structure have been set.

Note
The required elements for a FunctionTerm_t object are:
  • "math"
int FunctionTerm_isSetMath ( const FunctionTerm_t ft)

Predicate returning 1 (true) if this FunctionTerm_t's "math" element is set.

Parameters
ftthe FunctionTerm_t structure.
Returns
1 (true) if this FunctionTerm_t's "math" element has been set, otherwise 0 (false) is returned.
int FunctionTerm_isSetResultLevel ( FunctionTerm_t ft)

Predicate returning 1 (true) or 0 (false) depending on whether the given FunctionTerm_t structure's resultLevel is set.

Parameters
ftthe FunctionTerm_t structure to query.
Returns
1 (true) if the "resultLevel" attribute of the given FunctionTerm_t structure is set, 0 (false) otherwise.
int FunctionTerm_setMath ( FunctionTerm_t ft,
const ASTNode_t math 
)

Sets the value of the "math" element of this FunctionTerm_t.

Parameters
ftthe FunctionTerm_t structure.
mathASTNode_t value of the "math" element to be set.
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 FunctionTerm_setResultLevel ( FunctionTerm_t ft,
int  resultLevel 
)

Sets the "resultLevel" attribute of the given FunctionTerm_t structure.

Parameters
ftthe FunctionTerm_t structure.
resultLevelthe value of resultLevel to assign to the "resultLevel" 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:
int FunctionTerm_unsetMath ( FunctionTerm_t ft)

Unsets the value of the "math" element of this FunctionTerm_t.

Parameters
ftthe FunctionTerm_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:
int FunctionTerm_unsetResultLevel ( FunctionTerm_t ft)

Unsets the "resultLevel" attribute of the given FunctionTerm_t structure.

Parameters
ftthe FunctionTerm_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:
FunctionTerm_t * ListOfFunctionTerms_getById ( ListOf_t lo,
const char *  sid 
)

Return the FunctionTerm_t indicated by the given sid.

Parameters
lothe ListOf_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.