COPASI API
4.16.103
|
#include <CODEExporterC.h>
Public Member Functions | |
CODEExporterC () | |
virtual std::string | exportClosingString (const size_t tmp) |
virtual bool | exportKineticFunction (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 () |
![]() | |
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 CCopasiDataModel *pDataModel) |
virtual bool | exportMetabolites (const CModel *copasiModel) |
virtual bool | exportMetabolitesConcentrations (const CModel *copasiModel) |
bool | exportModelEntityExpression (CCopasiObject *obj, const CCopasiDataModel *pDataModel) |
bool | exportModelValues (const CModel *copasiModel) |
bool | exportModelValuesExpressions (const CModel *copasiModel) |
void | exportObjectNodesFromModel (const CCopasiDataModel *pDataModel) |
bool | exportODEs (const CModel *copasiModel) |
bool | exportReacParamsAndFuncs (const CModel *copasiModel) |
void | exportSimulatedObject (CCopasiObject *obj, const CCopasiDataModel *pDataModel) |
bool | exportSingleFunction (const CFunction *func) |
bool | exportSingleFunction (CEvaluationNode *pNode, const CReaction *reac, size_t &index) |
bool | exportSingleFunction (CEvaluationNode *pNode, const std::string &key, size_t &index) |
bool | exportToStream (const CCopasiDataModel *pDataModel, std::ostream &os) |
void | findFunctionsCalls (const CEvaluationNode *pNode) |
CCopasiObject * | findObjectFromRefresh (const CCopasiObject *tmp, const Refresh *ref) |
virtual std::string | getDisplayFunctionString (CFunction *func) |
virtual bool | isEmptyString (std::string &str) |
std::string | isModelEntityExpressionODEExporterCompatible (CModelEntity *tmp, const CExpression *pExpression, const CCopasiDataModel *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 |
![]() | |
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 | |
![]() | |
enum | Object { INITIAL = 0, FIXED, ASSIGNMENT, HEADERS, FUNCTIONS, ODEs } |
![]() | |
std::set< std::string > | mExportedFunctions |
Definition at line 20 of file CODEExporterC.h.
CODEExporterC::CODEExporterC | ( | ) |
|
virtual |
Reimplemented from CODEExporter.
Definition at line 1223 of file CODEExporterC.cpp.
References CODEExporter::ASSIGNMENT, CODEExporter::FIXED, CODEExporter::FUNCTIONS, CODEExporter::HEADERS, CODEExporter::INITIAL, and CODEExporter::ODEs.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 886 of file CODEExporterC.cpp.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 889 of file CODEExporterC.cpp.
References CODEExporter::exportSingleFunction(), CODEExporter::findFunctionsCalls(), CReaction::getFunction(), CModel::getReactions(), CEvaluationTree::getRoot(), CEvaluationTree::getType(), CEvaluationTree::MassAction, and CCopasiVector< T >::size().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 775 of file CODEExporterC.cpp.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 739 of file CODEExporterC.cpp.
References CModelEntity::ASSIGNMENT, CODEExporter::assignment, exportSingleObject(), CModelEntity::FIXED, CODEExporter::fixed, CModelEntity::getKey(), CModelEntity::getStatus(), CODEExporter::initial, CODEExporter::NameMap, and CModelEntity::ODE.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 914 of file CODEExporterC.cpp.
References CEvaluationNode::buildCCodeString(), CEvaluationNode::CALL, CFunctionDB::findFunction(), CODEExporter::functions, CCopasiRootContainer::getFunctionList(), CFunction::getKey(), CCopasiObject::getObjectName(), CEvaluationTree::getRoot(), CEvaluationTree::getType(), CFunction::getVariables(), CODEExporter::headers, CEvaluationTree::MassAction, CFunctionParameter::MODIFIER, CODEExporter::modifyTreeForMassAction(), CODEExporter::NameMap, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CFunctionParameters::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, translateObjectName(), CEvaluationNode::type(), CEvaluationNode::VARIABLE, CFunctionParameter::VARIABLE, and CFunctionParameter::VOLUME.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 687 of file CODEExporterC.cpp.
References CModelEntity::ASSIGNMENT, CODEExporter::assignment, exportSingleObject(), CModelEntity::FIXED, CODEExporter::fixed, CModelEntity::getKey(), CModelEntity::getStatus(), CODEExporter::initial, CMetab::isDependent(), CODEExporter::NameMap, CModelEntity::ODE, and CModelEntity::REACTIONS.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 823 of file CODEExporterC.cpp.
References CModelEntity::ASSIGNMENT, CODEExporter::assignment, exportSingleObject(), CModelEntity::FIXED, CODEExporter::fixed, Frequancy, CModelEntity::getKey(), CModelEntity::getStatus(), CODEExporter::initial, CODEExporter::NameMap, and CModelEntity::ODE.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 787 of file CODEExporterC.cpp.
References CModelEntity::ASSIGNMENT, CODEExporter::assignment, exportSingleObject(), CModelEntity::FIXED, CODEExporter::fixed, CModelEntity::getKey(), CModelEntity::getStatus(), CODEExporter::initial, CODEExporter::NameMap, and CModelEntity::ODE.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 679 of file CODEExporterC.cpp.
Referenced by exportSingleCompartment(), exportSingleMetabolite(), exportSingleModelEntity(), exportSingleModVal(), exportSingleODE(), and exportSingleParameter().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 1177 of file CODEExporterC.cpp.
References exportSingleObject(), CModelEntity::getKey(), CODEExporter::NameMap, and CODEExporter::ode.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 879 of file CODEExporterC.cpp.
References exportSingleObject(), CODEExporter::fixed, CCopasiParameter::getKey(), and CODEExporter::NameMap.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 98 of file CODEExporterC.cpp.
References CKeyFactory::get(), CModel::getCompartments(), CCopasiRootContainer::getKeyFactory(), CModel::getMetabolitesX(), CModel::getModelValues(), CModel::getNumIndependentReactionMetabs(), CModel::getNumODEMetabs(), CCopasiObject::getObjectName(), CReaction::getParameters(), CModel::getReactions(), CReaction::isLocalParameter(), CODEExporter::NameMap, printNameForKey(), CCopasiVector< T >::size(), CCopasiParameterGroup::size(), and startsWith().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 1187 of file CODEExporterC.cpp.
References CODEExporter::ASSIGNMENT, CODEExporter::FIXED, CODEExporter::FUNCTIONS, CODEExporter::HEADERS, CODEExporter::INITIAL, and CODEExporter::ODEs.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 1214 of file CODEExporterC.cpp.
References CEvaluationNode::buildCCodeString(), and CEvaluationTree::getRoot().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 59 of file CODEExporterC.cpp.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 1018 of file CODEExporterC.cpp.
References CCopasiMessage::EXCEPTION, CKeyFactory::get(), CReaction::getChemEq(), CReaction::getFunction(), CReaction::getFunctionParameters(), CFunction::getKey(), CModelEntity::getKey(), CCopasiParameter::getKey(), CCopasiObject::getKey(), CCopasiRootContainer::getKeyFactory(), CChemEqElement::getMetabolite(), CChemEqElement::getMultiplicity(), CReaction::getParameterMappings(), CChemEq::getProducts(), CChemEq::getSubstrates(), CEvaluationTree::getType(), CReaction::isLocalParameter(), CFunction::isReversible(), CEvaluationTree::MassAction, CFunctionParameter::MODIFIER, CODEExporter::NameMap, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CFunctionParameters::size(), CCopasiVector< T >::size(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TIME, TriTrue, and CFunctionParameter::VOLUME.
|
virtual |
Reimplemented from CODEExporter.
Definition at line 523 of file CODEExporterC.cpp.
References CModel::getCompartments(), CFunction::getKey(), CModelEntity::getKey(), CCopasiObject::getKey(), CModel::getMetabolitesX(), CModel::getModelValues(), CCopasiObject::getObjectName(), CModel::getReactions(), CEvaluationTree::getRoot(), CModelEntity::getStatus(), CEvaluationTree::getType(), CMetab::isDependent(), CEvaluationTree::MassAction, CODEExporter::NameMap, CModelEntity::ODE, CModelEntity::REACTIONS, setConcentrationName(), setExportName(), setExportNameOfFunction(), setODEName(), setReservedNames(), CCopasiVector< T >::size(), CODEExporter::timeKey, translateObjectName(), and translateTimeVariableName().
std::string CODEExporterC::setConcentrationName | ( | const CModelEntity::Status & | status, |
size_t | n[], | ||
size_t | dependent | ||
) |
Definition at line 367 of file CODEExporterC.cpp.
References CModelEntity::ASSIGNMENT, CModelEntity::FIXED, CModelEntity::ODE, and CModelEntity::REACTIONS.
Referenced by preprocess().
std::string CODEExporterC::setExportName | ( | const CModelEntity::Status & | status, |
size_t | n[], | ||
size_t | dependent | ||
) |
Definition at line 323 of file CODEExporterC.cpp.
References CModelEntity::ASSIGNMENT, CModelEntity::FIXED, CModelEntity::ODE, and CModelEntity::REACTIONS.
Referenced by preprocess().
void CODEExporterC::setExportNameOfFunction | ( | const CEvaluationNode * | pNode, |
std::set< std::string > & | tmpset | ||
) |
Definition at line 650 of file CODEExporterC.cpp.
References CEvaluationNode::CALL, CFunctionDB::findFunction(), CCopasiRootContainer::getFunctionList(), CFunction::getKey(), CCopasiObject::getObjectName(), CEvaluationTree::getRoot(), CEvaluationTree::getType(), CEvaluationTree::MassAction, CODEExporter::NameMap, translateObjectName(), and CEvaluationNode::type().
Referenced by preprocess().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 518 of file CODEExporterC.cpp.
Referenced by preprocess().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 317 of file CODEExporterC.cpp.
Referenced by preprocess().
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
Definition at line 482 of file CODEExporterC.cpp.
References Frequancy, and NameSet.
Referenced by translateObjectName().
|
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.
Definition at line 416 of file CODEExporterC.cpp.
References testName().
Referenced by exportSingleFunction(), preprocess(), and setExportNameOfFunction().
|
virtual |
Reimplemented from CODEExporter.
Definition at line 320 of file CODEExporterC.cpp.
Referenced by preprocess().
std::map< std::string, size_t > CODEExporterC::Frequancy |
Definition at line 86 of file CODEExporterC.h.
Referenced by exportSingleModelEntity(), and testName().
std::set<std::string> CODEExporterC::NameSet |
Definition at line 87 of file CODEExporterC.h.
Referenced by testName().