copasi API  0.1
Public Types | Public Member Functions | Public Attributes
CODEExporter Class Reference

#include <CODEExporter.h>

Inheritance diagram for CODEExporter:
CODEExporterBM CODEExporterC CODEExporterXPPAUT

List of all members.

Public Types

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

Public Member Functions

 CODEExporter ()
virtual ~CODEExporter ()
bool exportMathModel (const CCopasiDataModel *pDataModel, std::string mmasciiFilename, std::string Filter, bool overwriteFile)
virtual bool preprocess (const CModel *copasiModel)
virtual bool exportTitleData (const CModel *copasiModel, std::ofstream &outFile)
virtual bool exportMetabolites (const CModel *copasiModel)
virtual bool exportMetabolitesConcentrations (const CModel *copasiModel)
bool exportCompartments (const CModel *copasiModel)
bool exportModelValues (const CModel *copasiModel)
void exportObjectNodesFromModel (const CCopasiDataModel *pDataModel)
CCopasiObjectfindObjectFromRefresh (const CCopasiObject *tmp, const Refresh *ref)
void exportSimulatedObject (CCopasiObject *obj, const CCopasiDataModel *pDataModel)
bool exportModelEntityExpression (CCopasiObject *obj, const CCopasiDataModel *pDataModel)
std::string isModelEntityExpressionODEExporterCompatible (CModelEntity *tmp, const CExpression *pExpression, const CCopasiDataModel *pDataModel)
std::string exportExpression (const CExpression *pExpression, const CCopasiDataModel *pDataModel)
virtual bool exportSingleModelEntity (const CModelEntity *tmp, std::string &expression, std::string &comments)
virtual std::string getDisplayExpressionString (CExpression *tmp)
bool exportReacParamsAndFuncs (const CModel *copasiModel)
bool exportODEs (const CModel *copasiModel)
virtual bool exportClosingData (const CModel *copasiModel, std::ofstream &outFile)
virtual void setReservedNames ()
virtual std::string translateTimeVariableName ()
virtual std::string translateObjectName (const std::string &realName)
virtual std::string setConcentrationName (const std::string &objName)
virtual std::string setODEName (const std::string &objName)
virtual bool exportSingleObject (std::ostringstream &which, std::string &name, std::string &expression, std::string &comments)
virtual bool exportSingleMetabolite (const CMetab *metab, std::string &expression, std::string &comments)
virtual bool exportSingleCompartment (const CCompartment *comp, std::string &expression, std::string &comments)
virtual bool exportSingleModVal (const CModelValue *modval, std::string &expression, std::string &comments)
virtual bool exportSingleParameter (const CCopasiParameter *param, std::string &expression, std::string &comments)
virtual std::string getDisplayFunctionString (CFunction *func)
bool exportSingleFunction (CEvaluationNode *pNode, const CReaction *reac, unsigned C_INT32 &index)
virtual bool exportKineticFunction (CReaction *reac)
virtual bool exportSingleODE (const CModelEntity *mentity, std::string &equation, std::string &comments)
virtual bool exportKineticFunctionGroup (const CModel *copasiModel)
virtual std::string KineticFunction2ODEmember (const CReaction *reac)
virtual std::string exportTitleString (const unsigned C_INT32 tmp)
virtual std::string exportClosingString (const unsigned C_INT32 tmp)
virtual bool isEmptyString (std::string &str)
void modifyTreeForMassAction (CFunction *tmpfunc)
void assembleSubTreeForMassAction (CEvaluationNode *newNode, CEvaluationNode *child1, CEvaluationNode *child2)

Public Attributes

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

Member Enumeration Documentation

Enumerator:
INITIAL 
FIXED 
ASSIGNMENT 
HEADERS 
FUNCTIONS 
ODEs 

Constructor & Destructor Documentation

CODEExporter::CODEExporter ( )

Constructor for the exporter.

CODEExporter::~CODEExporter ( ) [virtual]

Destructor for the exporter.


Member Function Documentation

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

bool CODEExporter::exportClosingData ( const CModel copasiModel,
std::ofstream &  outFile 
) [virtual]

Reimplemented in CODEExporterXPPAUT.

std::string CODEExporter::exportClosingString ( const unsigned C_INT32  tmp) [virtual]

