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

Detailed Description

fbc Extension of Model.

Examples:
fbc_example1.cpp.

Public Member Functions

int addFluxBound (const FluxBound *bound)
 Adds a copy of the given FluxBound object to the list of FluxBounds. More...
 
int addGeneAssociation (const GeneAssociation *association)
 Adds a copy of the given GeneAssociation object to the list of GeneAssociations. More...
 
int addObjective (const Objective *bound)
 Adds a copy of the given Objective object to the list of Objectives. More...
 
virtual FbcModelPluginclone () const
 Creates and returns a deep copy of this FbcModelPlugin object. More...
 
FluxBoundcreateFluxBound ()
 Creates a new FluxBound object and adds it to the list of FluxBound objects and returns it. More...
 
GeneAssociationcreateGeneAssociation ()
 Creates a new GeneAssociation object and adds it to the list of GeneAssociation objects and returns it. More...
 
ObjectivecreateObjective ()
 Creates a new Objective object and adds it to the list of Objective objects and returns it. More...
 
 FbcModelPlugin (const std::string &uri, const std::string &prefix, FbcPkgNamespaces *fbcns)
 Constructor. More...
 
 FbcModelPlugin (const FbcModelPlugin &orig)
 Copy constructor. More...
 
ObjectivegetActiveObjective ()
 Returns the current active objective. More...
 
const ObjectivegetActiveObjective () const
 Returns the current active objective. More...
 
std::string getActiveObjectiveId () const
 returns the id of the current active objective. More...
 
virtual ListgetAllElements (ElementFilter *filter=NULL)
 Returns a List of all child SBase* objects, including those nested to an arbitrary depth. More...
 
virtual SBasegetElementByMetaId (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 SBasegetElementBySId (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 namespace URI of the package to which this plugin object belongs. More...
 
const FluxBoundgetFluxBound (unsigned int n) const
 Returns the FluxBound object that belongs to the given index. More...
 
FluxBoundgetFluxBound (unsigned int n)
 Returns the FluxBound object that belongs to the given index. More...
 
FluxBoundgetFluxBound (const std::string &sid)
 Returns the FluxBound object based on its identifier. More...
 
const FluxBoundgetFluxBound (const std::string &sid) const
 Returns the FluxBound object based on its identifier. More...
 
ListOfFluxBoundsgetFluxBoundsForReaction (const std::string &reaction) const
 
const GeneAssociationgetGeneAssociation (unsigned int n) const
 Returns the GeneAssociation object that belongs to the given index. More...
 
GeneAssociationgetGeneAssociation (unsigned int n)
 Returns the GeneAssociation object that belongs to the given index. More...
 
GeneAssociationgetGeneAssociation (const std::string &sid)
 Returns the GeneAssociation object based on its identifier. More...
 
const GeneAssociationgetGeneAssociation (const std::string &sid) const
 Returns the GeneAssociation object based on its identifier. More...
 
unsigned int getLevel () const
 Returns the SBML Level of the package extension of this plugin object. More...
 
const ListOfFluxBoundsgetListOfFluxBounds () const
 ------------------------------------------------------------------ More...
 
ListOfFluxBoundsgetListOfFluxBounds ()
 Returns the ListOfFluxBounds in this plugin object. More...
 
const ListOfGeneAssociationsgetListOfGeneAssociations () const
 Returns the ListOfObjectives in this plugin object. More...
 
ListOfGeneAssociationsgetListOfGeneAssociations ()
 Returns the ListOfGeneAssociations in this plugin object. More...
 
const ListOfObjectivesgetListOfObjectives () const
 Returns the ListOfObjectives in this plugin object. More...
 
ListOfObjectivesgetListOfObjectives ()
 Returns the ListOfObjectives in this plugin object. More...
 
unsigned int getNumFluxBounds () const
 Returns the number of FluxBound object in this plugin object. More...
 
int getNumGeneAssociations () const
 Returns the number of GeneAssociation object in this plugin object. More...
 
unsigned int getNumObjectives () const
 Returns the number of Objective object in this plugin object. More...
 
const ObjectivegetObjective (unsigned int n) const
 Returns the Objective object that belongs to the given index. More...
 
ObjectivegetObjective (unsigned int n)
 Returns the Objective object that belongs to the given index. More...
 
ObjectivegetObjective (const std::string &sid)
 Returns the Objective object based on its identifier. More...
 
const ObjectivegetObjective (const std::string &sid) const
 Returns the Objective object based on its identifier. More...
 
const std::string & getPackageName () const
 Returns the short-form name of the package to which this plugin object belongs. More...
 
unsigned int getPackageVersion () const
 Returns the package version of the package extension of this plugin object. More...
 
SBasegetParentSBMLObject ()
 Returns the parent object to which this plugin object is connected. More...
 
const SBasegetParentSBMLObject () const
 Returns the parent object to which this plugin object is connected. More...
 
const std::string & getPrefix () const
 Returns the XML namespace prefix of the package to which this plugin object belongs. More...
 
SBMLDocumentgetSBMLDocument ()
 Returns the SBMLDocument object containing this object instance. More...
 
const SBMLDocumentgetSBMLDocument () const
 Returns the SBMLDocument object containing this object instance. More...
 
std::string getURI () const
 Returns the XML namespace URI for the package to which this object belongs. More...
 
unsigned int getVersion () const
 Returns the Version within the SBML Level of the package extension of this plugin object. More...
 
FbcModelPluginoperator= (const FbcModelPlugin &orig)
 Assignment operator for FbcModelPlugin . More...
 
FluxBoundremoveFluxBound (unsigned int n)
 Removes the nth FluxBound object from this plugin object and returns a pointer to it. More...
 
FluxBoundremoveFluxBound (const std::string &sid)
 Removes the FluxBound object with the given sid attribute from this plugin object and returns a pointer to it. More...
 
GeneAssociationremoveGeneAssociation (unsigned int n)
 Removes the nth GeneAssociation object from this plugin object and returns a pointer to it. More...
 
GeneAssociationremoveGeneAssociation (const std::string &sid)
 Removes the GeneAssociation object with the given sid attribute from this plugin object and returns a pointer to it. More...
 
ObjectiveremoveObjective (unsigned int n)
 Removes the nth Objective object from this plugin object and returns a pointer to it. More...
 
ObjectiveremoveObjective (const std::string &sid)
 Removes the Objective object with the given sid attribute from this plugin object and returns a pointer to it. More...
 
int setActiveObjectiveId (const std::string &objectiveId)
 Sets the id of the active objective. More...
 
int setElementNamespace (const std::string &uri)
 Sets the XML namespace to which this object belongs. More...
 
void unsetActiveObjectiveId ()
 Unsets the active objective. More...
 
virtual ~FbcModelPlugin ()
 Destroy this object. More...
 

Constructor & Destructor Documentation

FbcModelPlugin::FbcModelPlugin ( const std::string &  uri,
const std::string &  prefix,
FbcPkgNamespaces fbcns 
)

Constructor.

FbcModelPlugin::FbcModelPlugin ( const FbcModelPlugin orig)

Copy constructor.

Creates a copy of this FbcModelPlugin object.

FbcModelPlugin::~FbcModelPlugin ( )
virtual

Destroy this object.

Member Function Documentation

int FbcModelPlugin::addFluxBound ( const FluxBound bound)

Adds a copy of the given FluxBound object to the list of FluxBounds.

Parameters
boundthe FluxBound object to be added to the list of FluxBounds.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int FbcModelPlugin::addGeneAssociation ( const GeneAssociation association)

Adds a copy of the given GeneAssociation object to the list of GeneAssociations.

Parameters
associationthe GeneAssociation object to be added to the list of GeneAssociations.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int FbcModelPlugin::addObjective ( const Objective bound)

Adds a copy of the given Objective object to the list of Objectives.

Parameters
boundthe Objective object to be added to the list of Objectives.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
FbcModelPlugin * FbcModelPlugin::clone ( ) const
virtual

Creates and returns a deep copy of this FbcModelPlugin object.

Returns
a (deep) copy of this FbcModelPlugin object

Implements SBasePlugin.

FluxBound * FbcModelPlugin::createFluxBound ( )

Creates a new FluxBound object and adds it to the list of FluxBound objects and returns it.

Returns
a newly created FluxBound object
Examples:
fbc_example1.cpp.
GeneAssociation * FbcModelPlugin::createGeneAssociation ( )

Creates a new GeneAssociation object and adds it to the list of GeneAssociation objects and returns it.

Returns
a newly created GeneAssociation object
Objective * FbcModelPlugin::createObjective ( )

Creates a new Objective object and adds it to the list of Objective objects and returns it.

Returns
a newly created Objective object
Examples:
fbc_example1.cpp.
Objective * FbcModelPlugin::getActiveObjective ( )

Returns the current active objective.

const Objective * FbcModelPlugin::getActiveObjective ( ) const

Returns the current active objective.

std::string FbcModelPlugin::getActiveObjectiveId ( ) const

returns the id of the current active objective.

List * FbcModelPlugin::getAllElements ( ElementFilter filter = NULL)
virtual

Returns a List of all child SBase* objects, including those nested to an arbitrary depth.

Returns
a List* of pointers to all children objects.

Reimplemented from SBasePlugin.

SBase * FbcModelPlugin::getElementByMetaId ( const std::string &  metaid)
virtual

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.

Parameters
metaidstring representing the metaid of objects to find
Returns
a pointer to the SBase element with the given metaid.

Reimplemented from SBasePlugin.

SBase * FbcModelPlugin::getElementBySId ( const std::string &  id)
virtual

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.

Parameters
idstring representing the id of objects to find
Returns
a pointer to the SBase element with the given id.

Reimplemented from SBasePlugin.

const std::string & SBasePlugin::getElementNamespace ( ) const
inherited

Returns the namespace URI of the package to which this plugin object belongs.

Returns
the XML namespace URI of the SBML Level 3 package implemented by this libSBML package extension.
const FluxBound * FbcModelPlugin::getFluxBound ( unsigned int  n) const

Returns the FluxBound object that belongs to the given index.

If the index is invalid, NULL is returned.

Parameters
nthe index number of the FluxBound to get.
Returns
the nth FluxBound in the ListOfFluxBounds.
FluxBound * FbcModelPlugin::getFluxBound ( unsigned int  n)

Returns the FluxBound object that belongs to the given index.

If the index is invalid, NULL is returned.

Parameters
nthe index number of the FluxBound to get.
Returns
the nth FluxBound in the ListOfFluxBounds.
FluxBound * FbcModelPlugin::getFluxBound ( const std::string &  sid)

Returns the FluxBound object based on its identifier.

Parameters
sida string representing the identifier of the FluxBound to get.
Returns
FluxBound in the ListOfFluxBounds with the given sid or NULL if no such FluxBound exists.
See also
getFluxBound(unsigned int n)
getListOfFluxBounds()
const FluxBound * FbcModelPlugin::getFluxBound ( const std::string &  sid) const

Returns the FluxBound object based on its identifier.

Parameters
sida string representing the identifier of the FluxBound to get.
Returns
FluxBound in the ListOfFluxBounds with the given sid or NULL if no such FluxBound exists.
See also
getFluxBound(unsigned int n)
getListOfFluxBounds()
ListOfFluxBounds * FbcModelPlugin::getFluxBoundsForReaction ( const std::string &  reaction) const
const GeneAssociation * FbcModelPlugin::getGeneAssociation ( unsigned int  n) const

Returns the GeneAssociation object that belongs to the given index.

If the index is invalid, NULL is returned.

Parameters
nthe index number of the GeneAssociation to get.
Returns
the nth GeneAssociation in the ListOfGeneAssociations.
GeneAssociation * FbcModelPlugin::getGeneAssociation ( unsigned int  n)

Returns the GeneAssociation object that belongs to the given index.

If the index is invalid, NULL is returned.

Parameters
nthe index number of the GeneAssociation to get.
Returns
the nth GeneAssociation in the ListOfGeneAssociations.
GeneAssociation * FbcModelPlugin::getGeneAssociation ( const std::string &  sid)

Returns the GeneAssociation object based on its identifier.

Parameters
sida string representing the identifier of the GeneAssociation to get.
Returns
GeneAssociation in the ListOfGeneAssociations with the given sid or NULL if no such GeneAssociation exists.
See also
getGeneAssociation(unsigned int n)
getListOfGeneAssociations()
const GeneAssociation * FbcModelPlugin::getGeneAssociation ( const std::string &  sid) const

Returns the GeneAssociation object based on its identifier.

Parameters
sida string representing the identifier of the GeneAssociation to get.
Returns
GeneAssociation in the ListOfGeneAssociations with the given sid or NULL if no such GeneAssociation exists.
See also
getGeneAssociation(unsigned int n)
getListOfGeneAssociations()
unsigned int SBasePlugin::getLevel ( ) const
inherited

Returns the SBML Level of the package extension of this plugin object.

Returns
the SBML Level.
See also
getVersion()
const ListOfFluxBounds * FbcModelPlugin::getListOfFluxBounds ( ) const

------------------------------------------------------------------

Additional public functions

------------------------------------------------------------------ Returns the ListOfFluxBounds in this plugin object.

Returns
ListOfFluxBounds object in this plugin object.
ListOfFluxBounds * FbcModelPlugin::getListOfFluxBounds ( )

Returns the ListOfFluxBounds in this plugin object.

Returns
ListOfFluxBounds object in this plugin object.
const ListOfGeneAssociations * FbcModelPlugin::getListOfGeneAssociations ( ) const

Returns the ListOfObjectives in this plugin object.

Returns
ListOfObjectives object in this plugin object.
ListOfGeneAssociations * FbcModelPlugin::getListOfGeneAssociations ( )

Returns the ListOfGeneAssociations in this plugin object.

Returns
ListOfGeneAssociations object in this plugin object.
const ListOfObjectives * FbcModelPlugin::getListOfObjectives ( ) const

Returns the ListOfObjectives in this plugin object.

Returns
ListOfObjectives object in this plugin object.
ListOfObjectives * FbcModelPlugin::getListOfObjectives ( )

Returns the ListOfObjectives in this plugin object.

Returns
ListOfObjectives object in this plugin object.
unsigned int FbcModelPlugin::getNumFluxBounds ( ) const

Returns the number of FluxBound object in this plugin object.

Returns
the number of FluxBound object in this plugin object.
int FbcModelPlugin::getNumGeneAssociations ( ) const

Returns the number of GeneAssociation object in this plugin object.

Returns
the number of GeneAssociation object in this plugin object.
unsigned int FbcModelPlugin::getNumObjectives ( ) const

Returns the number of Objective object in this plugin object.

Returns
the number of Objective object in this plugin object.
const Objective * FbcModelPlugin::getObjective ( unsigned int  n) const

Returns the Objective object that belongs to the given index.

If the index is invalid, NULL is returned.

Parameters
nthe index number of the Objective to get.
Returns
the nth Objective in the ListOfObjectives.
Objective * FbcModelPlugin::getObjective ( unsigned int  n)

Returns the Objective object that belongs to the given index.

If the index is invalid, NULL is returned.

Parameters
nthe index number of the Objective to get.
Returns
the nth Objective in the ListOfObjectives.
Objective * FbcModelPlugin::getObjective ( const std::string &  sid)

Returns the Objective object based on its identifier.

Parameters
sida string representing the identifier of the Objective to get.
Returns
Objective in the ListOfObjectives with the given id or NULL if no such Objective exists.
See also
getObjective(unsigned int n)
getListOfObjectives()
const Objective * FbcModelPlugin::getObjective ( const std::string &  sid) const

Returns the Objective object based on its identifier.

Parameters
sida string representing the identifier of the Objective to get.
Returns
Objective in the ListOfObjectives with the given sid or NULL if no such Objective exists.
See also
getObjective(unsigned int n)
getListOfObjectives()
const std::string & SBasePlugin::getPackageName ( ) const
inherited

Returns the short-form name of the package to which this plugin object belongs.

Returns
the short-form package name (or nickname) of the SBML package implemented by this package extension.
unsigned int SBasePlugin::getPackageVersion ( ) const
inherited

Returns the package version of the package extension of this plugin object.

Returns
the package version of the package extension of this plugin object.
See also
getLevel()
getVersion()
SBase * SBasePlugin::getParentSBMLObject ( )
inherited

Returns the parent object to which this plugin object is connected.

Returns
the parent object of this object.
const SBase * SBasePlugin::getParentSBMLObject ( ) const
inherited

Returns the parent object to which this plugin object is connected.

Returns
the parent object of this object.
const std::string & SBasePlugin::getPrefix ( ) const
inherited

Returns the XML namespace prefix of the package to which this plugin object belongs.

Returns
the XML namespace prefix of the SBML Level 3 package implemented by this libSBML package extension.
SBMLDocument * SBasePlugin::getSBMLDocument ( )
inherited

Returns the SBMLDocument object containing this object instance.

LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). An SBML model in libSBML is contained inside an SBMLDocument object. SBMLDocument corresponds roughly to the class SBML defined in the SBML Level 3 and Level 2 specifications, but it does not have a direct correspondence in SBML Level 1. (But, it is created by libSBML no matter whether the model is Level 1, Level 2 or Level 3.)

This method allows the caller to obtain the SBMLDocument for the current object.

Returns
the parent SBMLDocument object of this plugin object.
See also
getParentSBMLObject()
const SBMLDocument * SBasePlugin::getSBMLDocument ( ) const
inherited

Returns the SBMLDocument object containing this object instance.

LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). An SBML model in libSBML is contained inside an SBMLDocument object. SBMLDocument corresponds roughly to the class SBML defined in the SBML Level 3 and Level 2 specifications, but it does not have a direct correspondence in SBML Level 1. (But, it is created by libSBML no matter whether the model is Level 1, Level 2 or Level 3.)

This method allows the caller to obtain the SBMLDocument for the current object.

Returns
the parent SBMLDocument object of this plugin object.
See also
getParentSBMLObject()
std::string SBasePlugin::getURI ( ) const
inherited

Returns the XML namespace URI for the package to which this object belongs.

In the XML representation of an SBML document, XML namespaces are used to identify the origin of each XML construct used. XML namespaces are identified by their unique resource identifiers (URIs). The core SBML specifications stipulate the namespaces that must be used for core SBML constructs; for example, all XML elements that belong to SBML Level 3 Version 1 Core must be placed in the XML namespace identified by the URI "http://www.sbml.org/sbml/level3/version1/core". Individual SBML Level 3 packages define their own XML namespaces; for example, all elements belonging to the SBML Level 3 Layout Version 1 package must be placed in the XML namespace "http://www.sbml.org/sbml/level3/version1/layout/version1/".

This method first looks into the SBMLNamespaces object possessed by the parent SBMLDocument object of the current object. If this cannot be found, this method returns the result of getElementNamespace().

Returns
a string, the URI of the XML namespace to which this object belongs.
See also
getPackageName()
getElementNamespace()
SBMLDocument::getSBMLNamespaces()
getSBMLDocument()
unsigned int SBasePlugin::getVersion ( ) const
inherited

Returns the Version within the SBML Level of the package extension of this plugin object.

Returns
the SBML Version.
See also
getLevel()
FbcModelPlugin & FbcModelPlugin::operator= ( const FbcModelPlugin orig)

Assignment operator for FbcModelPlugin .

FluxBound * FbcModelPlugin::removeFluxBound ( unsigned int  n)

Removes the nth FluxBound object from this plugin object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters
nthe index of the FluxBound object to remove
Returns
the FluxBound object removed. As mentioned above, the caller owns the returned object. NULL is returned if the given index is out of range.
FluxBound * FbcModelPlugin::removeFluxBound ( const std::string &  sid)

Removes the FluxBound object with the given sid attribute from this plugin object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters
sidthe id attribute of the FluxBound object to remove
Returns
the FluxBound object removed. As mentioned above, the caller owns the returned object. NULL is returned if the given index is out of range.
GeneAssociation * FbcModelPlugin::removeGeneAssociation ( unsigned int  n)

Removes the nth GeneAssociation object from this plugin object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters
nthe index of the GeneAssociation object to remove
Returns
the GeneAssociation object removed. As mentioned above, the caller owns the returned object. NULL is returned if the given index is out of range.
GeneAssociation * FbcModelPlugin::removeGeneAssociation ( const std::string &  sid)

Removes the GeneAssociation object with the given sid attribute from this plugin object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters
sidthe id attribute of the GeneAssociation object to remove
Returns
the GeneAssociation object removed. As mentioned above, the caller owns the returned object. NULL is returned if the given index is out of range.
Objective * FbcModelPlugin::removeObjective ( unsigned int  n)

Removes the nth Objective object from this plugin object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters
nthe index of the Objective object to remove
Returns
the Objective object removed. As mentioned above, the caller owns the returned object. NULL is returned if the given index is out of range.
Objective * FbcModelPlugin::removeObjective ( const std::string &  sid)

Removes the Objective object with the given sid attribute from this plugin object and returns a pointer to it.

The caller owns the returned object and is responsible for deleting it.

Parameters
sidthe id attribute of the Objective object to remove
Returns
the Objective object removed. As mentioned above, the caller owns the returned object. NULL is returned if the given index is out of range.
int FbcModelPlugin::setActiveObjectiveId ( const std::string &  objectiveId)

Sets the id of the active objective.

Examples:
fbc_example1.cpp.
int SBasePlugin::setElementNamespace ( const std::string &  uri)
inherited

Sets the XML namespace to which this object belongs.

In the XML representation of an SBML document, XML namespaces are used to identify the origin of each XML construct used. XML namespaces are identified by their unique resource identifiers (URIs). The core SBML specifications stipulate the namespaces that must be used for core SBML constructs; for example, all XML elements that belong to SBML Level 3 Version 1 Core must be placed in the XML namespace identified by the URI "http://www.sbml.org/sbml/level3/version1/core". Individual SBML Level 3 packages define their own XML namespaces; for example, all elements belonging to the SBML Level 3 Layout Version 1 package must be placed in the XML namespace "http://www.sbml.org/sbml/level3/version1/layout/version1/".
Parameters
urithe URI to assign to this object.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
See also
getElementNamespace()
Examples:
convertLayout.cpp.
void FbcModelPlugin::unsetActiveObjectiveId ( )

Unsets the active objective.