libSBML C++ API  5.11.0
LayoutExtension Class Reference
Inheritance diagram for LayoutExtension:
[legend]

Detailed Description

layout Base extension class for the package.

Public Member Functions

virtual void addL2Namespaces (XMLNamespaces *xmlns) const
 adds all L2 Extension namespaces to the namespace list. More...
 
virtual LayoutExtensionclone () const
 Creates and returns a deep copy of this LayoutExtension object. More...
 
virtual void enableL2NamespaceForDocument (SBMLDocument *doc) const
 Adds the L2 Namespace to the document and enables the extension. 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 ("layout") 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 SBMLNamespacesgetSBMLExtensionNamespaces (const std::string &uri) const
 Returns an LayoutPkgNamespaces object. More...
 
virtual const char * getStringFromTypeCode (int typeCode) const
 Takes a type code of the “layout” 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
 Determines 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...
 
 LayoutExtension ()
 Constructor. More...
 
 LayoutExtension (const LayoutExtension &)
 Copy constructor. More...
 
LayoutExtensionoperator= (const LayoutExtension &)
 Assignment operator for LayoutExtension. More...
 
virtual void removeL2Namespaces (XMLNamespaces *xmlns) const
 Removes the L2 Namespace from a document. More...
 
bool setEnabled (bool isEnabled)
 Enable or disable this package. More...
 
virtual ~LayoutExtension ()
 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 & getXmlnsL2 ()
 Returns the XML namespace URI of the SBML Level 2 version of the 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...
 
static const std::string & getXmlnsXSI ()
 Returns the XML namespace URI of any additional XML namespaces needed or used by this SBML Level 3 package. More...
 

Constructor & Destructor Documentation

LayoutExtension::LayoutExtension ( )

Constructor.

LayoutExtension::LayoutExtension ( const LayoutExtension orig)

Copy constructor.

LayoutExtension::~LayoutExtension ( )
virtual

Destroy this object.

Member Function Documentation

void LayoutExtension::addL2Namespaces ( XMLNamespaces xmlns) const
virtual

adds all L2 Extension namespaces to the namespace list.

This method should be overridden by all extensions that want to serialize to an L2 annotation.

Reimplemented from SBMLExtension.

LayoutExtension * LayoutExtension::clone ( ) const
virtual

Creates and returns a deep copy of this LayoutExtension object.

Returns
a (deep) copy of this LayoutExtension object

Implements SBMLExtension.

void LayoutExtension::enableL2NamespaceForDocument ( SBMLDocument doc) const
virtual

Adds the L2 Namespace to the document and enables the extension.

If the extension supports serialization to SBML L2 Annotations, this method should be overrridden, so it will be activated.

Reimplemented from SBMLExtension.

unsigned int LayoutExtension::getDefaultLevel ( )
static

Returns the default SBML Level used by this libSBML package extension.

Returns
the SBML Level.
unsigned int LayoutExtension::getDefaultPackageVersion ( )
static

Returns the default version of the SBML Level 3 package implemented by this libSBML extension.

Returns
the default version number of the SBML Level 3 package definition.
unsigned int LayoutExtension::getDefaultVersion ( )
static

Returns the default SBML Version used by this libSBML package extension.

Returns
the Version within the default SBML Level.
unsigned int LayoutExtension::getLevel ( const std::string &  uri) const
virtual

Returns the SBML Level for the given URI of this package.

Parameters
urithe string of URI that represents one of versions of the “layout” package
Returns
the SBML Level with the given URI of this package, or 0 if the given URI is invalid.

Implements SBMLExtension.

const std::string & LayoutExtension::getName ( ) const
virtual

Returns the name of this package ("layout")

Returns
the name of this package ("layout")

Implements SBMLExtension.

int SBMLExtension::getNumOfSBasePlugins ( ) const
inherited

Returns the number of SBasePluginCreatorBase objects stored in this object.

Returns
the total number of SBasePluginCreatorBase objects stored in this SBMLExtension-derived object.
unsigned int SBMLExtension::getNumOfSupportedPackageURI ( ) const
inherited

Returns the number of supported package namespace URIs.

Returns
the number of supported package XML namespace URIs of this package extension.
const std::string & LayoutExtension::getPackageName ( )
static

Returns the nickname of the SBML Level 3 package implemented by this libSBML extension.

