libSBML C++ API
5.11.0
|
Public Member Functions | |
virtual void | addL2Namespaces (XMLNamespaces *xmlns) const |
Adds the package's Level 2 namespace(s). More... | |
virtual QualExtension * | clone () const |
Creates and returns a deep copy of this QualExtension object. More... | |
virtual void | enableL2NamespaceForDocument (SBMLDocument *doc) const |
Called to enable the package on the SBMLDocument object. More... | |
virtual unsigned int | getLevel (const std::string &uri) const |
Returns the SBML Level for the given URI of this package. More... | |
virtual const std::string & | getName () const |
Returns the name of this package ("qual") More... | |
int | getNumOfSBasePlugins () const |
Returns the number of SBasePluginCreatorBase objects stored in this object. More... | |
unsigned int | getNumOfSupportedPackageURI () const |
Returns the number of supported package namespace URIs. More... | |
virtual unsigned int | getPackageVersion (const std::string &uri) const |
Returns the package version for the given URI of this package. More... | |
virtual SBMLNamespaces * | getSBMLExtensionNamespaces (const std::string &uri) const |
Returns an QualPkgNamespaces object. More... | |
virtual const char * | getStringFromTypeCode (int typeCode) const |
Takes a type code of the “qual” package and returns a string describing the code. More... | |
const std::string & | getSupportedPackageURI (unsigned int n) const |
Returns the nth XML namespace URI. More... | |
virtual const std::string & | getURI (unsigned int sbmlLevel, unsigned int sbmlVersion, unsigned int pkgVersion) const |
Returns the namespace URI corresponding to the combination of the given SBML Level, Version, and package version. More... | |
virtual unsigned int | getVersion (const std::string &uri) const |
Returns the SBML Version for the given URI of this package. More... | |
bool | isEnabled () const |
Returns true if this package is enabled. More... | |
virtual bool | isInUse (SBMLDocument *doc) const |
Indicates whether this extension is being used by the given SBMLDocument. More... | |
bool | isSupported (const std::string &uri) const |
Returns true if the given XML namespace URI is supported by this package extension. More... | |
QualExtension & | operator= (const QualExtension &rhs) |
Assignment operator for QualExtension. More... | |
QualExtension () | |
Constructor. More... | |
QualExtension (const QualExtension &orig) | |
Copy constructor. More... | |
virtual void | removeL2Namespaces (XMLNamespaces *xmlns) const |
Removes the package's Level 2 namespace(s). More... | |
bool | setEnabled (bool isEnabled) |
Enable or disable this package. More... | |
virtual | ~QualExtension () |
Destroy this object. More... | |
Static Public Member Functions | |
static unsigned int | getDefaultLevel () |
Returns the default SBML Level used by this libSBML package extension. More... | |
static unsigned int | getDefaultPackageVersion () |
Returns the default version of the SBML Level 3 package implemented by this libSBML extension. More... | |
static unsigned int | getDefaultVersion () |
Returns the default SBML Version used by this libSBML package extension. More... | |
static const std::string & | getPackageName () |
Returns the nickname of the SBML Level 3 package implemented by this libSBML extension. More... | |
static const std::string & | getXmlnsL3V1V1 () |
Returns the XML namespace URI of the SBML Level 3 package implemented by this libSBML extension. More... | |
QualExtension::QualExtension | ( | ) |
Constructor.
QualExtension::QualExtension | ( | const QualExtension & | orig | ) |
Copy constructor.
|
virtual |
Destroy this object.
|
virtualinherited |
Adds the package's Level 2 namespace(s).
This virtual method should be overridden by all package extensions that want to serialize to an SBML Level 2 annotation. In Level 2, the XML namespace declaration for the package is not placed on the top-level SBML document object but rather inside individual annotations. addL2Namespaces() is invoked automatically for Level 2 documents when an SBMLExtensionNamespace object is created; removeL2Namespaces() is automatically invoked by SBMLDocument to prevent the namespace(s) from being put on the top-level SBML Level 2 element (because Level 2 doesn't support namespaces there); and enableL2NamespaceForDocument() is called automatically when any SBML document (of any Level/Version) is read in.
xmlns | an XMLNamespaces object that will be used for the annotation. Implementation should override this method with something that adds the package's namespace(s) to the set of namespaces in xmlns . For instance, here is the code from the Layout package extension: if (!xmlns->containsUri( LayoutExtension::getXmlnsL2()))
xmlns->add(LayoutExtension::getXmlnsL2(), "layout");
|
Reimplemented in LayoutExtension.
|
virtual |
Creates and returns a deep copy of this QualExtension object.
Implements SBMLExtension.
|
virtualinherited |
Called to enable the package on the SBMLDocument object.
This virtual method should be overridden by all package extensions that want to serialize to an SBML Level 2 annotation. In Level 2, the XML namespace declaration for the package is not placed on the top-level SBML document object but rather inside individual annotations. addL2Namespaces() is invoked automatically for Level 2 documents when an SBMLExtensionNamespace object is created; removeL2Namespaces() is automatically invoked by SBMLDocument to prevent the namespace(s) from being put on the top-level SBML Level 2 element (because Level 2 doesn't support namespaces there); and enableL2NamespaceForDocument() is called automatically when any SBML document (of any Level/Version) is read in.
doc | the SBMLDocument object for the model. Implementations should override this method with something that enables the package based on the package's namespace(s). For example, here is the code from the Layout package extension: if (doc->getLevel() == 2)
|
Reimplemented in LayoutExtension.
|
static |
Returns the default SBML Level used by this libSBML package extension.
|
static |
Returns the default version of the SBML Level 3 package implemented by this libSBML extension.
|
static |
Returns the default SBML Version used by this libSBML package extension.
|
virtual |
Returns the SBML Level for the given URI of this package.
uri | the string of URI that represents one of versions of the “qual” package |
0
if the given URI is invalid. Implements SBMLExtension.
|
virtual |
Returns the name of this package ("qual")
Implements SBMLExtension.
|
inherited |
Returns the number of SBasePluginCreatorBase objects stored in this object.
|
inherited |
Returns the number of supported package namespace URIs.
|
static |
Returns the nickname of the SBML Level 3 package implemented by this libSBML extension.
|
virtual |
Returns the package version for the given URI of this package.
uri | the string of URI that represents one of versions of the “qual” package |
0
if the given URI is invalid. Implements SBMLExtension.
|
virtual |
Returns an QualPkgNamespaces object.
uri | the string of URI that represents one of versions of the “qual” package |
uri
, or NULL
if the URI is not defined in the Hierarchical Model Qualosition package. Implements SBMLExtension.
|
virtual |
Takes a type code of the “qual” package and returns a string describing the code.
Implements SBMLExtension.
|
inherited |
Returns the nth XML namespace URI.
n | the index number of the namespace URI being sought. |
|
virtual |
Returns the namespace URI corresponding to the combination of the given SBML Level, Version, and package version.
sbmlLevel | the level of SBML |
sbmlVersion | the version of SBML |
pkgVersion | the version of package |
Implements SBMLExtension.
|
virtual |
Returns the SBML Version for the given URI of this package.
uri | the string of URI that represents one of versions of the “qual” package |
0
if the given URI is invalid. Implements SBMLExtension.
|
static |
Returns the XML namespace URI of the SBML Level 3 package implemented by this libSBML extension.
|
inherited |
Returns true
if this package is enabled.
true
if this package is enabled, false
otherwise.
|
virtualinherited |
Indicates whether this extension is being used by the given SBMLDocument.
The default implementation returns true
. This means that when a document had this extension enabled, it will not be possible to convert it to SBML Level 2 as we cannot make sure that the extension can be converted.
doc | the SBML document to test. |
Reimplemented in LayoutExtension.
|
inherited |
Returns true
if the given XML namespace URI is supported by this package extension.
true
if the given XML namespace URI (equivalent to a package version) is supported by this package extension, false
otherwise. QualExtension & QualExtension::operator= | ( | const QualExtension & | rhs | ) |
Assignment operator for QualExtension.
|
virtualinherited |
Removes the package's Level 2 namespace(s).
This virtual method should be overridden by all package extensions that want to serialize to an SBML Level 2 annotation. In Level 2, the XML namespace declaration for the package is not placed on the top-level SBML document object but rather inside individual annotations. addL2Namespaces() is invoked automatically for Level 2 documents when an SBMLExtensionNamespace object is created; removeL2Namespaces() is automatically invoked by SBMLDocument to prevent the namespace(s) from being put on the top-level SBML Level 2 element (because Level 2 doesn't support namespaces there); and enableL2NamespaceForDocument() is called automatically when any SBML document (of any Level/Version) is read in.
xmlns | an XMLNamespaces object that will be used for the annotation. Implementations should override this method with something that removes the package's namespace(s) from the set of namespaces in xmlns . For instance, here is the code from the Layout package extension: for (int n = 0; n < xmlns->getNumNamespaces(); n++)
{
if (xmlns->getURI(n) == LayoutExtension::getXmlnsL2())
xmlns->remove(n);
}
|
Reimplemented in LayoutExtension.
|
inherited |
Enable or disable this package.
isEnabled | flag indicating whether to enable (if true ) or disable (false ) this package extension. |
true
if this call succeeded; false
otherwise.