libSBML C API  5.18.0
MultiCompartmentPlugin_t Class Reference

Detailed Description

multi Extension of Compartment_t for the "multi" package.

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.

Public Member Functions

int MultiCompartmentPlugin_addCompartmentReference (MultiCompartmentPlugin_t *mcp, const CompartmentReference_t *cr)
 Adds a copy of the given CompartmentReference_t to this MultiCompartmentPlugin_t. More...
 
CompartmentReference_tMultiCompartmentPlugin_createCompartmentReference (MultiCompartmentPlugin_t *mcp)
 Creates a new CompartmentReference_t object, adds it to this MultiCompartmentPlugin_t object and returns the CompartmentReference_t object created. More...
 
CompartmentReference_tMultiCompartmentPlugin_getCompartmentReference (MultiCompartmentPlugin_t *mcp, unsigned int n)
 Get a CompartmentReference_t from the MultiCompartmentPlugin_t. More...
 
CompartmentReference_tMultiCompartmentPlugin_getCompartmentReferenceById (MultiCompartmentPlugin_t *mcp, const char *sid)
 Get a CompartmentReference_t from the MultiCompartmentPlugin_t based on its identifier. More...
 
char * MultiCompartmentPlugin_getCompartmentType (const MultiCompartmentPlugin_t *mcp)
 Returns the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t. More...
 
int MultiCompartmentPlugin_getIsType (const MultiCompartmentPlugin_t *mcp)
 Returns the value of the "isType" attribute of this MultiCompartmentPlugin_t. More...
 
ListOf_tMultiCompartmentPlugin_getListOfCompartmentReferences (MultiCompartmentPlugin_t *mcp)
 Returns a ListOf_t * containing CompartmentReference_t objects from this MultiCompartmentPlugin_t. More...
 
unsigned int MultiCompartmentPlugin_getNumCompartmentReferences (MultiCompartmentPlugin_t *mcp)
 Get the number of CompartmentReference_t objects in this MultiCompartmentPlugin_t. More...
 
int MultiCompartmentPlugin_isSetCompartmentType (const MultiCompartmentPlugin_t *mcp)
 Predicate returning 1 (true) if this MultiCompartmentPlugin_t's "compartmentType" attribute is set. More...
 
int MultiCompartmentPlugin_isSetIsType (const MultiCompartmentPlugin_t *mcp)
 Predicate returning 1 (true) if this MultiCompartmentPlugin_t's "isType" attribute is set. More...
 
CompartmentReference_tMultiCompartmentPlugin_removeCompartmentReference (MultiCompartmentPlugin_t *mcp, unsigned int n)
 Removes the nth CompartmentReference_t from this MultiCompartmentPlugin_t and returns a pointer to it. More...
 
CompartmentReference_tMultiCompartmentPlugin_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. More...
 
int MultiCompartmentPlugin_setCompartmentType (MultiCompartmentPlugin_t *mcp, const char *compartmentType)
 Sets the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t. More...
 
int MultiCompartmentPlugin_setIsType (MultiCompartmentPlugin_t *mcp, int isType)
 Sets the value of the "isType" attribute of this MultiCompartmentPlugin_t. More...
 
int MultiCompartmentPlugin_unsetCompartmentType (MultiCompartmentPlugin_t *mcp)
 Unsets the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t. More...
 
int MultiCompartmentPlugin_unsetIsType (MultiCompartmentPlugin_t *mcp)
 Unsets the value of the "isType" attribute of this MultiCompartmentPlugin_t. More...
 

Member Function Documentation

int MultiCompartmentPlugin_addCompartmentReference ( MultiCompartmentPlugin_t mcp,
const CompartmentReference_t cr 
)

Adds a copy of the given CompartmentReference_t to this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure to which the CompartmentReference_t should be added.
crthe CompartmentReference_t object to add.
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:
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.

Parameters
mcpthe MultiCompartmentPlugin_t structure to which the CompartmentReference_t should be added.
Returns
a new CompartmentReference_t object instance.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
CompartmentReference_t * MultiCompartmentPlugin_getCompartmentReference ( MultiCompartmentPlugin_t mcp,
unsigned int  n 
)

