Compartment.h File Reference

Detailed Description

Definitions of Compartment and ListOfCompartments.

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

Functions

Compartment_t * Compartment_clone (const Compartment_t *c)
 Creates a deep copy of the given Compartment_t structure.
Compartment_t * Compartment_create (unsigned int level, unsigned int version)
Compartment_t * Compartment_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new Compartment_t structure using the given SBMLNamespaces_t structure.
void Compartment_free (Compartment_t *c)
 Frees the given Compartment_t structure.
const char * Compartment_getCompartmentType (const Compartment_t *c)
 Get the compartment type of this Compartment, as indicated by the Compartment_t structure's "compartmentType" attribute.
int Compartment_getConstant (const Compartment_t *c)
 Get the value of the "constant" attribute of this Compartment.
UnitDefinition_t * Compartment_getDerivedUnitDefinition (Compartment_t *c)
 Constructs and returns a UnitDefinition_t structure that expresses the units of this Compartment_t structure.
const char * Compartment_getId (const Compartment_t *c)
 Takes a Compartment_t structure and returns its identifier.
const char * Compartment_getName (const Compartment_t *c)
 Takes a Compartment_t structure and returns its name.
const XMLNamespaces_t * Compartment_getNamespaces (Compartment_t *c)
 Returns a list of XMLNamespaces_t associated with this Compartment_t structure.
const char * Compartment_getOutside (const Compartment_t *c)
 Get the identifier, if any, of the compartment that is designated as being outside of this one.
double Compartment_getSize (const Compartment_t *c)
 Get the size of this Compartment.
unsigned int Compartment_getSpatialDimensions (const Compartment_t *c)
 Get the number of spatial dimensions of this Compartment_t structure.
double Compartment_getSpatialDimensionsAsDouble (const Compartment_t *c)
 Get the number of spatial dimensions of this Compartment_t structure.
const char * Compartment_getUnits (const Compartment_t *c)
 Get the units of this compartment's size or volume.
double Compartment_getVolume (const Compartment_t *c)
 (For SBML Level 1) Get the volume of this Compartment
int Compartment_hasRequiredAttributes (Compartment_t *c)
 Predicate returning true or false depending on whether all the required attributes for this Compartment object have been set.
void Compartment_initDefaults (Compartment_t *c)
 Initializes the attributes of this Compartment_t structure to their defaults.
int Compartment_isSetCompartmentType (const Compartment_t *c)
 Predicate returning true or false depending on whether the given Compartment_t structures's "compartmentType" attribute is set.
int Compartment_isSetConstant (const Compartment_t *c)
 Predicate returning true or false depending on whether the given Compartment_t structure's "constant" attribute is set.
int Compartment_isSetId (const Compartment_t *c)
 Predicate indicating whether the identifier of the given Compartment_t structure is set.
int Compartment_isSetName (const Compartment_t *c)
 Predicate indicating whether the name of the given Compartment_t structure is set.
int Compartment_isSetOutside (const Compartment_t *c)
 Predicate returning true or false depending on whether the given Compartment_t structure's "outside" attribute is set.
int Compartment_isSetSize (const Compartment_t *c)
 Predicate returning true or false depending on whether the given Compartment_t structure's "size" attribute is set.
int Compartment_isSetSpatialDimensions (const Compartment_t *c)
 Predicate returning true or false depending on whether the given Compartment_t structure's "spatialDimensions" attribute is set.
int Compartment_isSetUnits (const Compartment_t *c)
 Predicate returning true or false depending on whether the given Compartment_t structures's "units" attribute is set.
int Compartment_isSetVolume (const Compartment_t *c)
 (For SBML Level 1) Predicate returning true or false depending on whether the given Compartment_t structures's "volume" attribute is set.
int Compartment_setCompartmentType (Compartment_t *c, const char *sid)
 Sets the "compartmentType" attribute of the given Compartment_t structure.
int Compartment_setConstant (Compartment_t *c, int value)
 Sets the value of the "constant" attribute of the given Compartment_t structure.
int Compartment_setId (Compartment_t *c, const char *sid)
 Sets the identifier of the given Compartment_t structure.
int Compartment_setName (Compartment_t *c, const char *string)
 Sets the name of the given Compartment_t structure.
int Compartment_setOutside (Compartment_t *c, const char *sid)
 Sets the "outside" attribute of the given Compartment_t structure.
int Compartment_setSize (Compartment_t *c, double value)
 Sets the "size" attribute (or "volume" in SBML Level 1) of the given Compartment_t structure.
int Compartment_setSpatialDimensions (Compartment_t *c, unsigned int value)
 Sets the "spatialDimensions" attribute of the given Compartment_t structure.
int Compartment_setSpatialDimensionsAsDouble (Compartment_t *c, double value)
 Sets the "spatialDimensions" attribute of the given Compartment_t structure.
int Compartment_setUnits (Compartment_t *c, const char *sid)
 Sets the "units" attribute of the given Compartment_t structure.
int Compartment_setVolume (Compartment_t *c, double value)
 Sets the "volume" attribute (or "size" in SBML Level 2) of the givenq Compartment_t structure.
int Compartment_unsetCompartmentType (Compartment_t *c)
 Unsets the value of the "compartmentType" attribute of the given Compartment_t structure.
int Compartment_unsetName (Compartment_t *c)
 Unsets the name of the given Compartment_t structure.
int Compartment_unsetOutside (Compartment_t *c)
 Unsets the value of the "outside" attribute of the given Compartment_t structure.
int Compartment_unsetSize (Compartment_t *c)
 Unsets the value of the "size" attribute of the given Compartment_t structure.
int Compartment_unsetSpatialDimensions (Compartment_t *c)
 Unsets the value of the "spatialDimensions" attribute of the given Compartment_t structure.
int Compartment_unsetUnits (Compartment_t *c)
 Unsets the value of the "units" attribute of the given Compartment_t structure.
int Compartment_unsetVolume (Compartment_t *c)
 (For SBML Level 1) Unsets the value of the "volume" attribute of the given Compartment_t structure.
Compartment_t * ListOfCompartments_getById (ListOf_t *lo, const char *sid)
Compartment_t * ListOfCompartments_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

Compartment_t* Compartment_clone ( const Compartment_t *  c)

Creates a deep copy of the given Compartment_t structure.

Parameters:
pthe Compartment_t structure to be copied
Returns:
a (deep) copy of the given Compartment_t structure.
Compartment_t* Compartment_create ( unsigned int  level,
unsigned int  version 
)
;

Compartment_t* Compartment_createWithNS ( SBMLNamespaces_t *  sbmlns)

Creates a new Compartment_t structure using the given SBMLNamespaces_t structure.

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

Frees the given Compartment_t structure.

Parameters:
cthe Compartment_t structure to be freed.
const char* Compartment_getCompartmentType ( const Compartment_t *  c)

Get the compartment type of this Compartment, as indicated by the Compartment_t structure's "compartmentType" attribute.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "compartmentType" attribute of the Compartment_t structure c as a string.
int Compartment_getConstant ( const Compartment_t *  c)

Get the value of the "constant" attribute of this Compartment.

Parameters:
cthe Compartment_t structure
Returns:
true if the Compartment_t structure's size is flagged as being constant, false otherwise.
UnitDefinition_t* Compartment_getDerivedUnitDefinition ( Compartment_t *  c)

Constructs and returns a UnitDefinition_t structure that expresses the units of this Compartment_t structure.

Parameters:
cthe Compartment_t structure whose units are to be returned.
Returns:
a UnitDefinition_t structure that expresses the units of this Compartment_t strucuture.
Note:
This function returns the units of the Compartment_t expressed as a UnitDefinition_t. The units may be those explicitly declared or those derived from the default units of the Model_t containing this Compartment_t.

Note that the functionality that facilitates unit analysis depends on the model as a whole. Thus, in cases where the object has not been added to a model or the model itself is incomplete, unit analysis is not possible and this method will return NULL.

const char* Compartment_getId ( const Compartment_t *  c)

Takes a Compartment_t structure and returns its identifier.

Parameters:
cthe Compartment_t structure whose identifier is sought
Returns:
the identifier of the Compartment_t structure c, as a pointer to a string.
const char* Compartment_getName ( const Compartment_t *  c)

Takes a Compartment_t structure and returns its name.

Parameters:
cthe Compartment_t whose name is sought.
Returns:
the name of the Compartment_t structure c, as a pointer to a string.
const XMLNamespaces_t* Compartment_getNamespaces ( Compartment_t *  c)

Returns a list of XMLNamespaces_t associated with this Compartment_t structure.

Parameters:
cthe Compartment_t structure
Returns:
pointer to the XMLNamespaces_t structure associated with this SBML object
const char* Compartment_getOutside ( const Compartment_t *  c)

Get the identifier, if any, of the compartment that is designated as being outside of this one.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "outside" attribute of the Compartment_t structure c.
double Compartment_getSize ( const Compartment_t *  c)

Get the size of this Compartment.

This method is identical to Compartment_getVolume(). In SBML Level 1, compartments are always three-dimensional constructs and only have volumes, whereas in SBML Level 2, compartments may be other than three-dimensional and therefore the "volume" attribute is named "size" in Level 2. LibSBML provides both Compartment_getSize() and Compartment_getVolume() for easier compatibility between SBML Levels.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "size" attribute ("volume" in Level 1) of the Compartment_t structure c as a float-point number.
See also:
Compartment_isSetSize()
unsigned int Compartment_getSpatialDimensions ( const Compartment_t *  c)

Get the number of spatial dimensions of this Compartment_t structure.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "spatialDimensions" attribute of the Compartment_t structure c as an unsigned integer
double Compartment_getSpatialDimensionsAsDouble ( const Compartment_t *  c)

Get the number of spatial dimensions of this Compartment_t structure.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "spatialDimensions" attribute of the Compartment_t structure c as a double
const char* Compartment_getUnits ( const Compartment_t *  c)

Get the units of this compartment's size or volume.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "units" attribute of the Compartment_t structure c.
double Compartment_getVolume ( const Compartment_t *  c)

(For SBML Level 1) Get the volume of this Compartment

This method is identical to Compartment_getSize(). In SBML Level 1, compartments are always three-dimensional constructs and only have volumes, whereas in SBML Level 2, compartments may be other than three-dimensional and therefore the "volume" attribute is named "size" in Level 2. LibSBML provides both Compartment_getSize() and Compartment_getVolume() for easier compatibility between SBML Levels.

Parameters:
cthe Compartment_t structure
Returns:
the value of the "volume" attribute ("size" in Level 2) of the Compartment_t structure c, as a floating-point number.
See also:
Compartment_isSetVolume()
int Compartment_hasRequiredAttributes ( Compartment_t *  c)

Predicate returning true or false depending on whether all the required attributes for this Compartment object have been set.

Parameters:
cthe Compartment_t structure to check.
Note:
The required attributes for a Compartment object are:
  • id (name in L1)
  • constant (in L3 only)
Returns:
a true if all the required attributes for this object have been defined, false otherwise.
void Compartment_initDefaults ( Compartment_t *  c)

Initializes the attributes of this Compartment_t structure to their defaults.

The exact results depends on the SBML Level and Version in use. The cases are currently the following:

  • (SBML Level 1 only) sets attribute "volume" to 1.0
  • (SBML Level 2 only) sets attribute "spatialDimensions" to 3
  • (SBML Level 2 only) sets attribute "constant" to 1 (true)
Parameters:
pthe Compartment_t structure to initialize
int Compartment_isSetCompartmentType ( const Compartment_t *  c)

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