Reimplemented in CODEExporterC.

bool CODEExporter::exportCompartments ( const CModel copasiModel)
std::string CODEExporter::exportExpression ( const CExpression pExpression,
const CCopasiDataModel pDataModel 
)
bool CODEExporter::exportKineticFunction ( CReaction reac) [virtual]

Reimplemented in CODEExporterC.

bool CODEExporter::exportKineticFunctionGroup ( const CModel copasiModel) [virtual]

Reimplemented in CODEExporterC.

bool CODEExporter::exportMathModel ( const CCopasiDataModel pDataModel,
std::string  mmasciiFilename,
std::string  Filter,
bool  overwriteFile 
)
bool CODEExporter::exportMetabolites ( const CModel copasiModel) [virtual]
bool CODEExporter::exportMetabolitesConcentrations ( const CModel copasiModel) [virtual]
bool CODEExporter::exportModelEntityExpression ( CCopasiObject obj,
const CCopasiDataModel pDataModel 
)
bool CODEExporter::exportModelValues ( const CModel copasiModel)
void CODEExporter::exportObjectNodesFromModel ( const CCopasiDataModel pDataModel)
bool CODEExporter::exportODEs ( const CModel copasiModel)
bool CODEExporter::exportReacParamsAndFuncs ( const CModel copasiModel)
void CODEExporter::exportSimulatedObject ( CCopasiObject obj,
const CCopasiDataModel pDataModel 
)
bool CODEExporter::exportSingleCompartment ( const CCompartment comp,
std::string &  expression,
std::string &  comments 
) [virtual]
bool CODEExporter::exportSingleFunction ( CEvaluationNode pNode,
const CReaction reac,
unsigned C_INT32 &  index 
)
bool CODEExporter::exportSingleMetabolite ( const CMetab metab,
std::string &  expression,
std::string &  comments 
) [virtual]
bool CODEExporter::exportSingleModelEntity ( const CModelEntity tmp,
std::string &  expression,
std::string &  comments 
) [virtual]
bool CODEExporter::exportSingleModVal ( const CModelValue modval,
std::string &  expression,
std::string &  comments 
) [virtual]
bool CODEExporter::exportSingleObject ( std::ostringstream &  which,
std::string &  name,
std::string &  expression,
std::string &  comments 
) [virtual]
bool CODEExporter::exportSingleODE ( const CModelEntity mentity,
std::string &  equation,
std::string &  comments 
) [virtual]
bool CODEExporter::exportSingleParameter ( const CCopasiParameter param,
std::string &  expression,
std::string &  comments 
) [virtual]
bool CODEExporter::exportTitleData ( const CModel copasiModel,
std::ofstream &  outFile 
) [virtual]

Reimplemented in CODEExporterC.

std::string CODEExporter::exportTitleString ( const unsigned C_INT32  tmp) [virtual]
CCopasiObject * CODEExporter::findObjectFromRefresh ( const CCopasiObject tmp,
const Refresh ref 
)
std::string CODEExporter::getDisplayExpressionString ( CExpression tmp) [virtual]
std::string CODEExporter::getDisplayFunctionString ( CFunction func) [virtual]

Reimplemented in CODEExporterXPPAUT, and CODEExporterBM.

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

This method tests if a string consists only of whitespace characters

std::string CODEExporter::isModelEntityExpressionODEExporterCompatible ( CModelEntity tmp,
const CExpression pExpression,
const CCopasiDataModel pDataModel 
)
std::string CODEExporter::KineticFunction2ODEmember ( const CReaction reac) [virtual]
void CODEExporter::modifyTreeForMassAction ( CFunction tmpfunc)

This method modifies the export tree of the function for internal calls of Mass Action

bool CODEExporter::preprocess ( const CModel copasiModel) [virtual]

Reimplemented in CODEExporterC.

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

Reimplemented in CODEExporterBM, and CODEExporterXPPAUT.

std::string CODEExporter::setODEName ( const std::string &  objName) [virtual]
void CODEExporter::setReservedNames ( ) [virtual]
std::string CODEExporter::translateObjectName ( const std::string &  realName) [virtual]
std::string CODEExporter::translateTimeVariableName ( ) [virtual]

Member Data Documentation

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

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