libSBML C API
5.18.0
|
The Deletion_t class was introduced by the SBML Level 3 Hierarchical Model_t Composition (“comp”) package to allow elements of submodels to be removed before instantiation.
The Deletion_t object class is used to define a deletion operation to be applied when a submodel instantiates a model definition. Deletions may be useful in hierarchical model composition scenarios for various reasons. For example, some components in a submodel may be redundant in the composed model, perhaps because the same features are implemented in a different way in the new model.
Deletions function as follows. When the Model_t to which the Submodel_t object refers (via the "modelRef" attribute) is read and processed for inclusion into the composed model, each Deletion_t object identifies an object to remove from that Model_t instance. The resulting submodel instance consists of everything in the Model_t object instance minus the entities referenced by the list of Deletion_t objects.
As might be expected, deletions can have wide-ranging implications, especially when the object deleted has substantial substructure, as in the case of reactions. The following are rules regarding deletions and their effects.
The Deletion_t object class is subclassed from SBaseRef_t, and reuses all the machinery provided by SBaseRef_t. In addition, it defines two optional attributes, "id" and "name". The "id" attribute can be used to give an identifier to a given deletion operation. The identifier has no mathematical meaning, but it may be useful for creating submodels that can be manipulated more directly by other submodels. (Indeed, it is legitimate for an enclosing model definition to delete a deletion!)
The optional "name" attribute is provided on Deletion_t for the same reason it is provided on other elements that have identifiers; viz., to provide for the possibility of giving a human-readable name to the object. The name may be useful in situations when deletions are displayed to modelers.
Public Member Functions | |
Deletion_t * | Deletion_clone (Deletion_t *d) |
Returns a copy of the given Deletion_t structure. More... | |
Deletion_t * | Deletion_create (unsigned int level, unsigned int version, unsigned int pkgVersion) |
Creates a new Deletion_t structure using the given SBML level and version , and the pkgVersion package version. More... | |
void | Deletion_free (Deletion_t *d) |
Frees the given Deletion_t structure. More... | |
char * | Deletion_getId (Deletion_t *d) |
Takes an Deletion_t structure and returns its identifier. More... | |
char * | Deletion_getName (Deletion_t *d) |
Takes a Deletion_t structure and returns its name. More... | |
int | Deletion_hasRequiredAttributes (Deletion_t *d) |
Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for the given Deletion_t structure have been set. More... | |
int | Deletion_isSetId (Deletion_t *d) |
Predicate returning 1 (true) or 0 (false) depending on whether the given Deletion_t structure's identifier is set. More... | |
int | Deletion_isSetName (Deletion_t *d) |
Predicate returning 1 (true) or 0 (false) depending on whether the given Deletion_t structure's name is set. More... | |
int | Deletion_setId (Deletion_t *d, const char *sid) |
Assigns the identifier of an Deletion_t structure. More... | |
int | Deletion_setName (Deletion_t *d, const char *name) |
Sets the name of the given Deletion_t to a copy of name . More... | |
int | Deletion_unsetId (Deletion_t *d) |
Unsets the "id" attribute of the given Deletion_t structure. More... | |
int | Deletion_unsetName (Deletion_t *d) |
Unsets the "name" attribute of the given Deletion_t structure. More... | |
Deletion_t * Deletion_clone | ( | Deletion_t * | d | ) |
Returns a copy of the given Deletion_t structure.
d | the Deletion_t structure to copy. |
Deletion_t * Deletion_create | ( | unsigned int | level, |
unsigned int | version, | ||
unsigned int | pkgVersion | ||
) |
Creates a new Deletion_t structure using the given SBML level
and version
, and the pkgVersion
package version.
level | an unsigned int, the SBML Level to assign to this Deletion_t. |
version | an unsigned int, the SBML Version to assign to this Deletion_t. |
pkgVersion | an unsigned int, the SBML 'comp' package Version to assign to this Deletion_t. |
void Deletion_free | ( | Deletion_t * | d | ) |
Frees the given Deletion_t structure.
d | the Deletion_t structure to free. |
char * Deletion_getId | ( | Deletion_t * | d | ) |
Takes an Deletion_t structure and returns its identifier.
d | the Deletion_t structure whose identifier is sought. |
char * Deletion_getName | ( | Deletion_t * | d | ) |
Takes a Deletion_t structure and returns its name.
d | the Deletion_t whose name is sought. |
int Deletion_hasRequiredAttributes | ( | Deletion_t * | d | ) |
Predicate returning 1
(true) or 0
(false) depending on whether all the required attributes for the given Deletion_t structure have been set.
int Deletion_isSetId | ( | Deletion_t * | d | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given Deletion_t structure's identifier is set.
d | the Deletion_t structure to query. |
1
(true) if the "id" attribute of the given Deletion_t structure is set, 0
(false) otherwise. int Deletion_isSetName | ( | Deletion_t * | d | ) |
Predicate returning 1
(true) or 0
(false) depending on whether the given Deletion_t structure's name is set.
d | the Deletion_t structure to query. |
1
(true) if the "name" attribute of the given Deletion_t structure is set, 0
(false) otherwise. int Deletion_setId | ( | Deletion_t * | d, |
const char * | sid | ||
) |
Assigns the identifier of an Deletion_t structure.
This makes a copy of the string passed in the parameter sid
.
d | the Deletion_t structure to set. |
sid | the string to use as the identifier. |
sid
of NULL is equivalent to unsetting the "id" attribute. int Deletion_setName | ( | Deletion_t * | d, |
const char * | name | ||
) |
Sets the name of the given Deletion_t to a copy of name
.
d | the Deletion_t structure to set. |
name | the name to assign to the given Deletion_t's "name" attribute. |
int Deletion_unsetId | ( | Deletion_t * | d | ) |
Unsets the "id" attribute of the given Deletion_t structure.
d | the Deletion_t structure to unset. |
int Deletion_unsetName | ( | Deletion_t * | d | ) |
Unsets the "name" attribute of the given Deletion_t structure.
d | the Deletion_t structure to unset. |