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

Detailed Description

{fbc} Implementation of the 'fbc' package extention to the Model construct.

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 XML namespace (URI) of the package extension of this plugin object. 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 package name of this plugin object. More...
 
unsigned int getPackageVersion () const
 Returns the package version of the package extension of this plugin object. More...
 
SBasegetParentSBMLObject ()
 Returns the parent SBase object to which this plugin object connected. More...
 
const SBasegetParentSBMLObject () const
 Returns the parent SBase object to which this plugin object connected. More...
 
const std::string & getPrefix () const
 Returns the prefix of the package extension of this plugin object. More...
 
SBMLDocumentgetSBMLDocument ()
 Returns the parent SBMLDocument of this plugin object. More...
 
const SBMLDocumentgetSBMLDocument () const
 Returns the parent SBMLDocument of this plugin object. More...
 
std::string getURI () const
 Gets the URI to which this element belongs to. More...
 
unsigned int getVersion () const
 Returns the SBML version 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 element belongs to. 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 operation. The possible return values 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 operation. The possible return values 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 operation. The possible return values 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
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
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 XML namespace (URI) of the package extension of this plugin object.

Returns
the URI of the package extension of this plugin object.
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 of the package extension of this plugin object.
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 package name of this plugin object.

Returns
the package name of this plugin object.
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.
SBase * SBasePlugin::getParentSBMLObject ( )
inherited

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

Returns
the parent SBase object to which this plugin object connected.
const SBase * SBasePlugin::getParentSBMLObject ( ) const
inherited

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

Returns
the parent SBase object to which this plugin object connected.
const std::string & SBasePlugin::getPrefix ( ) const
inherited

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

Returns
the prefix of the package extension of this plugin object.
SBMLDocument * SBasePlugin::getSBMLDocument ( )
inherited

Returns the parent SBMLDocument of this plugin object.

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

Returns the parent SBMLDocument of this plugin object.

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

Gets the URI to which this element belongs to.

For example, all elements that belong to SBML Level 3 Version 1 Core must would have the URI "http://www.sbml.org/sbml/level3/version1/core"; all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must would have the URI "http://www.sbml.org/sbml/level3/version1/layout/version1/"

Unlike getElementNamespace, this function first returns the URI for this element by looking into the SBMLNamespaces object of the document with the its package name. if not found it will return the result of getElementNamespace

Returns
the URI this elements
See also
getPackageName()
getElementNamespace()
SBMLDocument::getSBMLNamespaces()
getSBMLDocument()
unsigned int SBasePlugin::getVersion ( ) const
inherited

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

Returns
the SBML version of the package extension of this plugin object.
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.

int SBasePlugin::setElementNamespace ( const std::string &  uri)
inherited

Sets the XML namespace to which this element belongs to.

For example, all elements that belong to SBML Level 3 Version 1 Core must set the namespace to "http://www.sbml.org/sbml/level3/version1/core"; all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must set the namespace to "http://www.sbml.org/sbml/level3/version1/layout/version1/"

Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
void FbcModelPlugin::unsetActiveObjectiveId ( )

Unsets the active objective.