FunctionDefinition.h File Reference

Detailed Description

Definitions of FunctionDefinition and ListOfFunctionDefinitions.

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

Functions

FunctionDefinition_t * FunctionDefinition_clone (const FunctionDefinition_t *c)
 Creates a deep copy of the given FunctionDefinition_t structure.
FunctionDefinition_t * FunctionDefinition_create (unsigned int level, unsigned int version)
 Creates a new FunctionDefinition_t structure using the given SBML level and version values.
FunctionDefinition_t * FunctionDefinition_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new FunctionDefinition_t structure using the given SBMLNamespaces_t structure.
void FunctionDefinition_free (FunctionDefinition_t *fd)
 Frees the given FunctionDefinition.
const ASTNode_t * FunctionDefinition_getArgument (const FunctionDefinition_t *fd, unsigned int n)
 Get the nth argument (bound variable) to the given FunctionDefinition_t structure.
const ASTNode_t * FunctionDefinition_getArgumentByName (FunctionDefinition_t *fd, const char *name)
 Get the argument named name to the given FunctionDefinition_t structure.
const ASTNode_t * FunctionDefinition_getBody (const FunctionDefinition_t *fd)
 Get the mathematical expression that constitutes the body of the given function definition.
const char * FunctionDefinition_getId (const FunctionDefinition_t *fd)
 Get the identifier of the given FunctionDefinition_t structure.
const ASTNode_t * FunctionDefinition_getMath (const FunctionDefinition_t *fd)
 Get the mathematical formula implemented by the given function.
const char * FunctionDefinition_getName (const FunctionDefinition_t *fd)
 Get the name of the given FunctionDefinition_t structure.
const XMLNamespaces_t * FunctionDefinition_getNamespaces (FunctionDefinition_t *c)
 Returns a list of XMLNamespaces_t associated with this FunctionDefinition_t structure.
unsigned int FunctionDefinition_getNumArguments (const FunctionDefinition_t *fd)
 Get the number of arguments that the given function definition takes.
int FunctionDefinition_isSetId (const FunctionDefinition_t *fd)
 Predicate returning true or false depending on whether the given Compartment_t structure's "id" attribute is set.
int FunctionDefinition_isSetMath (const FunctionDefinition_t *fd)
 Predicate returning true or false depending on whether the given Compartment_t structure's "math" subelement is set.
int FunctionDefinition_isSetName (const FunctionDefinition_t *fd)
 Predicate returning true or false depending on whether the given Compartment_t structure's "name" attribute is set.
int FunctionDefinition_setId (FunctionDefinition_t *fd, const char *sid)
 Sets the value of the "id" attribute of a FunctionDefinition_t structure.
int FunctionDefinition_setMath (FunctionDefinition_t *fd, const ASTNode_t *math)
 Sets the "math" subelement of a given FunctionDefinition_t structure.
int FunctionDefinition_setName (FunctionDefinition_t *fd, const char *name)
 Sets the value of the "name" attribute of a FunctionDefinition_t structure.
int FunctionDefinition_unsetName (FunctionDefinition_t *fd)
 Unsets the "name" attribute of the given FunctionDefinition_t structure.
FunctionDefinition_t * ListOfFunctionDefinitions_getById (ListOf_t *lo, const char *sid)
FunctionDefinition_t * ListOfFunctionDefinitions_removeById (ListOf_t *lo, const char *sid)
 Removes item in this ListOf items with the given id or NULL if no such item exists.

Function Documentation

FunctionDefinition_t* FunctionDefinition_clone ( const FunctionDefinition_t *  fd)

Creates a deep copy of the given FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure to be copied
Returns:
a (deep) copy of the given FunctionDefinition_t structure.
FunctionDefinition_t* FunctionDefinition_create ( unsigned int  level,
unsigned int  version 
)

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

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

Creates a new FunctionDefinition_t structure using the given SBMLNamespaces_t structure.

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

Frees the given FunctionDefinition.

Parameters:
fdthe FunctionDefinition_t structure
const ASTNode_t* FunctionDefinition_getArgument ( const FunctionDefinition_t *  fd,
unsigned int  n 
)

