libSBML C API
5.18.0
|
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.
int CompSBasePlugin_addReplacedElement | ( | CompSBasePlugin_t * | csbp, |
const ReplacedElement_t * | re | ||
) |
Adds a copy of the given ReplacedElement_t to this CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure to which the ReplacedElement_t should be added. |
re | the ReplacedElement_t object to add. |
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.
csbp | the CompSBasePlugin_t structure to which the ReplacedBy_t should be added. |
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.
csbp | the CompSBasePlugin_t structure to which the ReplacedElement_t should be added. |
ListOf_t * CompSBasePlugin_getListOfReplacedElements | ( | CompSBasePlugin_t * | csbp | ) |
Returns a ListOf_t * containing ReplacedElement_t objects from this CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure whose ListOfReplacedElements_t is sought. |
unsigned int CompSBasePlugin_getNumReplacedElements | ( | CompSBasePlugin_t * | csbp | ) |
Get the number of ReplacedElement_t objects in this CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure to query. |
const ReplacedBy_t * CompSBasePlugin_getReplacedBy | ( | const CompSBasePlugin_t * | csbp | ) |
Returns the value of the "replacedBy" element of this CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure whose replacedBy is sought. |
ReplacedElement_t * CompSBasePlugin_getReplacedElement | ( | CompSBasePlugin_t * | csbp, |
unsigned int | n | ||
) |
Get a ReplacedElement_t from the CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure to search. |
n | an unsigned int representing the index of the ReplacedElement_t to retrieve. |
NULL
if no such object exists.int CompSBasePlugin_isSetReplacedBy | ( | const CompSBasePlugin_t * | csbp | ) |
Predicate returning 1
(true) if this CompSBasePlugin_t's "replacedBy" element is set.
csbp | the CompSBasePlugin_t structure. |
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.
csbp | the CompSBasePlugin_t structure to search. |
n | an unsigned int representing the index of the ReplacedElement_t to remove. |
int CompSBasePlugin_setReplacedBy | ( | CompSBasePlugin_t * | csbp, |
const ReplacedBy_t * | replacedBy | ||
) |
Sets the value of the "replacedBy" element of this CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure. |
replacedBy | ReplacedBy_t value of the "replacedBy" element to be set. |
int CompSBasePlugin_unsetReplacedBy | ( | CompSBasePlugin_t * | csbp | ) |
Unsets the value of the "replacedBy" element of this CompSBasePlugin_t.
csbp | the CompSBasePlugin_t structure. |