{comp}
comp
Deletion of an object from a submodel.
The Deletion class was introduced by the SBML Level 3 Hierarchical Model Composition package (“comp”) to allow elements of submodels to be removed before instantiation.
The Deletion 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 to which the Submodel object refers (via the "modelRef" attribute) is read and processed for inclusion into the composed model, each Deletion object identifies an object to remove from that Model instance. The resulting submodel instance consists of everything in the Model object instance minus the entities referenced by the list of Deletion 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.
- An object that has been deleted is considered inaccessible. Any element that has been deleted (or replaced) may not be referenced by an SBaseRef object.
- If the deleted object has child objects and other structures, the child objects and substructure are also considered to be deleted.
- It is not an error to delete explicitly an object that is already deleted by implication (for example as a result of the second point above). The resulting model is the same.
- If the deleted object is from an SBML namespace that is not understood by the interpreter, the deletion must be ignored—the object will not need to be deleted, as the interpreter could not understand the package. If an interpreter cannot tell whether a referenced object does not exist or if exists in an unparsed namespace it may produce a warning.
The Deletion object class is subclassed from SBaseRef, and reuses all the machinery provided by SBaseRef. 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 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.
|
virtual void | clearReferencedElement () |
| Removes the saved referenced element, if it had been saved earlier. More...
|
|
virtual Deletion * | clone () const |
| Creates and returns a deep copy of this Deletion object. More...
|
|
SBaseRef * | createSBaseRef () |
| Creates a new, empty SBaseRef, adds it to this SBaseRef and returns the created SBaseRef. More...
|
|
| Deletion (unsigned int level=CompExtension::getDefaultLevel(), unsigned int version=CompExtension::getDefaultVersion(), unsigned int pkgVersion=CompExtension::getDefaultPackageVersion()) |
| Creates a new Deletion with the given level, version, and package version. More...
|
|
| Deletion (CompPkgNamespaces *compns) |
| Creates a new Deletion with the given CompPkgNamespaces object. More...
|
|
| Deletion (const Deletion &source) |
| Copy constructor. More...
|
|
virtual List * | getAllElements (ElementFilter *filter=NULL) |
| Returns a List of all child SBase* objects, including those nested to an arbitrary depth. More...
|
|
virtual SBase * | getElementByMetaId (const std::string &metaid) |
| Returns the first child element it can find with the given metaid , or itself if it has the given metaid , or NULL if no such object is found. More...
|
|
virtual SBase * | getElementBySId (const std::string &id) |
| Returns the first child element found that has the given id in the model-wide SId namespace, or NULL if no such object is found. More...
|
|
virtual const std::string & | getElementName () const |
| Returns the XML element name of this SBML object. More...
|
|
virtual const std::string & | getId () const |
| Returns the value of the "id" attribute of this Deletion. More...
|
|
virtual const std::string & | getIdRef () const |
| Returns the value of the "idRef" attribute of this SBaseRef. More...
|
|
virtual const std::string & | getMetaIdRef () const |
| Returns the value of the "metaIdRef" attribute of this SBaseRef. More...
|
|
virtual const std::string & | getName () const |
| Returns the value of the "name" attribute of this Deletion. More...
|
|
virtual int | getNumReferents () const |
| Returns how many elements are being referred to by this SBaseRef. More...
|
|
virtual const std::string & | getPortRef () const |
| Returns the value of the "portRef" attribute of this SBaseRef. More...
|
|
virtual SBase * | getReferencedElement () |
| Returns the object pointed to by this element. More...
|
|
virtual SBase * | getReferencedElementFrom (Model *model) |
| Examines the referenced Model for the referenced object, and returns it, if found. More...
|
|
const SBaseRef * | getSBaseRef () const |
| Get the child sBaseRef of this sBaseRef. More...
|
|
SBaseRef * | getSBaseRef () |
| Get the child sBaseRef of this SBaseRef. More...
|
|
virtual int | getTypeCode () const |
| Returns the libSBML type code of this object instance. More...
|
|
virtual const std::string & | getUnitRef () const |
| Returns the value of the "unitRef" attribute of this SBaseRef. More...
|
|
virtual bool | hasRequiredAttributes () const |
| Returns true if getNumReferents() is exactly 1. More...
|
|
virtual bool | isSetId () const |
| Predicate returning true or false depending on whether this object's "id" attribute has been set. More...
|
|
virtual bool | isSetIdRef () const |
| Predicate returning true or false depending on whether this SBaseRef's "idRef" attribute has been set. More...
|
|
virtual bool | isSetMetaIdRef () const |
| Predicate returning true or false depending on whether this SBaseRef's "metaIdRef" attribute has been set. More...
|
|
virtual bool | isSetName () const |
| Predicate returning true or false depending on whether this object's "name" attribute has been set. More...
|
|
virtual bool | isSetPortRef () const |
| Predicate returning true or false depending on whether this SBaseRef's "portRef" attribute has been set. More...
|
|
bool | isSetSBaseRef () const |
| Predicate for testing whether the sBaseRef for this SBaseRef is set. More...
|
|
virtual bool | isSetUnitRef () const |
| Predicate returning true or false depending on whether this SBaseRef's "unitRef" attribute has been set. More...
|
|
Deletion & | operator= (const Deletion &source) |
| Assignment operator. More...
|
|
virtual int | performDeletion () |
| DEPRECATED FUNCTION: DO NOT USE. More...
|
|
virtual int | removeFromParentAndDelete () |
| Finds this SBaseRef's parent, which can either be a List or can be another SBaseRef, and tells it to remove this. More...
|
|
virtual void | renameSIdRefs (const std::string &oldid, const std::string &newid) |
|
virtual int | saveReferencedElement () |
| Finds and stores the referenced object. More...
|
|
virtual int | setId (const std::string &id) |
| Sets the value of the "id" attribute of this Deletion. More...
|
|
virtual int | setIdRef (const std::string &id) |
| Sets the value of the "idRef" attribute of this SBaseRef. More...
|
|
virtual int | setMetaIdRef (const std::string &id) |
| Sets the value of the "metaIdRef" attribute of this SBaseRef. More...
|
|
virtual int | setName (const std::string &name) |
| Sets the value of the "name" attribute of this Deletion. More...
|
|
virtual int | setPortRef (const std::string &id) |
| Sets the value of the "portRef" attribute of this SBaseRef. More...
|
|
int | setSBaseRef (const SBaseRef *sBaseRef) |
| Sets the sBaseRef definition of this SBaseRef to a copy of the given SBaseRef object instance. More...
|
|
virtual int | setUnitRef (const std::string &id) |
| Sets the value of the "unitRef" attribute of this SBaseRef. More...
|
|
virtual int | unsetId () |
| Unsets the value of the "id" attribute of this Deletion. More...
|
|
virtual int | unsetIdRef () |
| Unsets the value of the "idRef" attribute of this SBaseRef. More...
|
|
virtual int | unsetMetaIdRef () |
| Unsets the value of the "metaIdRef" attribute of this SBaseRef. More...
|
|
virtual int | unsetName () |
| Unsets the value of the "name" attribute of this Deletion. More...
|
|
virtual int | unsetPortRef () |
| Unsets the value of the "portRef" attribute of this SBaseRef. More...
|
|
virtual int | unsetSBaseRef () |
| Unsets the child SBaseRef of this SBaseRef. More...
|
|
virtual int | unsetUnitRef () |
| Unsets the value of the "unitRef" attribute of this SBaseRef. More...
|
|
virtual | ~Deletion () |
| Destructor. More...
|
|