Get the nth argument (bound variable) to the given FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure
nthe index of the argument to return
Returns:
an ASTNode_t tree structure for the argument.
const ASTNode_t* FunctionDefinition_getArgumentByName ( FunctionDefinition_t *  fd,
const char *  name 
)

Get the argument named name to the given FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure
namethe exact name (case-sensitive) of the sought-after argument
Returns:
an ASTNode_t structure representing the argument (bound variable)
const ASTNode_t* FunctionDefinition_getBody ( const FunctionDefinition_t *  fd)

Get the mathematical expression that constitutes the body of the given function definition.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
an ASTNode_t tree that is the "math" subelement" of this FunctionDefinition_t structure
const char* FunctionDefinition_getId ( const FunctionDefinition_t *  fd)

Get the identifier of the given FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
the value of the "id" attribute of this FunctionDefinition_t structure.
const ASTNode_t* FunctionDefinition_getMath ( const FunctionDefinition_t *  fd)

Get the mathematical formula implemented by the given function.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
an ASTNode_t tree representing the mathematical formula of this FunctionDefinition_t structure.
const char* FunctionDefinition_getName ( const FunctionDefinition_t *  fd)

Get the name of the given FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
the name of this FunctionDefinition_t structure.
const XMLNamespaces_t* FunctionDefinition_getNamespaces ( FunctionDefinition_t *  fd)

Returns a list of XMLNamespaces_t associated with this FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
unsigned int FunctionDefinition_getNumArguments ( const FunctionDefinition_t *  fd)

Get the number of arguments that the given function definition takes.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
the number of arguments (bound variables) that must be passed to this FunctionDefinition_t structure.
int FunctionDefinition_isSetId ( const FunctionDefinition_t *  fd)

Predicate returning true or false depending on whether the given Compartment_t structure's "id" attribute is set.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
nonzero if the "id" attribute of the FunctionDefinition_t structure is set, zero (0) otherwise.
int FunctionDefinition_isSetMath ( const FunctionDefinition_t *  fd)

Predicate returning true or false depending on whether the given Compartment_t structure's "math" subelement is set.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
nonzero if the mathematical expression of this FunctionDefinition is set, zero (0) otherwise.
int FunctionDefinition_isSetName ( const FunctionDefinition_t *  fd)

Predicate returning true or false depending on whether the given Compartment_t structure's "name" attribute is set.

Parameters:
fdthe FunctionDefinition_t structure
Returns:
nonzero if the "name" attribute of the FunctionDefinition_t structure is set, zero (0) otherwise.
int FunctionDefinition_setId ( FunctionDefinition_t *  fd,
const char *  sid 
)

Sets the value of the "id" attribute of a FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure to set.
sidthe identifier to assign to the "id" attribute of fd
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
Note:
Using this function with an id of NULL is equivalent to unsetting the "id" attribute.
int FunctionDefinition_setMath ( FunctionDefinition_t *  fd,
const ASTNode_t *  math 
)

Sets the "math" subelement of a given FunctionDefinition_t structure.

The ASTNode_t structure given in math is copied.

Parameters:
fdthe FunctionDefinition_t structure to set.
maththe ASTNode_t structure to copy and assign to the "math" subelement of the given FunctionDefinition_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_INVALID_OBJECT
int FunctionDefinition_setName ( FunctionDefinition_t *  fd,
const char *  name 
)

Sets the value of the "name" attribute of a FunctionDefinition_t structure.

Parameters:
fdthe FunctionDefinition_t structure to set.
namethe identifier to assign to the "name" attribute of fd
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
Note:
Using this function with the name set to NULL is equivalent to unsetting the "name" attribute.
int FunctionDefinition_unsetName ( FunctionDefinition_t *  fd)

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

Parameters:
fdthe FunctionDefinition_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
FunctionDefinition_t* ListOfFunctionDefinitions_getById ( ListOf_t *  lo,
const char *  sid 
)
Returns:
item in this ListOfFunctionDefinition with the given id or NULL if no such item exists.
FunctionDefinition_t* ListOfFunctionDefinitions_removeById ( ListOf_t *  lo,
const char *  sid 
)

Removes item in this ListOf items with the given id or NULL if no such item exists.

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

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines