CompartmentType.h File Reference

Detailed Description

Definitions of CompartmentType and ListOfCompartmentTypes.

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

Functions

CompartmentType_t * CompartmentType_clone (const CompartmentType_t *ct)
 Creates a deep copy of the given CompartmentType_t structure.
CompartmentType_t * CompartmentType_create (unsigned int level, unsigned int version)
 Creates a new CompartmentType_t structure using the given SBML level and version values.
CompartmentType_t * CompartmentType_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new CompartmentType_t structure using the given SBMLNamespaces_t structure.
void CompartmentType_free (CompartmentType_t *ct)
 Frees the given CompartmentType_t structure.
const char * CompartmentType_getId (const CompartmentType_t *ct)
 Takes a CompartmentType_t structure and returns its identifier.
const char * CompartmentType_getName (const CompartmentType_t *ct)
 Takes a CompartmentType_t structure and returns its name.
const XMLNamespaces_t * CompartmentType_getNamespaces (CompartmentType_t *c)
 Returns a list of XMLNamespaces_t associated with this CompartmentType_t structure.
int CompartmentType_isSetId (const CompartmentType_t *ct)
 Predicate returning true or false depending on whether the given CompartmentType_t structure's identifier is set.
int CompartmentType_isSetName (const CompartmentType_t *ct)
 Predicate returning true or false depending on whether the given CompartmentType_t structure's name is set.
int CompartmentType_setId (CompartmentType_t *ct, const char *sid)
 Assigns the identifier of a CompartmentType_t structure.
int CompartmentType_setName (CompartmentType_t *ct, const char *name)
 Assign the name of a CompartmentType_t structure.
int CompartmentType_unsetName (CompartmentType_t *ct)
 Unsets the name of a CompartmentType.
CompartmentType_t * ListOfCompartmentTypes_getById (ListOf_t *lo, const char *sid)
CompartmentType_t * ListOfCompartmentTypes_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

CompartmentType_t* CompartmentType_clone ( const CompartmentType_t *  ct)

Creates a deep copy of the given CompartmentType_t structure.

Parameters:
ctthe CompartmentType_t structure to be copied
Returns:
a (deep) copy of this CompartmentType_t structure.
CompartmentType_t* CompartmentType_create ( unsigned int  level,
unsigned int  version 
)

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

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

Creates a new CompartmentType_t structure using the given SBMLNamespaces_t structure.

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

Frees the given CompartmentType_t structure.

Parameters:
ctthe CompartmentType_t structure to be freed.
const char* CompartmentType_getId ( const CompartmentType_t *  ct)

Takes a CompartmentType_t structure and returns its identifier.

Parameters:
ctthe CompartmentType_t structure whose identifier is sought
Returns:
the identifier of this CompartmentType_t, as a pointer to a string.
const char* CompartmentType_getName ( const CompartmentType_t *  ct)

Takes a CompartmentType_t structure and returns its name.

Parameters:
ctthe CompartmentType_t whose name is sought.
Returns:
the name of this CompartmentType_t, as a pointer to a string.
const XMLNamespaces_t* CompartmentType_getNamespaces ( CompartmentType_t *  ct)

Returns a list of XMLNamespaces_t associated with this CompartmentType_t structure.

Parameters:
ctthe CompartmentType_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
int CompartmentType_isSetId ( const CompartmentType_t *  ct)

Predicate returning true or false depending on whether the given CompartmentType_t structure's identifier is set.

Parameters:
ctthe CompartmentType_t structure to query
Returns:
non-zero (true) if the "id" field of the given CompartmentType is set, zero (false) otherwise.
int CompartmentType_isSetName ( const CompartmentType_t *  ct)

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

Parameters:
ctthe CompartmentType_t structure to query
Returns:
non-zero (true) if the "name" field of the given CompartmentType is set, zero (false) otherwise.
int CompartmentType_setId ( CompartmentType_t *  ct,
const char *  sid 
)

Assigns the identifier of a CompartmentType_t structure.

This makes a copy of the string passed as the argument sid.

Parameters:
ctthe CompartmentType_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:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE
Note:
Using this function with an id of NULL is equivalent to unsetting the "id" attribute.
int CompartmentType_setName ( CompartmentType_t *  ct,
const char *  name 
)

Assign the name of a CompartmentType_t structure.

This makes a copy of the string passed as the argument name.

Parameters:
ctthe CompartmentType_t structure to set.
namethe string to use as the name.
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 CompartmentType_unsetName ( CompartmentType_t *  ct)

Unsets the name of a CompartmentType.

Parameters:
ctthe CompartmentType_t structure whose name is to be 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:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_OPERATION_FAILED
CompartmentType_t* ListOfCompartmentTypes_getById ( ListOf_t *  lo,
const char *  sid 
)
Returns:
item in this ListOfCompartmentType with the given id or NULL if no such item exists.
CompartmentType_t* ListOfCompartmentTypes_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