COPASI API  4.40.278
CODEExporter Class Reference

#include <CODEExporter.h>

Inheritance diagram for CODEExporter:
[legend]

Public Types

enum  Object {
  INITIAL = 0 , FIXED , ASSIGNMENT , HEADERS ,
  FUNCTIONS , ODEs
}
 

Public Member Functions

void assembleSubTreeForMassAction (CEvaluationNode *newNode, CEvaluationNode *child1, CEvaluationNode *child2)
 
 CODEExporter ()
 
virtual bool exportClosingData (const CModel *copasiModel, std::ostream &os)
 
virtual std::string exportClosingString (const size_t tmp)
 
bool exportCompartments (const CModel *copasiModel)
 
std::string exportExpression (const CExpression *pExpression, const CDataModel *pDataModel)
 
virtual bool exportKineticFunction (const CReaction *reac)
 
virtual bool exportKineticFunctionGroup (const CModel *copasiModel)
 
virtual bool exportMetabolites (const CModel *copasiModel)
 
virtual bool exportMetabolitesConcentrations (const CModel *copasiModel)
 
bool exportModelEntityExpression (const CDataObject *obj, const CDataModel *pDataModel)
 
bool exportModelValues (const CModel *copasiModel)
 
bool exportModelValuesExpressions (const CModel *copasiModel)
 
virtual std::string exportNumber (double number)
 
void exportObjectNodesFromModel (const CDataModel *pDataModel)
 
bool exportODEs (const CModel *copasiModel)
 
bool exportReacParamsAndFuncs (const CModel *copasiModel)
 
void exportSimulatedObject (const CDataObject *obj, const CDataModel *pDataModel)
 
virtual bool exportSingleCompartment (const CCompartment *comp, std::string &expression, std::string &comments)
 
bool exportSingleFunction (CEvaluationNode *pNode, const CReaction *reac, size_t &index)
 
bool exportSingleFunction (CEvaluationNode *pNode, const std::string &key, size_t &index)
 
bool exportSingleFunction (const CFunction *func)
 
virtual bool exportSingleFunction (const CFunction *func, std::set< std::string > &isExported)
 
virtual bool exportSingleMetabolite (const CMetab *metab, std::string &expression, std::string &comments)
 
virtual bool exportSingleModelEntity (const CModelEntity *tmp, std::string &expression, std::string &comments)
 
virtual bool exportSingleModVal (const CModelValue *modval, std::string &expression, std::string &comments)
 
virtual bool exportSingleObject (std::ostringstream &which, const std::string &name, const std::string &expression, const std::string &comments)
 
virtual bool exportSingleODE (const CModelEntity *mentity, std::string &equation, std::string &comments)
 
virtual bool exportSingleParameter (const CCopasiParameter *param, std::string &expression, std::string &comments)
 
virtual bool exportTitleData (const CModel *copasiModel, std::ostream &os)
 
virtual std::string exportTitleString (const size_t tmp)
 
bool exportToStream (const CDataModel *pDataModel, std::ostream &os)
 
void findFunctionsCalls (const CEvaluationNode *pNode)
 
virtual std::string getDisplayExpressionString (CExpression *tmp)
 
virtual std::string getDisplayFunctionString (CFunction *func)
 
virtual std::string getSingleLineComment ()
 
virtual bool isEmptyString (std::string &str)
 
std::string isModelEntityExpressionODEExporterCompatible (const CModelEntity *tmp, const CExpression *pExpression, const CDataModel *pDataModel)
 
virtual std::string KineticFunction2ODEmember (const CReaction *reac)
 
void modifyTreeForMassAction (CFunction *tmpfunc)
 
virtual bool preprocess (const CModel *copasiModel)
 
virtual std::string setConcentrationName (const std::string &objName)
 
virtual std::string setODEName (const std::string &objName)
 
virtual void setReservedNames ()
 
virtual std::string translateObjectName (const std::string &realName)
 
virtual std::string translateTimeVariableName ()
 
virtual ~CODEExporter ()
 

Public Attributes

std::ostringstream assignment
 
std::map< std::string, std::string > equations
 
std::ostringstream fixed
 
std::ostringstream functions
 
std::ostringstream headers
 
std::ostringstream initial
 
std::map< std::string, std::string > NameMap
 
std::ostringstream ode
 
std::string timeKey
 

Protected Attributes

std::set< std::string > mExportedFunctions
 

Member Enumeration Documentation

◆ Object

Enumerator
INITIAL 
FIXED 
ASSIGNMENT 
HEADERS 
FUNCTIONS 
ODEs 

Constructor & Destructor Documentation

◆ CODEExporter()

CODEExporter::CODEExporter ( )

Constructor for the exporter.

◆ ~CODEExporter()

CODEExporter::~CODEExporter ( )
virtual

Destructor for the exporter.

Member Function Documentation

◆ assembleSubTreeForMassAction()

void CODEExporter::assembleSubTreeForMassAction ( CEvaluationNode newNode,
CEvaluationNode child1,
CEvaluationNode child2 
)

This method assembles an expression sub tree for some internal call of Mass Action. The sub tree has to be included in the tree of corresponding root kinetic function in order to export this function whithout the user defined internall Mass Action calls

References CCopasiNode< _Data >::addChild(), CEvaluationNode::copyBranch(), CEvaluationNode::create(), CEvaluationNode::mainType(), CEvaluationNode::MULTIPLY, CEvaluationNode::OPERATOR, CEvaluationNode::VARIABLE, and CEvaluationNode::VECTOR.

Referenced by modifyTreeForMassAction().

◆ exportClosingData()

bool CODEExporter::exportClosingData ( const CModel copasiModel,
std::ostream &  os 
)
virtual

Reimplemented in CODEExporterXPPAUT.

Referenced by exportToStream().

◆ exportClosingString()

std::string CODEExporter::exportClosingString ( const size_t  tmp)
virtual

Reimplemented in CODEExporterC.

Referenced by exportToStream().

◆ exportCompartments()

◆ exportExpression()

◆ exportKineticFunction()

◆ exportKineticFunctionGroup()

bool CODEExporter::exportKineticFunctionGroup ( const CModel copasiModel)
virtual

Reimplemented in CODEExporterC.

Referenced by exportToStream().

◆ exportMetabolites()

◆ exportMetabolitesConcentrations()

◆ exportModelEntityExpression()

◆ exportModelValues()

◆ exportModelValuesExpressions()

◆ exportNumber()

std::string CODEExporter::exportNumber ( double  number)
virtual

◆ exportObjectNodesFromModel()

◆ exportODEs()

◆ exportReacParamsAndFuncs()

◆ exportSimulatedObject()

◆ exportSingleCompartment()

bool CODEExporter::exportSingleCompartment ( const CCompartment comp,
std::string &  expression,
std::string &  comments 
)
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by exportCompartments().

◆ exportSingleFunction() [1/4]

bool CODEExporter::exportSingleFunction ( CEvaluationNode pNode,
const CReaction reac,
size_t &  index 
)

◆ exportSingleFunction() [2/4]

◆ exportSingleFunction() [3/4]

bool CODEExporter::exportSingleFunction ( const CFunction func)

◆ exportSingleFunction() [4/4]

bool CODEExporter::exportSingleFunction ( const CFunction func,
std::set< std::string > &  isExported 
)
virtual

Reimplemented in CODEExporterC.

◆ exportSingleMetabolite()

bool CODEExporter::exportSingleMetabolite ( const CMetab metab,
std::string &  expression,
std::string &  comments 
)
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by exportMetabolites().

◆ exportSingleModelEntity()

bool CODEExporter::exportSingleModelEntity ( const CModelEntity tmp,
std::string &  expression,
std::string &  comments 
)
virtual

◆ exportSingleModVal()

bool CODEExporter::exportSingleModVal ( const CModelValue modval,
std::string &  expression,
std::string &  comments 
)
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by exportModelValues().

◆ exportSingleObject()

bool CODEExporter::exportSingleObject ( std::ostringstream &  which,
const std::string &  name,
const std::string &  expression,
const std::string &  comments 
)
virtual

◆ exportSingleODE()

bool CODEExporter::exportSingleODE ( const CModelEntity mentity,
std::string &  equation,
std::string &  comments 
)
virtual

◆ exportSingleParameter()

bool CODEExporter::exportSingleParameter ( const CCopasiParameter param,
std::string &  expression,
std::string &  comments 
)
virtual

◆ exportTitleData()

bool CODEExporter::exportTitleData ( const CModel copasiModel,
std::ostream &  os 
)
virtual

Reimplemented in CODEExporterC.

Referenced by exportToStream().

◆ exportTitleString()

std::string CODEExporter::exportTitleString ( const size_t  tmp)
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by exportToStream().

◆ exportToStream()

◆ findFunctionsCalls()

◆ getDisplayExpressionString()

std::string CODEExporter::getDisplayExpressionString ( CExpression tmp)
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by exportExpression().

◆ getDisplayFunctionString()

std::string CODEExporter::getDisplayFunctionString ( CFunction func)
virtual

◆ getSingleLineComment()

std::string CODEExporter::getSingleLineComment ( )
virtual

◆ isEmptyString()

bool CODEExporter::isEmptyString ( std::string &  str)
virtual

This method tests if a string consists only of whitespace characters

Referenced by exportExpression(), exportModelEntityExpression(), exportReacParamsAndFuncs(), and CODEExporterXPPAUT::exportSingleODE().

◆ isModelEntityExpressionODEExporterCompatible()

◆ KineticFunction2ODEmember()

std::string CODEExporter::KineticFunction2ODEmember ( const CReaction reac)
virtual

◆ modifyTreeForMassAction()

◆ preprocess()

◆ setConcentrationName()

std::string CODEExporter::setConcentrationName ( const std::string &  objName)
virtual

Reimplemented in CODEExporterXPPAUT, and CODEExporterBM.

Referenced by preprocess().

◆ setODEName()

std::string CODEExporter::setODEName ( const std::string &  objName)
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by preprocess().

◆ setReservedNames()

void CODEExporter::setReservedNames ( )
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by preprocess().

◆ translateObjectName()

std::string CODEExporter::translateObjectName ( const std::string &  realName)
virtual

◆ translateTimeVariableName()

std::string CODEExporter::translateTimeVariableName ( )
virtual

Reimplemented in CODEExporterXPPAUT, CODEExporterC, and CODEExporterBM.

Referenced by preprocess().

Member Data Documentation

◆ assignment

◆ equations

std::map< std::string, std::string > CODEExporter::equations

◆ fixed

◆ functions

std::ostringstream CODEExporter::functions

◆ headers

std::ostringstream CODEExporter::headers

◆ initial

◆ mExportedFunctions

std::set<std::string> CODEExporter::mExportedFunctions
protected

◆ NameMap

◆ ode

◆ timeKey

std::string CODEExporter::timeKey

The documentation for this class was generated from the following files: