COPASI API  4.40.278
CODEExporterC Class Reference

#include <CODEExporterC.h>

Inheritance diagram for CODEExporterC:
[legend]

Public Member Functions

 CODEExporterC ()
 
virtual std::string exportClosingString (const size_t tmp)
 
virtual bool exportKineticFunction (const CReaction *reac)
 
virtual bool exportKineticFunctionGroup (const CModel *copasiModel)
 
virtual std::string exportNumber (double number)
 
virtual bool exportSingleCompartment (const CCompartment *comp, std::string &expression, std::string &comments)
 
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)
 
virtual std::string getDisplayExpressionString (CExpression *tmp)
 
virtual std::string getSingleLineComment ()
 
virtual std::string KineticFunction2ODEmember (const CReaction *reac)
 
virtual bool preprocess (const CModel *copasiModel)
 
std::string setConcentrationName (const CModelEntity::Status &status, size_t n[], size_t dependent)
 
std::string setExportName (const CModelEntity::Status &status, size_t n[], size_t dependent)
 
void setExportNameOfFunction (const CEvaluationNode *pNode, std::set< std::string > &tmpset)
 
std::string setODEName (const std::string &objName)
 
virtual void setReservedNames ()
 
std::string testName (const std::string &name)
 
virtual std::string translateObjectName (const std::string &realName)
 
virtual std::string translateTimeVariableName ()
 
- Public Member Functions inherited from CODEExporter
void assembleSubTreeForMassAction (CEvaluationNode *newNode, CEvaluationNode *child1, CEvaluationNode *child2)
 
 CODEExporter ()
 
virtual bool exportClosingData (const CModel *copasiModel, std::ostream &os)
 
bool exportCompartments (const CModel *copasiModel)
 
std::string exportExpression (const CExpression *pExpression, const CDataModel *pDataModel)
 
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)
 
void exportObjectNodesFromModel (const CDataModel *pDataModel)
 
bool exportODEs (const CModel *copasiModel)
 
bool exportReacParamsAndFuncs (const CModel *copasiModel)
 
void exportSimulatedObject (const CDataObject *obj, const CDataModel *pDataModel)
 
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)
 
bool exportToStream (const CDataModel *pDataModel, std::ostream &os)
 
void findFunctionsCalls (const CEvaluationNode *pNode)
 
virtual std::string getDisplayFunctionString (CFunction *func)
 
virtual bool isEmptyString (std::string &str)
 
std::string isModelEntityExpressionODEExporterCompatible (const CModelEntity *tmp, const CExpression *pExpression, const CDataModel *pDataModel)
 
void modifyTreeForMassAction (CFunction *tmpfunc)
 
virtual std::string setConcentrationName (const std::string &objName)
 
virtual ~CODEExporter ()
 

Public Attributes

std::map< std::string, size_t > Frequancy
 
std::set< std::string > NameSet
 
- Public Attributes inherited from CODEExporter
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
 

Additional Inherited Members

- Public Types inherited from CODEExporter
enum  Object {
  INITIAL = 0 , FIXED , ASSIGNMENT , HEADERS ,
  FUNCTIONS , ODEs
}
 
- Protected Attributes inherited from CODEExporter
std::set< std::string > mExportedFunctions
 

Constructor & Destructor Documentation

◆ CODEExporterC()

CODEExporterC::CODEExporterC ( )

Constructor for the exporter.

Member Function Documentation

◆ exportClosingString()

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

◆ exportKineticFunction()

bool CODEExporterC::exportKineticFunction ( const CReaction reac)
virtual

Reimplemented from CODEExporter.

◆ exportKineticFunctionGroup()

◆ exportNumber()

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

Reimplemented from CODEExporter.

◆ exportSingleCompartment()

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

◆ exportSingleFunction()

◆ exportSingleMetabolite()

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

◆ exportSingleModelEntity()

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

◆ exportSingleModVal()

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

◆ exportSingleObject()

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

◆ exportSingleODE()

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

◆ exportSingleParameter()

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

◆ exportTitleData()

◆ exportTitleString()

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

◆ getDisplayExpressionString()

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

◆ getSingleLineComment()

std::string CODEExporterC::getSingleLineComment ( )
virtual

Reimplemented from CODEExporter.

◆ KineticFunction2ODEmember()

◆ preprocess()

◆ setConcentrationName()

std::string CODEExporterC::setConcentrationName ( const CModelEntity::Status status,
size_t  n[],
size_t  dependent 
)

◆ setExportName()

std::string CODEExporterC::setExportName ( const CModelEntity::Status status,
size_t  n[],
size_t  dependent 
)

◆ setExportNameOfFunction()

◆ setODEName()

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

Reimplemented from CODEExporter.

Referenced by preprocess().

◆ setReservedNames()

void CODEExporterC::setReservedNames ( )
virtual

Reimplemented from CODEExporter.

Referenced by preprocess().

◆ testName()

std::string CODEExporterC::testName ( const std::string &  name)

This method tests whether the given C name already assigned, put the new name (in cappital letters: all names can be upper or lower case) in the set of assigned names or modify the name

References Frequancy, and NameSet.

Referenced by translateObjectName().

◆ translateObjectName()

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

This method adapt a Copasi name for C syntax: Names can not start with a number. Any other combination of letters and numbers is valid as is the underscore.

Reimplemented from CODEExporter.

References testName().

Referenced by exportSingleFunction(), preprocess(), and setExportNameOfFunction().

◆ translateTimeVariableName()

std::string CODEExporterC::translateTimeVariableName ( )
virtual

Reimplemented from CODEExporter.

Referenced by preprocess().

Member Data Documentation

◆ Frequancy

std::map< std::string, size_t > CODEExporterC::Frequancy

◆ NameSet

std::set<std::string> CODEExporterC::NameSet

Referenced by testName().


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