Get a CompartmentReference_t from the MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure to search.
nan unsigned int representing the index of the CompartmentReference_t to retrieve.
Returns
the nth CompartmentReference_t in the ListOfCompartmentReferences_t within this MultiCompartmentPlugin_t. If the index n is invalid, NULL is returned.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
CompartmentReference_t * MultiCompartmentPlugin_getCompartmentReferenceById ( MultiCompartmentPlugin_t mcp,
const char *  sid 
)

Get a CompartmentReference_t from the MultiCompartmentPlugin_t based on its identifier.

Parameters
mcpthe MultiCompartmentPlugin_t structure to search.
sida string representing the identifier of the CompartmentReference_t to retrieve.
Returns
the CompartmentReference_t in the ListOfCompartmentReferences_t within this MultiCompartmentPlugin_t with the given sid or NULL if no such CompartmentReference_t exists.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
char * MultiCompartmentPlugin_getCompartmentType ( const MultiCompartmentPlugin_t mcp)

Returns the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure whose compartmentType is sought.
Returns
the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
int MultiCompartmentPlugin_getIsType ( const MultiCompartmentPlugin_t mcp)

Returns the value of the "isType" attribute of this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure whose isType is sought.
Returns
the value of the "isType" attribute of this MultiCompartmentPlugin_t as a boolean.
ListOf_t * MultiCompartmentPlugin_getListOfCompartmentReferences ( MultiCompartmentPlugin_t mcp)

Returns a ListOf_t * containing CompartmentReference_t objects from this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure whose ListOfCompartmentReferences_t is sought.
Returns
the ListOfCompartmentReferences_t from this MultiCompartmentPlugin_t as a ListOf_t *.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
See also
MultiCompartmentPlugin_addCompartmentReference()
MultiCompartmentPlugin_createCompartmentReference()
MultiCompartmentPlugin_getCompartmentReferenceById()
MultiCompartmentPlugin_getCompartmentReference()
MultiCompartmentPlugin_getNumCompartmentReferences()
MultiCompartmentPlugin_removeCompartmentReferenceById()
MultiCompartmentPlugin_removeCompartmentReference()
unsigned int MultiCompartmentPlugin_getNumCompartmentReferences ( MultiCompartmentPlugin_t mcp)

Get the number of CompartmentReference_t objects in this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure to query.
Returns
the number of CompartmentReference_t objects in this MultiCompartmentPlugin_t.
int MultiCompartmentPlugin_isSetCompartmentType ( const MultiCompartmentPlugin_t mcp)

Predicate returning 1 (true) if this MultiCompartmentPlugin_t's "compartmentType" attribute is set.

Parameters
mcpthe MultiCompartmentPlugin_t structure.
Returns
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.

Parameters
mcpthe MultiCompartmentPlugin_t structure.
Returns
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.

Parameters
mcpthe MultiCompartmentPlugin_t structure to search.
nan unsigned int representing the index of the CompartmentReference_t to remove.
Returns
a pointer to the nth CompartmentReference_t in this MultiCompartmentPlugin_t.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
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.

Parameters
mcpthe MultiCompartmentPlugin_t structure to search.
sida string representing the identifier of the CompartmentReference_t to remove.
Returns
the CompartmentReference_t in this MultiCompartmentPlugin_t based on the identifier or NULL if no such CompartmentReference_t exists.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
int MultiCompartmentPlugin_setCompartmentType ( MultiCompartmentPlugin_t mcp,
const char *  compartmentType 
)

Sets the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure.
compartmentTypeconst char * value of the "compartmentType" attribute to 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:
int MultiCompartmentPlugin_setIsType ( MultiCompartmentPlugin_t mcp,
int  isType 
)

Sets the value of the "isType" attribute of this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_t structure.
isTypeint value of the "isType" attribute to 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:
int MultiCompartmentPlugin_unsetCompartmentType ( MultiCompartmentPlugin_t mcp)

Unsets the value of the "compartmentType" attribute of this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_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:
int MultiCompartmentPlugin_unsetIsType ( MultiCompartmentPlugin_t mcp)

Unsets the value of the "isType" attribute of this MultiCompartmentPlugin_t.

Parameters
mcpthe MultiCompartmentPlugin_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: