COPASI API
4.16.103
|
#include <CEvaluationNodeVector.h>
Public Types | |
enum | SubType { INVALID = 0x00FFFFFF, VECTOR = 0x00000000 } |
![]() | |
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 | |
bool | addChild (CCopasiNode< Data > *pChild, CCopasiNode< Data > *pAfter=NULL) |
CEvaluationNodeVector () | |
CEvaluationNodeVector (const SubType &subType, const Data &data) | |
CEvaluationNodeVector (const CEvaluationNodeVector &src) | |
virtual std::string | getBerkeleyMadonnaString (const std::vector< std::string > &children) const |
virtual std::string | getCCodeString (const std::vector< std::string > &children) const |
virtual std::string | getDisplayString (const std::vector< std::string > &children) const |
virtual std::string | getInfix (const std::vector< std::string > &children) const |
const std::vector < CEvaluationNode * > & | getVector () const |
virtual std::string | getXPPString (const std::vector< std::string > &children) const |
virtual ASTNode * | toAST (const CCopasiDataModel *pDataModel) const |
virtual | ~CEvaluationNodeVector () |
![]() | |
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) | |
virtual bool | compile (const CEvaluationTree *pTree) |
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 |
virtual std::string | getMMLString (const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) 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 () |
![]() | |
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 const Data & | getData () 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 bool | setData (const Data &data) |
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 Attributes | |
std::vector< CEvaluationNode * > | mVector |
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 the class for nodes presenting opertors used in an evaluation trees.
Definition at line 33 of file CEvaluationNodeVector.h.
Enumeration of possible node types.
Enumerator | |
---|---|
INVALID | |
VECTOR |
Definition at line 39 of file CEvaluationNodeVector.h.
CEvaluationNodeVector::CEvaluationNodeVector | ( | ) |
Default constructor
Definition at line 30 of file CEvaluationNodeVector.cpp.
References CEvaluationNode::mPrecedence, and PRECEDENCE_FUNCTION.
Default constructor
const | SubType & subType |
const | Data & data |
Definition at line 35 of file CEvaluationNodeVector.cpp.
References fatalError, CEvaluationNode::mPrecedence, PRECEDENCE_FUNCTION, and VECTOR.
CEvaluationNodeVector::CEvaluationNodeVector | ( | const CEvaluationNodeVector & | src | ) |
Copy constructor
const | CEvaluationNodeVector & src |
Definition at line 53 of file CEvaluationNodeVector.cpp.
|
virtual |
|
virtual |
Add a child to a node. If pAfter == this the child will be inserted at the fornt of the list of children.
CCopasiNode< | Data > * pChild |
CCopasiNode< | Data > * pAfter (default: NULL appended to the list of children) |
Reimplemented from CCopasiNode< std::string >.
Definition at line 123 of file CEvaluationNodeVector.cpp.
References CCopasiNode< _Data >::addChild(), and mVector.
Referenced by CEvaluationNodeNormalizer::normalizeCEvaluationNodeVector().
|
static |
Creates a new CEvaluationNodeCall from an ASTNode and the given children
const | ASTNode* pNode |
const | std::vector< CEvaluationNode * > & children |
Definition at line 111 of file CEvaluationNodeVector.cpp.
|
virtual |
Retrieve the display string of the node and its eventual child nodes in Berkeley Madonna format.
Reimplemented from CEvaluationNode.
Definition at line 99 of file CEvaluationNodeVector.cpp.
|
virtual |
Retrieve the display string of the node and its eventual child nodes in C.
Reimplemented from CEvaluationNode.
Definition at line 93 of file CEvaluationNodeVector.cpp.
|
virtual |
Retrieve the display string of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
Definition at line 77 of file CEvaluationNodeVector.cpp.
|
virtual |
Retrieve the infix value of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
Definition at line 61 of file CEvaluationNodeVector.cpp.
const std::vector< CEvaluationNode * > & CEvaluationNodeVector::getVector | ( | ) | const |
Retrieve the vector of evaluation nodes
Definition at line 132 of file CEvaluationNodeVector.cpp.
References mVector.
Referenced by CEvaluationNodeNormalizer::normalizeCEvaluationNodeVector().
|
virtual |
Retrieve the display string of the node and its eventual child nodes in XPPAUT format.
Reimplemented from CEvaluationNode.
Definition at line 105 of file CEvaluationNodeVector.cpp.
|
virtual |
Create a new ASTNode corresponding to this choice node.
Reimplemented from CEvaluationNode.
Definition at line 116 of file CEvaluationNodeVector.cpp.
|
private |
Definition at line 139 of file CEvaluationNodeVector.h.
Referenced by addChild(), and getVector().