libSBML C API  5.18.0
CompSBasePlugin_t Class Reference

Detailed Description

comp Extension of SBase_t.

The CompSBasePlugin_t class inherits from the SBasePlugin_t class, and codifies the extensions to the SBase_t class defined in the Hierarchical Model_t Composition (“comp”) package. This extension allows the modeler to define one or more submodel elements which the parent SBase_t object replaces, and/or a single submodel element which replaces the parent SBase_t object.

This is accomplished through the addition of an optional ListOfReplacedElements_t child, which may contain one or more ReplacedElement_t objects, each of which references a submodel object to be replaced by the containing SBase_t object, and through the addition of a single optional ReplacedBy_t child, which references a submodel object which is to replace the containing SBase_t object.

If a single SBase_t element both contains a ListOfReplacedElements_t and has a ReplacedBy_t child, it and all the referenced ReplacedElement_t objects are to be replaced by the object referenced by the ReplacedBy_t element.

See also
ReplacedElement_t
ReplacedBy_t

Public Member Functions

int CompSBasePlugin_addReplacedElement (CompSBasePlugin_t *csbp, const ReplacedElement_t *re)
 Adds a copy of the given ReplacedElement_t to this CompSBasePlugin_t. More...
 
ReplacedBy_tCompSBasePlugin_createReplacedBy (CompSBasePlugin_t *csbp)
 Creates a new ReplacedBy_t object, adds it to this CompSBasePlugin_t object and returns the ReplacedBy_t object created. More...
 
ReplacedElement_tCompSBasePlugin_createReplacedElement (CompSBasePlugin_t *csbp)
 Creates a new ReplacedElement_t object, adds it to this CompSBasePlugin_t object and returns the ReplacedElement_t object created. More...
 
ListOf_tCompSBasePlugin_getListOfReplacedElements (CompSBasePlugin_t *csbp)
 Returns a ListOf_t * containing ReplacedElement_t objects from this CompSBasePlugin_t. More...
 
unsigned int CompSBasePlugin_getNumReplacedElements (CompSBasePlugin_t *csbp)
 Get the number of ReplacedElement_t objects in this CompSBasePlugin_t. More...
 
const ReplacedBy_tCompSBasePlugin_getReplacedBy (const CompSBasePlugin_t *csbp)
 Returns the value of the "replacedBy" element of this CompSBasePlugin_t. More...
 
ReplacedElement_tCompSBasePlugin_getReplacedElement (CompSBasePlugin_t *csbp, unsigned int n)
 Get a ReplacedElement_t from the CompSBasePlugin_t. More...
 
int CompSBasePlugin_isSetReplacedBy (const CompSBasePlugin_t *csbp)
 Predicate returning 1 (true) if this CompSBasePlugin_t's "replacedBy" element is set. More...
 
ReplacedElement_tCompSBasePlugin_removeReplacedElement (CompSBasePlugin_t *csbp, unsigned int n)
 Removes the nth ReplacedElement_t from this CompSBasePlugin_t and returns a pointer to it. More...
 
int CompSBasePlugin_setReplacedBy (CompSBasePlugin_t *csbp, const ReplacedBy_t *replacedBy)
 Sets the value of the "replacedBy" element of this CompSBasePlugin_t. More...
 
int CompSBasePlugin_unsetReplacedBy (CompSBasePlugin_t *csbp)
 Unsets the value of the "replacedBy" element of this CompSBasePlugin_t. More...
 

Member Function Documentation

int CompSBasePlugin_addReplacedElement ( CompSBasePlugin_t csbp,
const ReplacedElement_t re 
)

Adds a copy of the given ReplacedElement_t to this CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_t structure to which the ReplacedElement_t should be added.
rethe ReplacedElement_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:
ReplacedBy_t * CompSBasePlugin_createReplacedBy ( CompSBasePlugin_t csbp)

Creates a new ReplacedBy_t object, adds it to this CompSBasePlugin_t object and returns the ReplacedBy_t object created.

Parameters
csbpthe CompSBasePlugin_t structure to which the ReplacedBy_t should be added.
Returns
a new ReplacedBy_t object instance.
ReplacedElement_t * CompSBasePlugin_createReplacedElement ( CompSBasePlugin_t csbp)

Creates a new ReplacedElement_t object, adds it to this CompSBasePlugin_t object and returns the ReplacedElement_t object created.

Parameters
csbpthe CompSBasePlugin_t structure to which the ReplacedElement_t should be added.
Returns
a new ReplacedElement_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 * CompSBasePlugin_getListOfReplacedElements ( CompSBasePlugin_t csbp)

Returns a ListOf_t * containing ReplacedElement_t objects from this CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_t structure whose ListOfReplacedElements_t is sought.
Returns
the ListOfReplacedElements_t from this CompSBasePlugin_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
CompSBasePlugin_addReplacedElement()
CompSBasePlugin_createReplacedElement()
CompSBasePlugin_getReplacedElementById()
CompSBasePlugin_getReplacedElement()
CompSBasePlugin_getNumReplacedElements()
CompSBasePlugin_removeReplacedElementById()
CompSBasePlugin_removeReplacedElement()
unsigned int CompSBasePlugin_getNumReplacedElements ( CompSBasePlugin_t csbp)

Get the number of ReplacedElement_t objects in this CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_t structure to query.
Returns
the number of ReplacedElement_t objects in this CompSBasePlugin_t.
const ReplacedBy_t * CompSBasePlugin_getReplacedBy ( const CompSBasePlugin_t csbp)

Returns the value of the "replacedBy" element of this CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_t structure whose replacedBy is sought.
Returns
the value of the "replacedBy" element of this CompSBasePlugin_t as a ReplacedBy_t.
ReplacedElement_t * CompSBasePlugin_getReplacedElement ( CompSBasePlugin_t csbp,
unsigned int  n 
)

Get a ReplacedElement_t from the CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_t structure to search.
nan unsigned int representing the index of the ReplacedElement_t to retrieve.
Returns
the nth ReplacedElement_t in the ListOfReplacedElements_t within this CompSBasePlugin_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.
int CompSBasePlugin_isSetReplacedBy ( const CompSBasePlugin_t csbp)

Predicate returning 1 (true) if this CompSBasePlugin_t's "replacedBy" element is set.

Parameters
csbpthe CompSBasePlugin_t structure.
Returns
1 (true) if this CompSBasePlugin_t's "replacedBy" element has been set, otherwise 0 (false) is returned.
ReplacedElement_t * CompSBasePlugin_removeReplacedElement ( CompSBasePlugin_t csbp,
unsigned int  n 
)

Removes the nth ReplacedElement_t from this CompSBasePlugin_t and returns a pointer to it.

Parameters
csbpthe CompSBasePlugin_t structure to search.
nan unsigned int representing the index of the ReplacedElement_t to remove.
Returns
a pointer to the nth ReplacedElement_t in this CompSBasePlugin_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.
int CompSBasePlugin_setReplacedBy ( CompSBasePlugin_t csbp,
const ReplacedBy_t replacedBy 
)

Sets the value of the "replacedBy" element of this CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_t structure.
replacedByReplacedBy_t value of the "replacedBy" element 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 CompSBasePlugin_unsetReplacedBy ( CompSBasePlugin_t csbp)

Unsets the value of the "replacedBy" element of this CompSBasePlugin_t.

Parameters
csbpthe CompSBasePlugin_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: