libSBML C API
5.18.0
|
The MultiCompartmentPlugin_t object is used to extend the standard SBML Compartment_t base object with an optional "compartmentType" attribute, a required "isType" Boolean attribute, and a child ListOfCompartmentReferences_t. The "isType" attribute flags whether this Compartment_t should be treated as a standard SBML Compartment_t (if false
), or as a more generic rule-based "type" of Compartment_t (if true
). A compartment "type" is a template (in the sense of prototype) for all Compartment_t objects referencing it (via "compartmentType" attributes). A Species_t object directly referencing a compartment type is not a "fully
defined" species, but rather a "template" species. If the value of the "isType" attribute is false
, the Compartment_t object is a "not-a-type" compartment, and it is similar to a SBML core Compartment_t except it can reference a compartment type and can have a ListOfCompartmentReferences_t child. Each child CompartmentReference_t in the ListOfCompartmentReferences_t defines a subcompartment of the parent Compartment_t. The "compartmentType" attribute identifies this Compartment_t as the CompartmentType_t defined elsewhere in the Model_t. If the "compartmentType" attribute is set, the "isType" attribute must be true
.
int MultiCompartmentPlugin_addCompartmentReference | ( | MultiCompartmentPlugin_t * | mcp, |
const CompartmentReference_t * | cr | ||
) |
Adds a copy of the given CompartmentReference_t to this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure to which the CompartmentReference_t should be added. |
cr | the CompartmentReference_t object to add. |
CompartmentReference_t * MultiCompartmentPlugin_createCompartmentReference | ( | MultiCompartmentPlugin_t * | mcp | ) |
Creates a new CompartmentReference_t object, adds it to this MultiCompartmentPlugin_t object and returns the CompartmentReference_t object created.
mcp | the MultiCompartmentPlugin_t structure to which the CompartmentReference_t should be added. |
CompartmentReference_t * MultiCompartmentPlugin_getCompartmentReference | ( | MultiCompartmentPlugin_t * | mcp, |
unsigned int | n | ||
) |
Get a CompartmentReference_t from the MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure to search. |
n | an unsigned int representing the index of the CompartmentReference_t to retrieve. |
n
is invalid, NULL
is returned.CompartmentReference_t * MultiCompartmentPlugin_getCompartmentReferenceById | ( | MultiCompartmentPlugin_t * | mcp, |
const char * | sid | ||
) |
Get a CompartmentReference_t from the MultiCompartmentPlugin_t based on its identifier.
mcp | the MultiCompartmentPlugin_t structure to search. |
sid | a string representing the identifier of the CompartmentReference_t to retrieve. |
sid
or NULL
if no such CompartmentReference_t exists.char * MultiCompartmentPlugin_getCompartmentType | ( | const MultiCompartmentPlugin_t * | mcp | ) |
Returns the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure whose compartmentType is sought. |
int MultiCompartmentPlugin_getIsType | ( | const MultiCompartmentPlugin_t * | mcp | ) |
Returns the value of the "isType" attribute of this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure whose isType is sought. |
ListOf_t * MultiCompartmentPlugin_getListOfCompartmentReferences | ( | MultiCompartmentPlugin_t * | mcp | ) |
Returns a ListOf_t * containing CompartmentReference_t objects from this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure whose ListOfCompartmentReferences_t is sought. |
unsigned int MultiCompartmentPlugin_getNumCompartmentReferences | ( | MultiCompartmentPlugin_t * | mcp | ) |
Get the number of CompartmentReference_t objects in this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure to query. |
int MultiCompartmentPlugin_isSetCompartmentType | ( | const MultiCompartmentPlugin_t * | mcp | ) |
Predicate returning 1
(true) if this MultiCompartmentPlugin_t's "compartmentType" attribute is set.
mcp | the MultiCompartmentPlugin_t structure. |
1
(true) if this MultiCompartmentPlugin_t's "compartmentType" attribute has been set, otherwise 0
(false) is returned. int MultiCompartmentPlugin_isSetIsType | ( | const MultiCompartmentPlugin_t * | mcp | ) |
Predicate returning 1
(true) if this MultiCompartmentPlugin_t's "isType" attribute is set.
mcp | the MultiCompartmentPlugin_t structure. |
1
(true) if this MultiCompartmentPlugin_t's "isType" attribute has been set, otherwise 0
(false) is returned. CompartmentReference_t * MultiCompartmentPlugin_removeCompartmentReference | ( | MultiCompartmentPlugin_t * | mcp, |
unsigned int | n | ||
) |
Removes the nth CompartmentReference_t from this MultiCompartmentPlugin_t and returns a pointer to it.
mcp | the MultiCompartmentPlugin_t structure to search. |
n | an unsigned int representing the index of the CompartmentReference_t to remove. |
CompartmentReference_t * MultiCompartmentPlugin_removeCompartmentReferenceById | ( | MultiCompartmentPlugin_t * | mcp, |
const char * | sid | ||
) |
Removes the CompartmentReference_t from this MultiCompartmentPlugin_t based on its identifier and returns a pointer to it.
mcp | the MultiCompartmentPlugin_t structure to search. |
sid | a string representing the identifier of the CompartmentReference_t to remove. |
int MultiCompartmentPlugin_setCompartmentType | ( | MultiCompartmentPlugin_t * | mcp, |
const char * | compartmentType | ||
) |
Sets the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure. |
compartmentType | const char * value of the "compartmentType" attribute to be set. |
int MultiCompartmentPlugin_setIsType | ( | MultiCompartmentPlugin_t * | mcp, |
int | isType | ||
) |
Sets the value of the "isType" attribute of this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure. |
isType | int value of the "isType" attribute to be set. |
int MultiCompartmentPlugin_unsetCompartmentType | ( | MultiCompartmentPlugin_t * | mcp | ) |
Unsets the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure. |
int MultiCompartmentPlugin_unsetIsType | ( | MultiCompartmentPlugin_t * | mcp | ) |
Unsets the value of the "isType" attribute of this MultiCompartmentPlugin_t.
mcp | the MultiCompartmentPlugin_t structure. |