copasi API  0.1
Public Member Functions
CFunctionDB Class Reference

#include <CFunctionDB.h>

Inheritance diagram for CFunctionDB:
CCopasiContainer CCopasiObject

List of all members.

Public Member Functions

 CFunctionDB (const std::string &name, const CCopasiContainer *pParent)
 ~CFunctionDB ()
void cleanup ()
void initObjects ()
bool load ()
C_INT32 load (CReadConfig &configbuffer)
void setFilename (const std::string &filename)
std::string getFilename () const
bool add (CEvaluationTree *pFunction, const bool &adopt)
void addAndAdaptName (CEvaluationTree *pFunction)
bool removeFunction (unsigned C_INT32 index)
bool removeFunction (const std::string &key)
CEvaluationTreefindFunction (const std::string &functionName)
CEvaluationTreefindLoadFunction (const std::string &functionName)
CCopasiVectorN< CEvaluationTree > & loadedFunctions ()
std::vector< CFunction * > suitableFunctions (const unsigned C_INT32 noSubstrates, const unsigned C_INT32 noProducts, const TriLogic reversibility)
bool appendDependentFunctions (std::set< const CCopasiObject * > candidates, std::set< const CCopasiObject * > &dependentFunctions) const
std::set< std::string > listDependentTrees (const std::string &name) const
std::vector< CEvaluationTree * > getUsedFunctions (const CModel *pModel) const

Detailed Description

:pos 106.082,17.0878


Constructor & Destructor Documentation

CFunctionDB::CFunctionDB ( const std::string &  name,
const CCopasiContainer pParent 
)

Default constructor

Parameters:
conststd::string & name (default: "NoName")
constCCopasiContainer * pParent (default: NULL)

CFunctionDB

Created for Copasi by Stefan Hoops (C) Stefan Hoops 2001

CFunctionDB::~CFunctionDB ( )

Destructor


Member Function Documentation

bool CFunctionDB::add ( CEvaluationTree pFunction,
const bool &  adopt 
)

Add the function to the database

Parameters:
CEvaluationTree* pFunction
constbool & adopt (default = false)
Returns:
bool success
void CFunctionDB::addAndAdaptName ( CEvaluationTree pFunction)

Add the function to the database, if necessary adapt the name so it is unique.

bool CFunctionDB::appendDependentFunctions ( std::set< const CCopasiObject * >  candidates,
std::set< const CCopasiObject * > &  dependentFunctions 
) const

Appends pointers to function, which are dependent on any of the candidates to the list dependentFunctions.

Parameters:
std::set<const CCopasiObject * > candidates
std::set<const CCopasiObject * > & dependentFunctions
Returns:
bool functionsAppended
void CFunctionDB::cleanup ( )
CEvaluationTree * CFunctionDB::findFunction ( const std::string &  functionName)

Delete the function functionName from the database

Parameters:
const string&functionName
Returns:
C_INT32 Fail Search for a function among the loaded functions. If no function is found NULL is returned
Parameters:
const string&functionName
Returns:
CEvaluationTree *
CEvaluationTree * CFunctionDB::findLoadFunction ( const std::string &  functionName)

Search for a function among the loaded functions. If no function is found the database is searched and the apropriate function is loaded.

Parameters:
const string&functionName
Returns:
CEvaluationTree * function (NULL if function is not found)
std::string CFunctionDB::getFilename ( ) const
std::vector< CEvaluationTree * > CFunctionDB::getUsedFunctions ( const CModel pModel) const

Retrieves a list of all functions used in the model

Returns:
std::vector< CEvaluationTree * > usedFunctions
void CFunctionDB::initObjects ( )

Reimplemented from CCopasiContainer.

std::set< std::string > CFunctionDB::listDependentTrees ( const std::string &  name) const

Retrieve a list of evaluation trees depending on the tree with the given name.

Parameters:
conststd::string & name
Returns:
std::set<std::string> list
bool CFunctionDB::load ( )
C_INT32 CFunctionDB::load ( CReadConfig configbuffer)

Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)

Parameters:
pconfigbufferreference to a CReadConfig object.
Returns:
mFail
CCopasiVectorN< CEvaluationTree > & CFunctionDB::loadedFunctions ( )

Retrieves the vector of loaded functions.

Returns:
"CCopasiVectorNS < CKinFunction > &" loadedFunctions
bool CFunctionDB::removeFunction ( unsigned C_INT32  index)
bool CFunctionDB::removeFunction ( const std::string &  key)
void CFunctionDB::setFilename ( const std::string &  filename)
std::vector< CFunction * > CFunctionDB::suitableFunctions ( const unsigned C_INT32  noSubstrates,
const unsigned C_INT32  noProducts,
const TriLogic  reversibility 
)

Retrieves the vector of functions that are suitable for a number of substrates, products and reversibility status. Note: The returns CCopasiVector has to be deleted after use!

Parameters:
const unsigned C_INT32noSubstrates the number of substrates
const unsigned C_INT32noProducts the number of products
const TriLogicreversible the reversibility status
Returns:
"std::vector<CFunction*> " suitableFunctions

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines