SpeciesType.cpp File Reference

Detailed Description

Implementation of SpeciesType and ListOfSpeciesTypes.

Author:
Ben Bornstein
Include dependency graph for SpeciesType.cpp:

Functions

SpeciesType_t * ListOfSpeciesTypes_getById (ListOf_t *lo, const char *sid)
SpeciesType_t * ListOfSpeciesTypes_removeById (ListOf_t *lo, const char *sid)
 Removes item in this ListOf items with the given id or NULL if no such item exists.
SpeciesType_t * SpeciesType_clone (const SpeciesType_t *st)
 Creates a deep copy of the given SpeciesType_t structure.
SpeciesType_t * SpeciesType_create (unsigned int level, unsigned int version)
 Creates a new SpeciesType_t structure using the given SBML level and version values.
SpeciesType_t * SpeciesType_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new SpeciesType_t structure using the given SBMLNamespaces_t structure.
void SpeciesType_free (SpeciesType_t *st)
 Frees the given SpeciesType_t structure.
const char * SpeciesType_getId (const SpeciesType_t *st)
 Takes a SpeciesType_t structure and returns its identifier.
const char * SpeciesType_getName (const SpeciesType_t *st)
 Takes a SpeciesType_t structure and returns its name.
const XMLNamespaces_t * SpeciesType_getNamespaces (SpeciesType_t *st)
 Returns a list of XMLNamespaces_t associated with this SpeciesType_t structure.
int SpeciesType_isSetId (const SpeciesType_t *st)
 Predicate returning true or false depending on whether the given SpeciesType_t structure's identifier is set.
int SpeciesType_isSetName (const SpeciesType_t *st)
 Predicate returning true or false depending on whether the given SpeciesType_t structure's name is set.
int SpeciesType_setId (SpeciesType_t *st, const char *sid)
 Assigns the identifier of a SpeciesType_t structure.
int SpeciesType_setName (SpeciesType_t *st, const char *name)
 Assign the name of a SpeciesType_t structure.
int SpeciesType_unsetName (SpeciesType_t *st)
 Unsets the name of a SpeciesType.

Function Documentation

SpeciesType_t* ListOfSpeciesTypes_getById ( ListOf_t *  lo,
const char *  sid 
)
Returns:
item in this ListOfSpeciesType with the given id or NULL if no such item exists.
SpeciesType_t* ListOfSpeciesTypes_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.

SpeciesType_t* SpeciesType_clone ( const SpeciesType_t *  st)

Creates a deep copy of the given SpeciesType_t structure.

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

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

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

Creates a new SpeciesType_t structure using the given SBMLNamespaces_t structure.

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

Frees the given SpeciesType_t structure.

Parameters:
ctthe SpeciesType_t structure to be freed.
const char* SpeciesType_getId ( const SpeciesType_t *  st)

Takes a SpeciesType_t structure and returns its identifier.

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

Takes a SpeciesType_t structure and returns its name.

Parameters:
ctthe SpeciesType_t whose name is sought.
Returns:
the name of this SpeciesType_t, as a pointer to a string.
const XMLNamespaces_t* SpeciesType_getNamespaces ( SpeciesType_t *  st)

Returns a list of XMLNamespaces_t associated with this SpeciesType_t structure.

Parameters:
stthe SpeciesType_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
int SpeciesType_isSetId ( const SpeciesType_t *  st)

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

Parameters:
ctthe SpeciesType_t structure to query
Returns:
non-zero (true) if the "id" field of the given SpeciesType is set, zero (false) otherwise.
int SpeciesType_isSetName ( const SpeciesType_t *  st)

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

Parameters:
ctthe SpeciesType_t structure to query
Returns:
non-zero (true) if the "name" field of the given SpeciesType is set, zero (false) otherwise.
int SpeciesType_setId ( SpeciesType_t *  st,
const char *  sid 
)

Assigns the identifier of a SpeciesType_t structure.

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

Parameters:
ctthe SpeciesType_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 SpeciesType_setName ( SpeciesType_t *  st,
const char *  name 
)

Assign the name of a SpeciesType_t structure.

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

Parameters:
ctthe SpeciesType_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 SpeciesType_unsetName ( SpeciesType_t *  st)

Unsets the name of a SpeciesType.

Parameters:
ctthe SpeciesType_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
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines