COPASI API
4.16.103
|
#include <CEvaluationNodeObject.h>
Public Types | |
enum | SubType { INVALID = 0x00FFFFFF, CN = 0x00000000, POINTER = 0x00000001 } |
![]() | |
enum | Type { INVALID = 0xFF000000, NUMBER = 0x01000000, CONSTANT = 0x02000000, OPERATOR = 0x03000000, OBJECT = 0x04000000, FUNCTION = 0x05000000, CALL = 0x06000000, STRUCTURE = 0x07000000, CHOICE = 0x08000000, VARIABLE = 0x09000000, WHITESPACE = 0x0a000000, LOGICAL = 0x0b000000, MV_FUNCTION = 0x0c000000, VECTOR = 0x0d000000, DELAY = 0x0e000000 } |
![]() | |
typedef std::string | Data |
Public Member Functions | |
CEvaluationNodeObject (const SubType &subType, const Data &data) | |
CEvaluationNodeObject (const C_FLOAT64 *pValue) | |
CEvaluationNodeObject (const CEvaluationNodeObject &src) | |
virtual bool | compile (const CEvaluationTree *pTree) |
virtual std::string | getBerkeleyMadonnaString (const std::vector< std::string > &children) const |
virtual std::string | getCCodeString (const std::vector< std::string > &children) const |
virtual const Data & | getData () const |
virtual std::string | getDisplayString (const std::vector< std::string > &children) const |
virtual std::string | getInfix (const std::vector< std::string > &children) const |
virtual std::string | getMMLString (const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) const |
const CRegisteredObjectName & | getObjectCN () const |
const CObjectInterface * | getObjectInterfacePtr () const |
const C_FLOAT64 * | getObjectValuePtr () const |
virtual std::string | getXPPString (const std::vector< std::string > &children) const |
virtual bool | setData (const Data &data) |
void | setObjectValuePtr (C_FLOAT64 *pObjectValue) |
virtual ASTNode * | toAST (const CCopasiDataModel *pDataModel) const |
virtual | ~CEvaluationNodeObject () |
![]() | |
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 Type & | getType () const |
const C_FLOAT64 & | getValue () const |
const C_FLOAT64 * | getValuePointer () const |
virtual bool | isBoolean () const |
virtual bool | operator!= (const CEvaluationNode &right) const |
bool | operator< (const CEvaluationNode &right) const |
bool | operator< (const CEvaluationNode &rhs) |
bool | operator== (const CEvaluationNode &right) const |
void | printRecursively (std::ostream &os, int indent=0) const |
void | printRecursively () const |
virtual CEvaluationNode * | simplifyNode (const std::vector< CEvaluationNode * > &children) const |
CEvaluationNode * | splitBranch (const CEvaluationNode *splitnode, bool left) const |
virtual | ~CEvaluationNode () |
![]() | |
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 |
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 | ~CCopasiNode () |
Static Public Member Functions | |
static CEvaluationNode * | fromAST (const ASTNode *pASTNode, const std::vector< CEvaluationNode * > &children) |
![]() | |
static CEvaluationNode * | create (const Type &type, const Data &data) |
static bool | isKeyword (const std::string &str) |
static Type | subType (const Type &type) |
static Type | type (const Type &type) |
Private Member Functions | |
CEvaluationNodeObject () | |
Private Attributes | |
const CObjectInterface * | mpObject |
CRegisteredObjectName | mRegisteredObjectCN |
Additional Inherited Members | |
![]() | |
CEvaluationNode (const Type &type, const Data &data) | |
![]() | |
bool | setChild (CCopasiNode< Data > *pChild) |
bool | setParent (CCopasiNode< Data > *pParent) |
bool | setSibling (CCopasiNode< Data > *pSibling) |
![]() | |
class CEvaluationNode::CPrecedence | mPrecedence |
const C_FLOAT64 * | mpValue |
Type | mType |
C_FLOAT64 | mValue |
![]() | |
Data | mData |
This is class for nodes presenting numbers used in an evaluation trees
Definition at line 34 of file CEvaluationNodeObject.h.
Enumeration of possible node types. The typing of variables must be handled by the tree.
Enumerator | |
---|---|
INVALID | |
CN | |
POINTER |
Definition at line 41 of file CEvaluationNodeObject.h.
|
private |
Default constructor
Definition at line 34 of file CEvaluationNodeObject.cpp.
References CEvaluationNode::mPrecedence, and PRECEDENCE_NUMBER.
Referenced by fromAST().
Default constructor
const | SubType & subType |
const | Data & data |
Definition at line 40 of file CEvaluationNodeObject.cpp.
References CEvaluationNode::mPrecedence, and PRECEDENCE_NUMBER.
CEvaluationNodeObject::CEvaluationNodeObject | ( | const C_FLOAT64 * | pValue | ) |
Specific constructor
const | Data & data |
Definition at line 49 of file CEvaluationNodeObject.cpp.
References CCopasiNode< std::string >::mData, CEvaluationNode::mPrecedence, CEvaluationNode::mpValue, pointerToString(), and PRECEDENCE_NUMBER.
CEvaluationNodeObject::CEvaluationNodeObject | ( | const CEvaluationNodeObject & | src | ) |
Copy constructor
const | CEvaluationNodeObject & src |
Definition at line 59 of file CEvaluationNodeObject.cpp.
References CEvaluationNode::mpValue.
|
virtual |
|
virtual |
Compile a node;
const | CEvaluationTree * pTree |
Reimplemented from CEvaluationNode.
Definition at line 69 of file CEvaluationNodeObject.cpp.
References C_FLOAT64, CN, CCopasiNode< std::string >::getChild(), CObjectInterface::getCN(), getData(), CExpression::getNodeObject(), CCopasiObject::getValueObject(), CObjectInterface::getValuePointer(), INVALID, CCopasiObject::isValueDbl(), CCopasiNode< std::string >::mData, mpObject, CEvaluationNode::mpValue, mRegisteredObjectCN, CEvaluationNode::mType, CEvaluationNode::mValue, POINTER, stringToPointer(), and CEvaluationNode::subType().
|
static |
Creates a new CEvaluationNodeCall from an ASTNode and the given children
const | ASTNode* pNode |
const | std::vector< CEvaluationNode * > & children |
Definition at line 226 of file CEvaluationNodeObject.cpp.
References CEvaluationNodeObject(), and CN.
Referenced by CEvaluationTree::fromAST().
|
virtual |
Retrieve the display string of the node and its eventual child nodes in Berkeley Madonna format.
Reimplemented from CEvaluationNode.
Definition at line 214 of file CEvaluationNodeObject.cpp.
References CCopasiNode< std::string >::mData.
|
virtual |
Retrieve the display string of the node and its eventual child nodes in C.
Reimplemented from CEvaluationNode.
Definition at line 208 of file CEvaluationNodeObject.cpp.
References CCopasiNode< std::string >::mData.
|
virtual |
Retrieve the value of the node.
Reimplemented from CCopasiNode< std::string >.
Definition at line 135 of file CEvaluationNodeObject.cpp.
References CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CEvaluationNode::mType, POINTER, and CEvaluationNode::subType().
Referenced by compile(), SBMLImporter::doMapping(), CReaction::object2variable(), SBMLImporter::renameMassActionParameters(), and SBMLImporter::setCorrectUsage().
|
virtual |
Retrieve the display string of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
Definition at line 197 of file CEvaluationNodeObject.cpp.
References CCopasiObject::getObjectDisplayName(), mpObject, and mRegisteredObjectCN.
|
virtual |
Retrieve the infix value of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
Definition at line 164 of file CEvaluationNodeObject.cpp.
References CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CEvaluationNode::mType, POINTER, and CEvaluationNode::subType().
|
virtual |
Build the MathML string
const | std::vector< std::string > & children |
bool | expand = true |
const | std::vector< std::vector< std::string > > & variables |
Reimplemented from CEvaluationNode.
Definition at line 390 of file CEvaluationNodeObject.cpp.
References CMathObject::getDataObject(), CMathMl::getMMLName(), and mpObject.
const CRegisteredObjectName & CEvaluationNodeObject::getObjectCN | ( | ) | const |
Retrieve the CN of the referred object.
Definition at line 351 of file CEvaluationNodeObject.cpp.
References mRegisteredObjectCN.
Referenced by CSBMLExporter::checkForUnsupportedObjectReferences(), CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CModelAdd::copyTriggerExpression(), CExpression::createInitialExpression(), CODEExporter::exportExpression(), CSBMLExporter::findModelEntityDependencies(), CODEExporter::isModelEntityExpressionODEExporterCompatible(), CModelMerging::mergeInExpression(), test000093::test_bug1503_1(), test000093::test_bug1503_2(), test000047::test_delay(), test000024::test_hasOnlySubstanceUnits(), test000027::test_hasOnlySubstanceUnits(), test000028::test_hasOnlySubstanceUnits(), test000029::test_hasOnlySubstanceUnits(), test000041::test_hasOnlySubstanceUnits(), test000042::test_hasOnlySubstanceUnits(), test000030::test_hasOnlySubstanceUnits(), test000031::test_hasOnlySubstanceUnits(), test000032::test_hasOnlySubstanceUnits(), test000034::test_hasOnlySubstanceUnits(), test000035::test_hasOnlySubstanceUnits(), test000036::test_hasOnlySubstanceUnits(), test000037::test_hasOnlySubstanceUnits(), test000038::test_hasOnlySubstanceUnits(), test000039::test_hasOnlySubstanceUnits(), test000021::test_hasOnlySubstanceUnits(), test000022::test_hasOnlySubstanceUnits(), test000043::test_hasOnlySubstanceUnits(), test000082::test_import_delayAssignment_1(), test000082::test_import_delayAssignment_2(), test000082::test_import_delayAssignment_3(), test000082::test_import_delayAssignment_4(), test000082::test_import_delayAssignment_5(), test000082::test_import_delayAssignment_6(), test000082::test_import_delayAssignment_7(), test000082::test_import_delayAssignment_8(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_1(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_2(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_3(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_4(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_5(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_6(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_7(), test000064::test_import_event_assignment_expression_and_hasOnlySubstanceUnits_8(), test000095::test_import_l3_event_1(), test000095::test_import_l3_event_2(), test000095::test_import_l3_event_3(), test000095::test_import_l3_event_4(), test000095::test_import_l3_event_5(), test000087::test_import_reaction_flux_reference_2(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_1(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_2(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_3(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_4(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_5(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_6(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_7(), test000064::test_import_rule_expression_and_hasOnlySubstanceUnits_8(), test000087::test_simulate_reaction_flux_reference_1(), toAST(), and CModelExpansion::updateExpression().
const CObjectInterface * CEvaluationNodeObject::getObjectInterfacePtr | ( | ) | const |
Retrieve the pointer to the referred object interface
Definition at line 354 of file CEvaluationNodeObject.cpp.
References mpObject.
Referenced by CModelExpansion::expressionContainsObject(), CModelExpansion::replaceInExpression(), and CModelExpansion::updateExpression().
const C_FLOAT64 * CEvaluationNodeObject::getObjectValuePtr | ( | ) | const |
Retrieve the pointer to the value of the referred object
Definition at line 359 of file CEvaluationNodeObject.cpp.
References CEvaluationNode::mpValue.
Referenced by CMathExpression::convertToInitialExpression().
|
virtual |
Retrieve the display string of the node and its eventual child nodes in XPPAUT format.
Reimplemented from CEvaluationNode.
Definition at line 220 of file CEvaluationNodeObject.cpp.
References CCopasiNode< std::string >::mData.
|
virtual |
Set the data of the Node.
const | Data & data |
Reimplemented from CCopasiNode< std::string >.
Definition at line 153 of file CEvaluationNodeObject.cpp.
References CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CEvaluationNode::mType, and CEvaluationNode::subType().
Referenced by CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CModelAdd::copyTriggerExpression(), CExpression::createInitialExpression(), CModelMerging::mergeInExpression(), SBMLImporter::renameMassActionParameters(), CModelExpansion::replaceInExpression(), and CModelExpansion::updateExpression().
Set the pointer to the value of the referred object
C_FLOAT64 | * pObjectValue |
Definition at line 364 of file CEvaluationNodeObject.cpp.
References CN, CCopasiNode< std::string >::mData, CEvaluationNode::mpValue, CEvaluationNode::mType, POINTER, pointerToString(), and CEvaluationNode::subType().
Referenced by CMathExpression::convertToInitialExpression().
|
virtual |
Converts this node to an ASTNode.
Reimplemented from CEvaluationNode.
Definition at line 247 of file CEvaluationNodeObject.cpp.
References fatalError, CCopasiNode< std::string >::getChild(), CCopasiParameter::getCN(), CCopasiDataModel::getDataObject(), CModel::getInitialTime(), getObjectCN(), CCopasiObject::getObjectName(), CCopasiObject::getObjectParent(), CModelEntity::getSBMLId(), CReaction::getSBMLId(), CCopasiObject::isReference(), MCSBML, mRegisteredObjectCN, CEvaluationNode::toAST(), and CCopasiMessage::WARNING.
|
private |
Pointer to the object
Definition at line 187 of file CEvaluationNodeObject.h.
Referenced by compile(), getDisplayString(), getMMLString(), and getObjectInterfacePtr().
|
private |
The registered object name to track eventual renaming.
Definition at line 192 of file CEvaluationNodeObject.h.
Referenced by compile(), getData(), getDisplayString(), getInfix(), getObjectCN(), setData(), and toAST().