COPASI API
4.40.278
|
#include <CEvaluationNodeObject.h>
Public Member Functions | |
CEvaluationNodeObject (const bool *pValue) | |
CEvaluationNodeObject (const C_FLOAT64 *pValue) | |
CEvaluationNodeObject (const CEvaluationNodeObject &src) | |
CEvaluationNodeObject (const SubType &subType, const Data &data) | |
virtual CIssue | compile () override |
virtual std::string | getBerkeleyMadonnaString (const std::vector< std::string > &children) const override |
virtual std::string | getCCodeString (const std::vector< std::string > &children) const override |
virtual const Data & | getData () const override |
virtual std::string | getDisplayString (const std::vector< std::string > &children) const override |
virtual std::string | getInfix (const std::vector< std::string > &children) const override |
virtual std::string | getMMLString (const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) const override |
const CRegisteredCommonName & | getObjectCN () const |
const CObjectInterface * | getObjectInterfacePtr () const |
const C_FLOAT64 * | getObjectValuePtr () const |
virtual CValidatedUnit | getUnit (const CMathContainer &container, const std::vector< CValidatedUnit > &units) const override |
virtual std::string | getXPPString (const std::vector< std::string > &children) const override |
bool | mapObject (const std::string srcCN, const CDataContainer *pTarget) |
virtual bool | setData (const Data &data) override |
void | setObjectValuePtr (C_FLOAT64 *pObjectValue) |
virtual ASTNode * | toAST (const CDataModel *pDataModel) const override |
virtual | ~CEvaluationNodeObject () |
Public Member Functions inherited from CEvaluationNode | |
void | addChildren (const std::vector< CEvaluationNode * > &children) |
std::string | buildBerkeleyMadonnaString () const |
std::string | buildCCodeString () const |
std::string | buildDisplayString () const |
std::string | buildInfix () const |
std::string | buildMMLString (bool expand, const std::vector< std::vector< std::string > > &variables) const |
std::string | buildXPPString () const |
virtual void | calculate () |
CEvaluationNode () | |
CEvaluationNode (const CEvaluationNode &src) | |
CEvaluationNode * | copyBranch () const |
CEvaluationNode * | copyNode (CEvaluationNode *child1, CEvaluationNode *child2) const |
CEvaluationNode * | copyNode (const std::vector< CEvaluationNode * > &children) const |
const CEvaluationNode * | findTopMinus (const std::vector< CFunctionAnalyzer::CValue > &callParameters) const |
const CEvaluationTree * | getTree () const |
const C_FLOAT64 * | getValuePointer () const |
const ValueType & | getValueType () const |
virtual bool | isBoolean () const |
const MainType & | mainType () const |
bool | operator!= (const CEvaluationNode &right) const |
bool | operator< (const CEvaluationNode &rhs) |
bool | operator< (const CEvaluationNode &right) const |
bool | operator== (const CEvaluationNode &right) const |
void | printRecursively () const |
void | printRecursively (std::ostream &os, int indent=0) const |
void | setTree (const CEvaluationTree *pTree) |
virtual CValidatedUnit | setUnit (const CMathContainer &container, const std::map< CEvaluationNode *, CValidatedUnit > ¤tUnits, std::map< CEvaluationNode *, CValidatedUnit > &targetUnits) const |
virtual CIssue | setValueType (const ValueType &valueType) |
virtual CEvaluationNode * | simplifyNode (const std::vector< CEvaluationNode * > &children) const |
CEvaluationNode * | splitBranch (const CEvaluationNode *splitnode, bool left) const |
const SubType & | subType () const |
virtual | ~CEvaluationNode () |
Public Member Functions inherited from CCopasiNode< std::string > | |
virtual bool | addChild (CCopasiNode< Data > *pChild, CCopasiNode< Data > *pAfter=NULL) |
bool | addSibling (CCopasiNode< Data > *pSibling, CCopasiNode< Data > *pAfter=NULL) |
CCopasiNode (CCopasiNode< Data > *pParent=NULL) | |
CCopasiNode (const CCopasiNode< Data > &src) | |
CCopasiNode (const Data &data, CCopasiNode< Data > *pParent=NULL) | |
bool | deleteChildren () |
CCopasiNode< Data > * | getChild () |
const CCopasiNode< Data > * | getChild () const |
CCopasiNode< Data > * | getChild (const size_t &index) |
const CCopasiNode< Data > * | getChild (const size_t &index) const |
virtual Data & | getData () |
CCopasiNode< Data > * | getNext () |
const CCopasiNode< Data > * | getNext () const |
CCopasiNode< Data > * | getNextNonChild () |
const CCopasiNode< Data > * | getNextNonChild () const |
size_t | getNumChildren () const |
CCopasiNode< Data > * | getParent () |
const CCopasiNode< Data > * | getParent () const |
CCopasiNode< Data > * | getSibling () |
const CCopasiNode< Data > * | getSibling () const |
virtual bool | removeChild (CCopasiNode< Data > *pChild) |
virtual bool | setData (const Data &data) |
virtual | ~CCopasiNode () |
Static Public Member Functions | |
static CEvaluationNode * | fromAST (const ASTNode *pASTNode, const std::vector< CEvaluationNode * > &children) |
Static Public Member Functions inherited from CEvaluationNode | |
static CEvaluationNode * | create (const MainType &mainType, const SubType &subType, const std::string &data) |
static bool | isKeyword (const std::string &str) |
Private Member Functions | |
CEvaluationNodeObject () | |
Private Attributes | |
const CObjectInterface * | mpObject |
CRegisteredCommonName | mRegisteredObjectCN |
This is class for nodes presenting numbers used in an evaluation trees
|
private |
Default constructor
References CEvaluationNode::mPrecedence, and PRECEDENCE_NUMBER.
Referenced by fromAST().
Default constructor
const | SubType & subType |
const | Data & data |
References CEvaluationNode::AVOGADRO, C_FLOAT64, CEvaluationNode::CN, CEvaluationNode::INVALID, CCopasiNode< std::string >::mData, CEvaluationNode::mPrecedence, CEvaluationNode::mpValue, mRegisteredObjectCN, CEvaluationNode::mSubType, CEvaluationNode::mValueType, CEvaluationNode::Number, CEvaluationNode::POINTER, PRECEDENCE_NUMBER, stringToPointer(), and CEvaluationNode::subType().
CEvaluationNodeObject::CEvaluationNodeObject | ( | const C_FLOAT64 * | pValue | ) |
Specific constructor
const | Data & data |
References CCopasiNode< std::string >::mData, CEvaluationNode::mPrecedence, CEvaluationNode::mpValue, CEvaluationNode::mValueType, CEvaluationNode::Number, pointerToString(), and PRECEDENCE_NUMBER.
CEvaluationNodeObject::CEvaluationNodeObject | ( | const bool * | pValue | ) |
Specific constructor
const | Data & data |
References CEvaluationNode::Boolean, C_FLOAT64, CCopasiNode< std::string >::mData, CEvaluationNode::mPrecedence, CEvaluationNode::mpValue, CEvaluationNode::mValueType, pointerToString(), and PRECEDENCE_NUMBER.
CEvaluationNodeObject::CEvaluationNodeObject | ( | const CEvaluationNodeObject & | src | ) |
|
virtual |
Destructor
|
overridevirtual |
Compile a node;
const | CEvaluationTree * pTree |
Reimplemented from CEvaluationNode.
References CEvaluationNode::AVOGADRO, C_FLOAT64, CEvaluationNode::CN, CObjectInterface::DataObject(), CIssue::Error, CCopasiNode< std::string >::getChild(), CObjectInterface::getCN(), CDataObject::getCN(), getData(), CMathContainer::getDataObject(), CMathContainer::getMathObject(), CDataModel::getModel(), CEvaluationTree::getNodeObject(), CDataObject::getObjectAncestor(), CDataObject::getObjectDataModel(), CEvaluationNode::getTree(), CDataObject::getValueObject(), CObjectInterface::getValuePointer(), CDataObject::hasFlag(), CEvaluationNode::INVALID, CCopasiNode< std::string >::mData, mpObject, CEvaluationNode::mpTree, CEvaluationNode::mpValue, mRegisteredObjectCN, CEvaluationNode::mSubType, CEvaluationNode::mValue, CIssue::ObjectNotFound, CEvaluationNode::POINTER, stringToPointer(), CIssue::StructureInvalid, CIssue::Success, CIssue::TooManyArguments, CDataObject::ValueDbl, and CIssue::ValueNotFound.
Referenced by CDerive::deriveBranch(), and CModel::prepareElasticity().
|
static |
Creates a new CEvaluationNodeCall from an ASTNode and the given children
const | ASTNode* pNode |
const | std::vector< CEvaluationNode * > & children |
References CEvaluationNode::AVOGADRO, CEvaluationNodeObject(), and CEvaluationNode::CN.
Referenced by CEvaluationTree::fromAST().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in Berkeley Madonna format.
Reimplemented from CEvaluationNode.
References CCopasiNode< std::string >::mData.
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in C.
Reimplemented from CEvaluationNode.
References CCopasiNode< std::string >::mData.
|
overridevirtual |
Retrieve the value of the node.
Reimplemented from CCopasiNode< std::string >.
References CEvaluationNode::CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CEvaluationNode::mSubType, and CEvaluationNode::POINTER.
Referenced by compile(), SBMLImporter::doMapping(), CReaction::object2variable(), SBMLImporter::renameMassActionParameters(), and SBMLImporter::setCorrectUsage().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
References CDataObject::getObjectDisplayName(), mpObject, and mRegisteredObjectCN.
|
overridevirtual |
Retrieve the infix value of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
References CEvaluationNode::CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CEvaluationNode::mSubType, and CEvaluationNode::POINTER.
|
overridevirtual |
Build the MathML string
const | std::vector< std::string > & children |
bool | expand = true |
const | std::vector< std::vector< std::string > > & variables |
Reimplemented from CEvaluationNode.
References CObjectInterface::DataObject(), CMathMl::getMMLName(), and mpObject.
const CRegisteredCommonName & CEvaluationNodeObject::getObjectCN | ( | ) | const |
Retrieve the CN of the referred object.
References mRegisteredObjectCN.
Referenced by CSBMLExporter::checkForUnsupportedObjectReferences(), CEvaluationTree::containsCN(), CMathContainer::copyBranch(), CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CModelAdd::copyTriggerExpression(), CExpression::createInitialExpression(), CDerive::deriveBranch(), CODEExporter::exportExpression(), CSBMLExporter::findModelEntityDependencies(), CODEExporter::isModelEntityExpressionODEExporterCompatible(), CModelMerging::mergeInExpression(), CSBMLExporter::replaceSpeciesReferences(), toAST(), and CModelExpansion::updateExpression().
const CObjectInterface * CEvaluationNodeObject::getObjectInterfacePtr | ( | ) | const |
Retrieve the pointer to the referred object interface
References mpObject.
Referenced by CMathExpression::compile(), CMathContainer::copyBranch(), CDerive::deriveBranch(), CModelExpansion::expressionContainsObject(), CUnitValidator::getUnits(), CEvaluationTree::mapObjectNodes(), CModelExpansion::replaceInExpression(), CUnitValidator::setUnits(), and CModelExpansion::updateExpression().
const C_FLOAT64 * CEvaluationNodeObject::getObjectValuePtr | ( | ) | const |
Retrieve the pointer to the value of the referred object
References CEvaluationNode::mpValue.
Referenced by CMathExpression::convertToInitialExpression(), and CMathContainer::copyBranch().
|
overridevirtual |
Figure out the appropriate CUnit to use, based on the child nodes. This sets the default, appropriate for many cases, as Dimensionless
const | CMathContainer & container |
const | std::vector< CUnit > & units |
Reimplemented from CEvaluationNode.
References CObjectInterface::getDataObject(), CMathContainer::getMathObject(), CDataObject::getUnits(), CValidatedUnit::merge(), and CEvaluationNode::mpValue.
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in XPPAUT format.
Reimplemented from CEvaluationNode.
References CCopasiNode< std::string >::mData.
bool CEvaluationNodeObject::mapObject | ( | const std::string | srcCN, |
const CDataContainer * | pTarget | ||
) |
Map object whose CN starts with srcSN to children of the target container
const | std::string srcCN |
const | CDataContainer * pTarget |
References C_FLOAT64, CObjectInterface::DataObject(), CDataContainer::getObject(), CDataObject::getValueObject(), CObjectInterface::getValuePointer(), CDataObject::hasFlag(), mpObject, CEvaluationNode::mpValue, mRegisteredObjectCN, CEvaluationNode::mValue, and CDataObject::ValueDbl.
Referenced by CEvaluationTree::mapObjectNodes().
|
overridevirtual |
Set the data of the Node.
const | Data & data |
References CEvaluationNode::CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, and CEvaluationNode::mSubType.
Referenced by CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CModelAdd::copyTriggerExpression(), CExpression::createInitialExpression(), CModelMerging::mergeInExpression(), SBMLImporter::renameMassActionParameters(), CModelExpansion::replaceInExpression(), and CModelExpansion::updateExpression().
void CEvaluationNodeObject::setObjectValuePtr | ( | C_FLOAT64 * | pObjectValue | ) |
Set the pointer to the value of the referred object
C_FLOAT64 | * pObjectValue |
References CEvaluationNode::CN, CCopasiNode< std::string >::mData, CEvaluationNode::mpValue, CEvaluationNode::mSubType, CEvaluationNode::mValue, CEvaluationNode::POINTER, and pointerToString().
Referenced by CMathExpression::convertToInitialExpression().
|
overridevirtual |
Converts this node to an ASTNode.
Reimplemented from CEvaluationNode.
References CObjectInterface::DataObject(), fatalError, CCopasiNode< std::string >::getChild(), CCopasiParameter::getCN(), CModel::getInitialTime(), getObjectCN(), CDataObject::getObjectFromCN(), CDataObject::getObjectName(), CDataObject::getObjectParent(), CModelEntity::getSBMLId(), CReaction::getSBMLId(), CDataObject::hasFlag(), MCSBML, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CDataObject::Reference, CEvaluationNode::toAST(), and CCopasiMessage::WARNING.
|
private |
Pointer to the object
Referenced by compile(), getDisplayString(), getMMLString(), getObjectInterfacePtr(), and mapObject().
|
private |
The registered object name to track eventual renaming.
Referenced by CEvaluationNodeObject(), compile(), getData(), getDisplayString(), getInfix(), getObjectCN(), mapObject(), setData(), and toAST().