{comp} Implementation of the “comp” package extention to the SBase construct.
The CompSBasePlugin class inherits from the SBasePlugin class, and codifies the extentions to the SBase class defined in the Hierarchical Model Composition package (“comp”). This extention allows the modeler to define one or more submodel elements which the parent SBase object replaces, and/or a single submodel element which replaces the parent SBase object.
This is accomplished through the addition of an optional ListOfReplacedElements child, which may contain one or more ReplacedElement objects, each of which references a submodel object to be replaced by the containing SBase object, and through the addition of a single optional ReplacedBy child, which references a submodel object which is to replace the containing SBase object.
If a single SBase element both contains a ListOfReplacedElements and has a ReplacedBy child, it and all the referenced ReplacedElement objects are to be replaced by the object referenced by the ReplacedBy element.
- See also
- ReplacedElement
-
ReplacedBy
|
int | addReplacedElement (const ReplacedElement *replacedElement) |
| Adds a copy of the given ReplacedElement object to the list of ReplacedElements. More...
|
|
virtual void | clearReplacedElements () |
| Remove all ReplacedElements, if any exist. More...
|
|
virtual CompSBasePlugin * | clone () const |
| Creates and returns a deep copy of this CompSBasePlugin object. More...
|
|
| CompSBasePlugin (const std::string &uri, const std::string &prefix, CompPkgNamespaces *compns) |
| Constructor. More...
|
|
| CompSBasePlugin (const CompSBasePlugin &orig) |
| Copy constructor. More...
|
|
ReplacedBy * | createReplacedBy () |
| Creates a new, empty ReplacedBy, adds it to this CompSBasePlugin and returns the created ReplacedBy. More...
|
|
ReplacedElement * | createReplacedElement () |
| Creates a ReplacedElement object, adds it to the end of the ReplacedElement objects list and returns a pointer to the newly created object. 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...
|
|
const std::string & | getElementNamespace () const |
| Returns the XML namespace (URI) of the package extension of this plugin object. More...
|
|
unsigned int | getLevel () const |
| Returns the SBML level of the package extension of this plugin object. More...
|
|
const ListOfReplacedElements * | getListOfReplacedElements () const |
| Returns the ListOf object that holds all replacedElements. More...
|
|
unsigned int | getNumReplacedElements () const |
| Returns the number of ReplacedElements for this CompSBasePlugin. More...
|
|
const std::string & | getPackageName () const |
| Returns the package name of this plugin object. More...
|
|
unsigned int | getPackageVersion () const |
| Returns the package version of the package extension of this plugin object. More...
|
|
SBase * | getParentSBMLObject () |
| Returns the parent SBase object to which this plugin object connected. More...
|
|
const SBase * | getParentSBMLObject () const |
| Returns the parent SBase object to which this plugin object connected. More...
|
|
const std::string & | getPrefix () const |
| Returns the prefix of the package extension of this plugin object. More...
|
|
const ReplacedBy * | getReplacedBy () const |
| Get the child ReplacedBy of this SBase. More...
|
|
ReplacedBy * | getReplacedBy () |
| Get the child ReplacedBy of this SBase. More...
|
|
ReplacedElement * | getReplacedElement (unsigned int n) |
| Returns the ReplacedElement with the given index. More...
|
|
const ReplacedElement * | getReplacedElement (unsigned int n) const |
| Returns the ReplacedElement with the given index. More...
|
|
SBMLDocument * | getSBMLDocument () |
| Returns the parent SBMLDocument of this plugin object. More...
|
|
const SBMLDocument * | getSBMLDocument () const |
| Returns the parent SBMLDocument of this plugin object. More...
|
|
std::string | getURI () const |
| Gets the URI to which this element belongs to. More...
|
|
unsigned int | getVersion () const |
| Returns the SBML version of the package extension of this plugin object. More...
|
|
bool | isSetReplacedBy () const |
| Predicate for testing whether the ReplacedBy for this SBase is set. More...
|
|
virtual void | logInvalidId (const std::string &attribute, const std::string &wrongattribute) |
| Helper to log a common type of error. More...
|
|
CompSBasePlugin & | operator= (const CompSBasePlugin &orig) |
| Assignment operator for CompSBasePlugin. More...
|
|
ReplacedElement * | removeReplacedElement (unsigned int index) |
| Removes the ReplacedElement with the given index. More...
|
|
int | setElementNamespace (const std::string &uri) |
| Sets the XML namespace to which this element belongs to. More...
|
|
int | setReplacedBy (const ReplacedBy *replacedBy) |
| Sets the ReplacedBy definition of this SBase to a copy of the given ReplacedBy object instance. More...
|
|
virtual int | unsetReplacedBy () |
| Unsets the child ReplacedBy of this SBase. More...
|
|
virtual | ~CompSBasePlugin () |
| Destroy this object. More...
|
|
std::string SBasePlugin::getURI |
( |
| ) |
const |
|
inherited |
Gets the URI to which this element belongs to.
For example, all elements that belong to SBML Level 3 Version 1 Core must would have the URI "http://www.sbml.org/sbml/level3/version1/core"; all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must would have the URI "http://www.sbml.org/sbml/level3/version1/layout/version1/"
Unlike getElementNamespace, this function first returns the URI for this element by looking into the SBMLNamespaces object of the document with the its package name. if not found it will return the result of getElementNamespace
- Returns
- the URI this elements
- See also
- getPackageName()
-
getElementNamespace()
-
SBMLDocument::getSBMLNamespaces()
-
getSBMLDocument()