libSBML Perl API  libSBML 5.10.0 Perl API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FbcExtension Class Reference
Inheritance diagram for FbcExtension:
[legend]

Detailed Description

{fbc} The core module of the 'fbc' package extension.

Public Member Functions

virtual void addL2Namespaces (XMLNamespaces *xmlns) const
 Adds all L2 Extension namespaces to the namespace list. More...
 
virtual FbcExtensionclone () const
 Creates and returns a deep copy of this FbcExtension object. More...
 
virtual void enableL2NamespaceForDocument (SBMLDocument *doc) const
 Adds the L2 Namespace to the document and enables the extension. More...
 
 FbcExtension ()
 Constructor. More...
 
 FbcExtension (const FbcExtension &)
 Copy constructor. 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 ("fbc") More...
 
int getNumOfSBasePlugins () const
 Returns the number of SBasePlugin objects stored in this object. More...
 
unsigned int getNumOfSupportedPackageURI () const
 Returns the number of supported package Namespace (package versions) of this package extension. 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 FbcPkgNamespaces object. More...
 
virtual const char * getStringFromTypeCode (int typeCode) const
 Takes a type code of the “fbc” package and returns a string describing the code. More...
 
const std::string & getSupportedPackageURI (unsigned int i) const
 Returns the ith URI (the supported package version) 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
 Check if this package is enabled (true) or disabled (false). 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 a flag indicating, whether the given URI (package version) is supported by this package extension. More...
 
FbcExtensionoperator= (const FbcExtension &)
 Assignment operator for FbcExtension. More...
 
virtual void removeL2Namespaces (XMLNamespaces *xmlns) const
 Removes the L2 Namespaces. More...
 
bool setEnabled (bool isEnabled)
 enable/disable this package. More...
 
virtual ~FbcExtension ()
 Destroy this object. More...
 

Static Public Member Functions

static unsigned int getDefaultLevel ()
 Returns the default SBML Level this extension. More...
 
static unsigned int getDefaultPackageVersion ()
 Returns the default SBML version this extension. More...
 
static unsigned int getDefaultVersion ()
 Returns the default SBML Version this extension. More...
 
static const std::string & getPackageName ()
 Returns the package name of this extension. More...
 
static const std::string & getXmlnsL3V1V1 ()
 Returns URI of supported versions of this package. More...
 

Constructor & Destructor Documentation

FbcExtension::FbcExtension ( )

Constructor.

FbcExtension::FbcExtension ( const FbcExtension orig)

Copy constructor.

FbcExtension::~FbcExtension ( )
virtual

Destroy this object.

Member Function Documentation

void SBMLExtension::addL2Namespaces ( XMLNamespaces xmlns) const
virtualinherited

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 in LayoutExtension.

FbcExtension * FbcExtension::clone ( ) const
virtual

Creates and returns a deep copy of this FbcExtension object.

Returns
a (deep) copy of this FbcExtension object

Implements SBMLExtension.

void SBMLExtension::enableL2NamespaceForDocument ( SBMLDocument doc) const
virtualinherited

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 in LayoutExtension.

unsigned int FbcExtension::getDefaultLevel ( )
static

Returns the default SBML Level this extension.

unsigned int FbcExtension::getDefaultPackageVersion ( )
static

Returns the default SBML version this extension.

unsigned int FbcExtension::getDefaultVersion ( )
static

Returns the default SBML Version this extension.

unsigned int FbcExtension::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 “fbc” 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 & FbcExtension::getName ( ) const
virtual

Returns the name of this package ("fbc")

Returns
the name of this package ("fbc")

Implements SBMLExtension.

int SBMLExtension::getNumOfSBasePlugins ( ) const
inherited

Returns the number of SBasePlugin objects stored in this object.

Returns
the number of SBasePlugin objects stored in this object.
unsigned int SBMLExtension::getNumOfSupportedPackageURI ( ) const
inherited

Returns the number of supported package Namespace (package versions) of this package extension.

Returns
the number of supported package Namespace (package versions) of this package extension.
const std::string & FbcExtension::getPackageName ( )
static

Returns the package name of this extension.

unsigned int FbcExtension::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 “fbc” package
Returns
the package version with the given URI of this package, or 0 if the given URI is invalid.

Implements SBMLExtension.

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

Returns an FbcPkgNamespaces object.

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

Implements SBMLExtension.

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

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

Implements SBMLExtension.

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

Returns the ith URI (the supported package version)

Parameters
ithe index of the list of URI (the list of supporeted package versions)
Returns
the URI of supported package version with the given index.
const std::string & FbcExtension::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 FbcExtension::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 “fbc” 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 & FbcExtension::getXmlnsL3V1V1 ( )
static

Returns URI of supported versions of this package.

bool SBMLExtension::isEnabled ( ) const
inherited

Check if this package is enabled (true) or disabled (false).

Returns
true if this package is enabled, otherwise false is returned.
bool SBMLExtension::isInUse ( SBMLDocument doc) const
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 L2 as we cannot make sure that the extension can be converted.

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

Reimplemented in LayoutExtension.

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

Returns a flag indicating, whether the given URI (package version) is supported by this package extension.

Returns
true if the given URI (package version) is supported by this package extension, otherwise false is returned.
FbcExtension & FbcExtension::operator= ( const FbcExtension orig)

Assignment operator for FbcExtension.

void SBMLExtension::removeL2Namespaces ( XMLNamespaces xmlns) const
virtualinherited

Removes the L2 Namespaces.

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

Reimplemented in LayoutExtension.

bool SBMLExtension::setEnabled ( bool  isEnabled)
inherited

enable/disable this package.

Returned value is the result of this function.

Parameters
isEnabledthe bool value: true (enabled) or false (disabled)
Returns
true if this function call succeeded, otherwise false is returned.