COPASI API  4.16.103
Public Types | Public Member Functions | Private Member Functions | List of all members
CEvaluationNodeStructure Class Reference

#include <CEvaluationNodeStructure.h>

Inheritance diagram for CEvaluationNodeStructure:
Inheritance graph
[legend]
Collaboration diagram for CEvaluationNodeStructure:
Collaboration graph
[legend]

Public Types

enum  SubType {
  INVALID = 0x00FFFFFF, OPEN = 0x00000000, VECTOR_OPEN = 0x00000001, COMMA = 0x00000002,
  CLOSE = 0x00000003, VECTOR_CLOSE = 0x00000004
}
 
- Public Types inherited from CEvaluationNode
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
}
 
- Public Types inherited from CCopasiNode< std::string >
typedef std::string Data
 

Public Member Functions

 CEvaluationNodeStructure (const SubType &subType, const Data &data)
 
 CEvaluationNodeStructure (const CEvaluationNodeStructure &src)
 
virtual ASTNode * toAST (const CCopasiDataModel *pDataModel) const
 
virtual ~CEvaluationNodeStructure ()
 
- 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)
 
virtual bool compile (const CEvaluationTree *pTree)
 
CEvaluationNodecopyBranch () const
 
CEvaluationNodecopyNode (CEvaluationNode *child1, CEvaluationNode *child2) const
 
CEvaluationNodecopyNode (const std::vector< CEvaluationNode * > &children) const
 
const CEvaluationNodefindTopMinus (const std::vector< CFunctionAnalyzer::CValue > &callParameters) const
 
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
 
virtual std::string getMMLString (const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) const
 
const TypegetType () const
 
const C_FLOAT64getValue () const
 
const C_FLOAT64getValuePointer () const
 
virtual std::string getXPPString (const std::vector< std::string > &children) 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 CEvaluationNodesimplifyNode (const std::vector< CEvaluationNode * > &children) const
 
CEvaluationNodesplitBranch (const CEvaluationNode *splitnode, bool left) 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 const DatagetData () 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 ()
 

Private Member Functions

 CEvaluationNodeStructure ()
 

Additional Inherited Members

- Static Public Member Functions inherited from CEvaluationNode
static CEvaluationNodecreate (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)
 
- Protected Member Functions inherited from CEvaluationNode
 CEvaluationNode (const Type &type, const Data &data)
 
- Protected Member Functions inherited from CCopasiNode< std::string >
bool setChild (CCopasiNode< Data > *pChild)
 
bool setParent (CCopasiNode< Data > *pParent)
 
bool setSibling (CCopasiNode< Data > *pSibling)
 
- Protected Attributes inherited from CEvaluationNode
class CEvaluationNode::CPrecedence mPrecedence
 
const C_FLOAT64mpValue
 
Type mType
 
C_FLOAT64 mValue
 
- Protected Attributes inherited from CCopasiNode< std::string >
Data mData
 

Detailed Description

This is class for nodes presenting numbers used in an evaluation trees

Definition at line 27 of file CEvaluationNodeStructure.h.

Member Enumeration Documentation

Enumeration of possible node types.

Enumerator
INVALID 
OPEN 
VECTOR_OPEN 
COMMA 
CLOSE 
VECTOR_CLOSE 

Definition at line 33 of file CEvaluationNodeStructure.h.

Constructor & Destructor Documentation

CEvaluationNodeStructure::CEvaluationNodeStructure ( )
private

Default constructor

Definition at line 25 of file CEvaluationNodeStructure.cpp.

CEvaluationNodeStructure::CEvaluationNodeStructure ( const SubType subType,
const Data data 
)

Default constructor

Parameters
constSubType & subType
constData & data

Definition at line 29 of file CEvaluationNodeStructure.cpp.

References CLOSE, COMMA, fatalError, INVALID, CEvaluationNode::mPrecedence, OPEN, PRECEDENCE_STRUCTURE_CLOSE, PRECEDENCE_STRUCTURE_COMMA, PRECEDENCE_STRUCTURE_OPEN, VECTOR_CLOSE, and VECTOR_OPEN.

30  :
32 {
33  switch (subType)
34  {
35  case OPEN:
36  case VECTOR_OPEN:
38  break;
39 
40  case COMMA:
42  break;
43 
44  case CLOSE:
45  case VECTOR_CLOSE:
47  break;
48 
49  case INVALID:
50  fatalError();
51  break;
52  }
53 }
#define PRECEDENCE_STRUCTURE_CLOSE
#define PRECEDENCE_STRUCTURE_COMMA
#define fatalError()
static Type subType(const Type &type)
class CEvaluationNode::CPrecedence mPrecedence
#define PRECEDENCE_STRUCTURE_OPEN
CEvaluationNodeStructure::CEvaluationNodeStructure ( const CEvaluationNodeStructure src)

Copy constructor

Parameters
constCEvaluationNodeStructure & src

Definition at line 55 of file CEvaluationNodeStructure.cpp.

55  :
56  CEvaluationNode(src)
57 {}
CEvaluationNodeStructure::~CEvaluationNodeStructure ( )
virtual

Destructor

Definition at line 59 of file CEvaluationNodeStructure.cpp.

59 {}

Member Function Documentation

ASTNode * CEvaluationNodeStructure::toAST ( const CCopasiDataModel pDataModel) const
virtual

Create a new ASTNode corresponding to this structure node.

Returns
ASTNode* return a pointer to the newly created node;

Reimplemented from CEvaluationNode.

Definition at line 61 of file CEvaluationNodeStructure.cpp.

References fatalError.

62  {
63  fatalError();
64  return NULL;
65  }
#define fatalError()

The documentation for this class was generated from the following files: