Definitions of Compartment and ListOfCompartments.


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. | |
| Compartment_t* Compartment_clone | ( | const Compartment_t * | c | ) |
Creates a deep copy of the given Compartment_t structure.
| p | the Compartment_t structure to be copied |
| 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.
| sbmlns | SBMLNamespaces, a pointer to an SBMLNamespaces structure to assign to this Compartment |
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.
| c | the 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.
| c | 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.
| c | the Compartment_t structure |
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.
| c | the Compartment_t structure whose units are to be returned. |
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.
| c | the Compartment_t structure whose identifier is sought |
c, as a pointer to a string. | const char* Compartment_getName | ( | const Compartment_t * | c | ) |
Takes a Compartment_t structure and returns its name.
| c | the Compartment_t whose name is sought. |
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.
| c | the 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.
| c | 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.
| c | the Compartment_t structure |
c as a float-point number.| unsigned int Compartment_getSpatialDimensions | ( | const Compartment_t * | c | ) |
Get the number of spatial dimensions of this Compartment_t structure.
| c | 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.
| c | 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.
| c | 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.
| c | the Compartment_t structure |
c, as a floating-point number.| 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.
| c | the Compartment_t structure to check. |
| 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:
1.0 3 1 (true)| p | the 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.
| c | the Compartment_t structure |
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.
| c | the Compartment_t structure |
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.
| c | 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.
| c | 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.
| c | the Compartment_t structure |
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.
| c | the Compartment_t structure |
true if the "size" attribute ("volume" in Level) of the Compartment_t structure c is set, false otherwise.| 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.
| c | the Compartment_t structure |
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.
| c | the Compartment_t structure |
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.
| c | the Compartment_t structure |
true if the "volume" attribute ("size" in L2) of the given Compartment_t structure c is set, false otherwise.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.
| c | the Compartment_t structure |
| sid,the | identifier of a CompartmentType object defined elsewhere in the enclosing Model_t structure. |
| int Compartment_setConstant | ( | Compartment_t * | c, |
| int | value | ||
| ) |
Sets the value of the "constant" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| value | an integer indicating whether the size/volume of the compartment c should be considered constant (nonzero) or variable (zero). |
| 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.
| c | the Compartment_t structure. |
| sid | the identifier to which the structures "id" attribute should be set. |
| 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.
| c | the Compartment_t structure |
| string | the identifier to which the structures "id" attribute should be set. |
| int Compartment_setOutside | ( | Compartment_t * | c, |
| const char * | sid | ||
| ) |
Sets the "outside" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| sid | the identifier of a compartment that encloses this one. The string will be copied. |
| 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.
| c | the Compartment_t structure |
| value | a double representing the size of the given Compartment_t structure in whatever units are in effect |
| 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).
| c | the Compartment_t structure |
| value | an unsigned integer indicating the number of dimensions of the given compartment. |
| int Compartment_setSpatialDimensionsAsDouble | ( | Compartment_t * | c, |
| double | value | ||
| ) |
Sets the "spatialDimensions" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| value | a double indicating the number of dimensions of the given compartment. |
| int Compartment_setUnits | ( | Compartment_t * | c, |
| const char * | sid | ||
| ) |
Sets the "units" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| sid | the identifier of the defined units to use. The string will be copied. |
| 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.
| c | the Compartment_t structure |
| value | a double representing the volume of the given Compartment_t structure in whatever units are in effect |
| int Compartment_unsetCompartmentType | ( | Compartment_t * | c | ) |
Unsets the value of the "compartmentType" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| int Compartment_unsetName | ( | Compartment_t * | c | ) |
Unsets the name of the given Compartment_t structure.
| c | the Compartment_t structure |
| int Compartment_unsetOutside | ( | Compartment_t * | c | ) |
Unsets the value of the "outside" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| int Compartment_unsetSize | ( | Compartment_t * | c | ) |
Unsets the value of the "size" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| int Compartment_unsetSpatialDimensions | ( | Compartment_t * | c | ) |
Unsets the value of the "spatialDimensions" attribute of the given Compartment_t structure.
| c | the Compartment_t structure |
| int Compartment_unsetUnits | ( | Compartment_t * | c | ) |
Unsets the value of the "units" attribute of the given Compartment_t structure.
| c | the 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.
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.
| c | the Compartment_t structure |
| Compartment_t* ListOfCompartments_getById | ( | ListOf_t * | lo, |
| const char * | sid | ||
| ) |
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.