Returns
the package nickname, as a string.
unsigned int LayoutExtension::getPackageVersion ( const std::string &  uri) const
virtual

Returns the package version for the given URI of this package.

Parameters
urithe string of URI that represents one of versions of the “layout” package
Returns
the package version with the given URI of this package, or 0 if the given URI is invalid.

Implements SBMLExtension.

SBMLNamespaces * LayoutExtension::getSBMLExtensionNamespaces ( const std::string &  uri) const
virtual

Returns an LayoutPkgNamespaces object.

Parameters
urithe string of URI that represents one of versions of the “layout” package
Returns
an LayoutPkgNamespace object corresponding to the given uri, or NULL if the URI is not defined in the Layout package.

Implements SBMLExtension.

const char * LayoutExtension::getStringFromTypeCode ( int  typeCode) const
virtual

Takes a type code of the “layout” package and returns a string describing the code.

Implements SBMLExtension.

const std::string & SBMLExtension::getSupportedPackageURI ( unsigned int  n) const
inherited

Returns the nth XML namespace URI.

Parameters
nthe index number of the namespace URI being sought.
Returns
a string representing the XML namespace URI understood to be supported by this package. An empty string will be returned if there is no nth URI.
const std::string & LayoutExtension::getURI ( unsigned int  sbmlLevel,
unsigned int  sbmlVersion,
unsigned int  pkgVersion 
) const
virtual

Returns the namespace URI corresponding to the combination of the given SBML Level, Version, and package version.

Parameters
sbmlLevelthe level of SBML
sbmlVersionthe version of SBML
pkgVersionthe version of package
Returns
a string of the package URI, or an empty string if no corresponding URI exists.

Implements SBMLExtension.

unsigned int LayoutExtension::getVersion ( const std::string &  uri) const
virtual

Returns the SBML Version for the given URI of this package.

Parameters
urithe string of URI that represents one of versions of the “layout” package
Returns
the SBML version with the given URI of this package, or 0 if the given URI is invalid.

Implements SBMLExtension.

const std::string & LayoutExtension::getXmlnsL2 ( )
static

Returns the XML namespace URI of the SBML Level 2 version of the package implemented by this libSBML Extension.

Unique among the SBML Level 3 packages, the Layout package existed and was in widespread use prior to the introduction of SBML Level 3. The Layout package was used as model annotations in SBML Level 2. This method returns the SBML annotation XML namespace used for Level 2.

Returns
the XML namespace as a string.
Examples:
addLayout.cpp, example1.cpp, example2.cpp, and example3.cpp.
const std::string & LayoutExtension::getXmlnsL3V1V1 ( )
static

Returns the XML namespace URI of the SBML Level 3 package implemented by this libSBML extension.

Returns
the XML namespace as a string.
Examples:
addLayout.cpp.
const std::string & LayoutExtension::getXmlnsXSI ( )
static

Returns the XML namespace URI of any additional XML namespaces needed or used by this SBML Level 3 package.

Returns
the XML namespace as a string.
bool SBMLExtension::isEnabled ( ) const
inherited

Returns true if this package is enabled.

Returns
true if this package is enabled, false otherwise.
bool LayoutExtension::isInUse ( SBMLDocument doc) const
virtual

Determines whether this extension is being used by the given SBMLDocument.

The implementation returns true if the model object contains one or more layouts.

Parameters
docthe sbml document to test.
Returns
a boolean indicating whether the extension is actually being used byy the document.

Reimplemented from SBMLExtension.

bool SBMLExtension::isSupported ( const std::string &  uri) const
inherited

Returns true if the given XML namespace URI is supported by this package extension.

Returns
true if the given XML namespace URI (equivalent to a package version) is supported by this package extension, false otherwise.
LayoutExtension & LayoutExtension::operator= ( const LayoutExtension orig)

Assignment operator for LayoutExtension.

void LayoutExtension::removeL2Namespaces ( XMLNamespaces xmlns) const
virtual

Removes the L2 Namespace from a document.

This method should be overridden by all extensions that want to serialize to an L2 annotation.

Reimplemented from SBMLExtension.

bool SBMLExtension::setEnabled ( bool  isEnabled)
inherited

Enable or disable this package.

Parameters
isEnabledflag indicating whether to enable (if true) or disable (false) this package extension.
Returns
true if this call succeeded; false otherwise.