libSBML C API  5.18.0

Detailed Description

multi Extension of Model_t.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.

The MultiModelPlugin_t object is used to extend the standard SBML Model_t object to allow a ListOfSpeciesTypes_t child.

Public Member Functions

int MultiModelPlugin_addMultiSpeciesType (MultiModelPlugin_t *mmp, const MultiSpeciesType_t *mst)
 Adds a copy of the given MultiSpeciesType_t to this MultiModelPlugin_t. More...
 
MultiSpeciesType_tMultiModelPlugin_createMultiSpeciesType (MultiModelPlugin_t *mmp)
 Creates a new MultiSpeciesType_t object, adds it to this MultiModelPlugin_t object and returns the MultiSpeciesType_t object created. More...
 
ListOf_tMultiModelPlugin_getListOfMultiSpeciesTypes (MultiModelPlugin_t *mmp)
 Returns a ListOf_t * containing MultiSpeciesType_t objects from this MultiModelPlugin_t. More...
 
MultiSpeciesType_tMultiModelPlugin_getMultiSpeciesType (MultiModelPlugin_t *mmp, unsigned int n)
 Get a MultiSpeciesType_t from the MultiModelPlugin_t. More...
 
MultiSpeciesType_tMultiModelPlugin_getMultiSpeciesTypeById (MultiModelPlugin_t *mmp, const char *sid)
 Get a MultiSpeciesType_t from the MultiModelPlugin_t based on its identifier. More...
 
unsigned int MultiModelPlugin_getNumMultiSpeciesTypes (MultiModelPlugin_t *mmp)
 Get the number of MultiSpeciesType_t objects in this MultiModelPlugin_t. More...
 
MultiSpeciesType_tMultiModelPlugin_removeMultiSpeciesType (MultiModelPlugin_t *mmp, unsigned int n)
 Removes the nth MultiSpeciesType_t from this MultiModelPlugin_t and returns a pointer to it. More...
 
MultiSpeciesType_tMultiModelPlugin_removeMultiSpeciesTypeById (MultiModelPlugin_t *mmp, const char *sid)
 Removes the MultiSpeciesType_t from this MultiModelPlugin_t based on its identifier and returns a pointer to it. More...
 

Member Function Documentation

int MultiModelPlugin_addMultiSpeciesType ( MultiModelPlugin_t mmp,
const MultiSpeciesType_t mst 
)

Adds a copy of the given MultiSpeciesType_t to this MultiModelPlugin_t.

Parameters
mmpthe MultiModelPlugin_t structure to which the MultiSpeciesType_t should be added.
mstthe MultiSpeciesType_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:
MultiSpeciesType_t * MultiModelPlugin_createMultiSpeciesType ( MultiModelPlugin_t mmp)

Creates a new MultiSpeciesType_t object, adds it to this MultiModelPlugin_t object and returns the MultiSpeciesType_t object created.

Parameters
mmpthe MultiModelPlugin_t structure to which the MultiSpeciesType_t should be added.
Returns
a new MultiSpeciesType_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.
ListOf_t * MultiModelPlugin_getListOfMultiSpeciesTypes ( MultiModelPlugin_t mmp)

Returns a ListOf_t * containing MultiSpeciesType_t objects from this MultiModelPlugin_t.

Parameters
mmpthe MultiModelPlugin_t structure whose ListOfMultiSpeciesTypes_t is sought.
Returns
the ListOfMultiSpeciesTypes_t from this MultiModelPlugin_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
MultiModelPlugin_addMultiSpeciesType()
MultiModelPlugin_createMultiSpeciesType()
MultiModelPlugin_getMultiSpeciesTypeById()
MultiModelPlugin_getMultiSpeciesType()
MultiModelPlugin_getNumMultiSpeciesTypes()
MultiModelPlugin_removeMultiSpeciesTypeById()
MultiModelPlugin_removeMultiSpeciesType()
MultiSpeciesType_t * MultiModelPlugin_getMultiSpeciesType ( MultiModelPlugin_t mmp,
unsigned int  n 
)

Get a MultiSpeciesType_t from the MultiModelPlugin_t.

Parameters
mmpthe MultiModelPlugin_t structure to search.
nan unsigned int representing the index of the MultiSpeciesType_t to retrieve.
Returns
the nth MultiSpeciesType_t in the ListOfMultiSpeciesTypes_t within this MultiModelPlugin_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.
MultiSpeciesType_t * MultiModelPlugin_getMultiSpeciesTypeById ( MultiModelPlugin_t mmp,
const char *  sid 
)

Get a MultiSpeciesType_t from the MultiModelPlugin_t based on its identifier.

Parameters
mmpthe MultiModelPlugin_t structure to search.
sida string representing the identifier of the MultiSpeciesType_t to retrieve.
Returns
the MultiSpeciesType_t in the ListOfMultiSpeciesTypes_t within this MultiModelPlugin_t with the given sid or NULL if no such MultiSpeciesType_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.
unsigned int MultiModelPlugin_getNumMultiSpeciesTypes ( MultiModelPlugin_t mmp)

Get the number of MultiSpeciesType_t objects in this MultiModelPlugin_t.

Parameters
mmpthe MultiModelPlugin_t structure to query.
Returns
the number of MultiSpeciesType_t objects in this MultiModelPlugin_t.
MultiSpeciesType_t * MultiModelPlugin_removeMultiSpeciesType ( MultiModelPlugin_t mmp,
unsigned int  n 
)

Removes the nth MultiSpeciesType_t from this MultiModelPlugin_t and returns a pointer to it.

Parameters
mmpthe MultiModelPlugin_t structure to search.
nan unsigned int representing the index of the MultiSpeciesType_t to remove.
Returns
a pointer to the nth MultiSpeciesType_t in this MultiModelPlugin_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.
MultiSpeciesType_t * MultiModelPlugin_removeMultiSpeciesTypeById ( MultiModelPlugin_t mmp,
const char *  sid 
)

Removes the MultiSpeciesType_t from this MultiModelPlugin_t based on its identifier and returns a pointer to it.

Parameters
mmpthe MultiModelPlugin_t structure to search.
sida string representing the identifier of the MultiSpeciesType_t to remove.
Returns
the MultiSpeciesType_t in this MultiModelPlugin_t based on the identifier or NULL if no such MultiSpeciesType_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.