libSBML C API  5.18.0
GroupsModelPlugin_t Class Reference

Detailed Description

groups Extension of Model_t.

Public Member Functions

int GroupsModelPlugin_addGroup (GroupsModelPlugin_t *gmp, const Group_t *g)
 Adds a copy of the given Group_t to this GroupsModelPlugin_t. More...
 
Group_tGroupsModelPlugin_createGroup (GroupsModelPlugin_t *gmp)
 Creates a new Group_t object, adds it to this GroupsModelPlugin_t object and returns the Group_t object created. More...
 
Group_tGroupsModelPlugin_getGroup (GroupsModelPlugin_t *gmp, unsigned int n)
 Get a Group_t from the GroupsModelPlugin_t. More...
 
Group_tGroupsModelPlugin_getGroupById (GroupsModelPlugin_t *gmp, const char *sid)
 Get a Group_t from the GroupsModelPlugin_t based on its identifier. More...
 
ListOf_tGroupsModelPlugin_getListOfGroups (GroupsModelPlugin_t *gmp)
 Returns a ListOf_t * containing Group_t objects from this GroupsModelPlugin_t. More...
 
unsigned int GroupsModelPlugin_getNumGroups (GroupsModelPlugin_t *gmp)
 Get the number of Group_t objects in this GroupsModelPlugin_t. More...
 
Group_tGroupsModelPlugin_removeGroup (GroupsModelPlugin_t *gmp, unsigned int n)
 Removes the nth Group_t from this GroupsModelPlugin_t and returns a pointer to it. More...
 
Group_tGroupsModelPlugin_removeGroupById (GroupsModelPlugin_t *gmp, const char *sid)
 Removes the Group_t from this GroupsModelPlugin_t based on its identifier and returns a pointer to it. More...
 

Member Function Documentation

int GroupsModelPlugin_addGroup ( GroupsModelPlugin_t gmp,
const Group_t g 
)

Adds a copy of the given Group_t to this GroupsModelPlugin_t.

Parameters
gmpthe GroupsModelPlugin_t structure to which the Group_t should be added.
gthe Group_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:
Group_t * GroupsModelPlugin_createGroup ( GroupsModelPlugin_t gmp)

Creates a new Group_t object, adds it to this GroupsModelPlugin_t object and returns the Group_t object created.

Parameters
gmpthe GroupsModelPlugin_t structure to which the Group_t should be added.
Returns
a new Group_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.
Group_t * GroupsModelPlugin_getGroup ( GroupsModelPlugin_t gmp,
unsigned int  n 
)

Get a Group_t from the GroupsModelPlugin_t.

Parameters
gmpthe GroupsModelPlugin_t structure to search.
nan unsigned int representing the index of the Group_t to retrieve.
Returns
the nth Group_t in the ListOfGroups_t within this GroupsModelPlugin_t or NULL if no such object 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.
Group_t * GroupsModelPlugin_getGroupById ( GroupsModelPlugin_t gmp,
const char *  sid 
)

Get a Group_t from the GroupsModelPlugin_t based on its identifier.

Parameters
gmpthe GroupsModelPlugin_t structure to search.
sida string representing the identifier of the Group_t to retrieve.
Returns
the Group_t in the ListOfGroups_t within this GroupsModelPlugin_t with the given sid or NULL if no such Group_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.
ListOf_t * GroupsModelPlugin_getListOfGroups ( GroupsModelPlugin_t gmp)

Returns a ListOf_t * containing Group_t objects from this GroupsModelPlugin_t.

Parameters
gmpthe GroupsModelPlugin_t structure whose ListOfGroups_t is sought.
Returns
the ListOfGroups_t from this GroupsModelPlugin_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
GroupsModelPlugin_addGroup()
GroupsModelPlugin_createGroup()
GroupsModelPlugin_getGroupById()
GroupsModelPlugin_getGroup()
GroupsModelPlugin_getNumGroups()
GroupsModelPlugin_removeGroupById()
GroupsModelPlugin_removeGroup()
unsigned int GroupsModelPlugin_getNumGroups ( GroupsModelPlugin_t gmp)

Get the number of Group_t objects in this GroupsModelPlugin_t.

Parameters
gmpthe GroupsModelPlugin_t structure to query.
Returns
the number of Group_t objects in this GroupsModelPlugin_t.
Group_t * GroupsModelPlugin_removeGroup ( GroupsModelPlugin_t gmp,
unsigned int  n 
)

Removes the nth Group_t from this GroupsModelPlugin_t and returns a pointer to it.

Parameters
gmpthe GroupsModelPlugin_t structure to search.
nan unsigned int representing the index of the Group_t to remove.
Returns
a pointer to the nth Group_t in this GroupsModelPlugin_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.
Group_t * GroupsModelPlugin_removeGroupById ( GroupsModelPlugin_t gmp,
const char *  sid 
)

Removes the Group_t from this GroupsModelPlugin_t based on its identifier and returns a pointer to it.

Parameters
gmpthe GroupsModelPlugin_t structure to search.
sida string representing the identifier of the Group_t to remove.
Returns
the Group_t in this GroupsModelPlugin_t based on the identifier or NULL if no such Group_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.