Parameters:
cthe Compartment_t structure
Returns:
true if the "compartmentType" attribute of the Compartment_t structure c is set, false otherwise.
int Compartment_isSetConstant ( const Compartment_t *  c)

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

Parameters:
cthe Compartment_t structure
Returns:
true if the "constant" attribute of the Compartment_t structure c is set, false otherwise.
int Compartment_isSetId ( const Compartment_t *  c)

Predicate indicating whether the identifier of the given Compartment_t structure is set.

Parameters:
cthe Compartment_t structure
Returns:
true (non-zero) if the "id" attribute of the Compartment_t structure c is set, false (0) otherwise.
int Compartment_isSetName ( const Compartment_t *  c)

Predicate indicating whether the name of the given Compartment_t structure is set.

Parameters:
cthe Compartment_t structure
Returns:
true (non-zero) if the "name" attribute of the Compartment_t structure c is set, false (0) otherwise.
int Compartment_isSetOutside ( const Compartment_t *  c)

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

Parameters:
cthe Compartment_t structure
Returns:
true if the "outside" attribute of the Compartment_t structure c is set, false otherwise.
int Compartment_isSetSize ( const Compartment_t *  c)

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

This method is similar but not identical to Compartment_isSetVolume(). The latter should be used in the context of SBML Level 1 models instead of Compartment_isSetSize() because Compartment_isSetVolume() performs extra processing to take into account the difference in default values between SBML Levels 1 and 2.

Parameters:
cthe Compartment_t structure
Returns:
true if the "size" attribute ("volume" in Level) of the Compartment_t structure c is set, false otherwise.
See also:
Compartment_isSetVolume(), Compartment_setSize()
int Compartment_isSetSpatialDimensions ( const Compartment_t *  c)

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

Parameters:
cthe Compartment_t structure
Returns:
true if the "spatialDimensions" attribute of the Compartment_t structure c is set, false otherwise.
int Compartment_isSetUnits ( const Compartment_t *  c)

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

Parameters:
cthe Compartment_t structure
Returns:
true if the "units" attribute of the Compartment_t structure c is set, false otherwise.
int Compartment_isSetVolume ( const Compartment_t *  c)

(For SBML Level 1) Predicate returning true or false depending on whether the given Compartment_t structures's "volume" attribute is set.

This method is similar but not identical to Compartment_isSetSize(). The latter should not be used in the context of SBML Level 1 models because this method (Compartment_isSetVolume()) performs extra processing to take into account the difference in default values between SBML Levels 1 and 2.

Parameters:
cthe Compartment_t structure
Returns:
true if the "volume" attribute ("size" in L2) of the given Compartment_t structure c is set, false otherwise.
See also:
Compartment_isSetSize(), Compartment_setVolume()
Note:
In SBML Level 1, a compartment's volume has a default value (1.0) and therefore this method will always return true. In Level 2, a compartment's size (the equivalent of SBML Level 1's "volume") is optional and has no default value, and therefore may or may not be set.
int Compartment_setCompartmentType ( Compartment_t *  c,
const char *  sid 
)

Sets the "compartmentType" attribute of the given Compartment_t structure.

This function copies the string given in string. If the string is NULL, this function performs unsetName() instead.

Parameters:
cthe Compartment_t structure
sid,theidentifier of a CompartmentType object defined elsewhere in the enclosing Model_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_ATTRIBUTE_VALUE
  • LIBSBML_UNEXPECTED_ATTRIBUTE
Note:
Using this function with an id of NULL is equivalent to unsetting the "compartmentType" attribute.
int Compartment_setConstant ( Compartment_t *  c,
int  value 
)

Sets the value of the "constant" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_t structure
valuean integer indicating whether the size/volume of the compartment c should be considered constant (nonzero) or variable (zero).
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_UNEXPECTED_ATTRIBUTE
int Compartment_setId ( Compartment_t *  c,
const char *  sid 
)

Sets the identifier of the given Compartment_t structure.

This function copies the string given in sid. If the string is NULL, this function performs unsetId() instead.

Parameters:
cthe Compartment_t structure.
sidthe identifier to which the structures "id" attribute should 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:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INVALID_ATTRIBUTE_VALUE
Note:
Using this function with an id of NULL is equivalent to unsetting the "id" attribute.
int Compartment_setName ( Compartment_t *  c,
const char *  name 
)

Sets the name of the given Compartment_t structure.

This function copies the string given in string. If the string is NULL, this function performs unsetName() instead.

Parameters:
cthe Compartment_t structure
stringthe identifier to which the structures "id" attribute should 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:
  • 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 Compartment_setOutside ( Compartment_t *  c,
const char *  sid 
)

Sets the "outside" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_t structure
sidthe identifier of a compartment that encloses this one. The string will be copied.
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 "outside" attribute.
int Compartment_setSize ( Compartment_t *  c,
double  value 
)

Sets the "size" attribute (or "volume" in SBML Level 1) of the given Compartment_t structure.

This method is identical to Compartment_setVolume() and is provided for compatibility between SBML Level 1 and Level 2.

Parameters:
cthe Compartment_t structure
valuea double representing the size of the given Compartment_t structure in whatever units are in effect
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
int Compartment_setSpatialDimensions ( Compartment_t *  c,
unsigned int  value 
)

Sets the "spatialDimensions" attribute of the given Compartment_t structure.

If value is not one of 0, 1, 2, or 3, this method will have no effect (i.e., the "spatialDimensions" attribute will not be set).

Parameters:
cthe Compartment_t structure
valuean unsigned integer indicating the number of dimensions of the given compartment.
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
  • LIBSBML_UNEXPECTED_ATTRIBUTE
int Compartment_setSpatialDimensionsAsDouble ( Compartment_t *  c,
double  value 
)

Sets the "spatialDimensions" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_t structure
valuea double indicating the number of dimensions of the given compartment.
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
  • LIBSBML_UNEXPECTED_ATTRIBUTE
int Compartment_setUnits ( Compartment_t *  c,
const char *  sid 
)

Sets the "units" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_t structure
sidthe identifier of the defined units to use. The string will be copied.
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 "units" attribute.
int Compartment_setVolume ( Compartment_t *  c,
double  value 
)

Sets the "volume" attribute (or "size" in SBML Level 2) of the givenq Compartment_t structure.

This method is identical to setVolume() and is provided for compatibility between SBML Level 1 and Level 2.

Parameters:
cthe Compartment_t structure
valuea double representing the volume of the given Compartment_t structure in whatever units are in effect
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
int Compartment_unsetCompartmentType ( Compartment_t *  c)

Unsets the value of the "compartmentType" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_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
int Compartment_unsetName ( Compartment_t *  c)

Unsets the name of the given Compartment_t structure.

Parameters:
cthe Compartment_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
int Compartment_unsetOutside ( Compartment_t *  c)

Unsets the value of the "outside" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_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
int Compartment_unsetSize ( Compartment_t *  c)

Unsets the value of the "size" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_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
int Compartment_unsetSpatialDimensions ( Compartment_t *  c)

Unsets the value of the "spatialDimensions" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_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
int Compartment_unsetUnits ( Compartment_t *  c)

Unsets the value of the "units" attribute of the given Compartment_t structure.

Parameters:
cthe Compartment_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
int Compartment_unsetVolume ( Compartment_t *  c)

(For SBML Level 1) Unsets the value of the "volume" attribute of the given Compartment_t structure.

In SBML Level 1, a Compartment_t structure's "volume" attribute has a default value (1.0) and therefore should always be set. In Level 2, "size" is optional with no default value and as such may or may not be set.

Parameters:
cthe Compartment_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
Compartment_t* ListOfCompartments_getById ( ListOf_t *  lo,
const char *  sid 
)
Returns:
item in this ListOfCompartment with the given id or NULL if no such item exists.
Compartment_t* ListOfCompartments_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