libSBML C++ API
5.20.4
|
The Hierarchical Model Composition (“comp”) package allows multiple Model objects to be defined in a single SBMLDocument. While these new Model objects are not new SBML classes, they are given a new name, <modelDefinition>
, and reside in ListOfModelDefinition objects. In libSBML, this class inherits from the Model class, changing only the expected parent of the object, and the XML name.
An additional restriction is placed on the "id" attribute of ModelDefinition objects: not only must it be unique across all such attributes of type SId within the ModelDefintion, it must also be unique across all Model, ModelDefinition, and ExternalModelDefinition objects in the same SBMLDocument.
Public Member Functions | |
virtual ModelDefinition * | clone () const |
Creates and returns a deep copy of this ModelDefinition object. | |
virtual const std::string & | getElementName () const |
Returns the XML element name of this object. | |
virtual int | getTypeCode () const |
Returns the libSBML type code of this object instance. | |
ModelDefinition (CompPkgNamespaces *compns) | |
Creates a new ModelDefinition with the given CompPkgNamespaces object. | |
ModelDefinition (const Model &source) | |
Copy constructor from base Model object. | |
ModelDefinition (unsigned int level=CompExtension::getDefaultLevel(), unsigned int version=CompExtension::getDefaultVersion(), unsigned int pkgVersion=CompExtension::getDefaultPackageVersion()) | |
Creates a new ModelDefinition with the given level, version, and package version. | |
ModelDefinition & | operator= (const Model &source) |
Assignment operator. | |
virtual int | removeFromParentAndDelete () |
Finds this Model's parent ListOfModelDefinitions and removes itself from it and deletes itself. | |
virtual | ~ModelDefinition () |
Destructor. | |
ModelDefinition::ModelDefinition | ( | unsigned int | level = CompExtension::getDefaultLevel() , |
unsigned int | version = CompExtension::getDefaultVersion() , |
||
unsigned int | pkgVersion = CompExtension::getDefaultPackageVersion() |
||
) |
Creates a new ModelDefinition with the given level, version, and package version.
level | the SBML Level. |
version | the Version within the SBML Level. |
pkgVersion | the version of the package. |
ModelDefinition::ModelDefinition | ( | CompPkgNamespaces * | compns | ) |
Creates a new ModelDefinition with the given CompPkgNamespaces object.
compns | the CompPkgNamespaces object. |
ModelDefinition::ModelDefinition | ( | const Model & | source | ) |
Copy constructor from base Model object.
source | the instance to copy. |
|
virtual |
Destructor.
|
virtual |
Creates and returns a deep copy of this ModelDefinition object.
|
virtual |
Returns the XML element name of this object.
The only difference between a Model and a ModelDefinition is the element name ('modelDefinition').
|
virtual |
Returns the libSBML type code of this object instance.
SBML_
. The set of possible type codes for core elements is defined in the enumeration SBMLTypeCode_t, and in addition, libSBML plug-ins for SBML Level 3 packages define their own extra enumerations of type codes (e.g., SBMLLayoutTypeCode_t for the Level 3 Layout package). Note that different Level 3 package plug-ins may use overlapping type codes; to identify the package to which a given object belongs, call the SBase::getPackageName()
method on the object.The exception to this is lists: all SBML-style list elements have the type SBML_LIST_OF , regardless of what package they are from.
ModelDefinition & ModelDefinition::operator= | ( | const Model & | source | ) |
Assignment operator.
source | the object whose values are used as the basis of the assignment. |
|
virtual |
Finds this Model's parent ListOfModelDefinitions and removes itself from it and deletes itself.
This method actually just calls the SBase function, since the Model class overrides it, but that's actually what we want to happen here.