COPASI API  4.16.103
CEvaluationNodeDelay.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/function/CEvaluationNodeDelay.h,v $
3 // $Revision: 1.9 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2012/05/16 23:11:31 $
7 // End CVS Header
8 
9 // Copyright (C) 2012 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 #ifndef COPASI_CEvaluationNodeDelay
15 #define COPASI_CEvaluationNodeDelay
16 
17 #include <iostream>
18 #include <vector>
19 
21 
22 class ASTNode;
23 class CCopasiDataModel;
24 
25 /**
26  * This is class for nodes representing the (SBML) delay function.
27  */
29 {
30 public:
31  /**
32  * Enumeration of possible node types.
33  */
34  enum SubType
35  {
36  INVALID = 0x00FFFFFF,
37  DELAY = 0x00000000
38  };
39 
40  // Operations
41 private:
42  /**
43  * Default constructor
44  */
46 
47 public:
48  /**
49  * constructor
50  * @param const SubType & subType
51  * @param const Data & data
52  */
54  const Data & data);
55 
56  /**
57  * Copy constructor
58  * @param const CEvaluationNodeDelay & src
59  */
61 
62  /**
63  * Destructor
64  */
65  virtual ~CEvaluationNodeDelay();
66 
67  /**
68  * Retrieve the display string of the node and its eventual child nodes.
69  * @return const Data & value
70  */
71  virtual std::string getDisplayString(const std::vector< std::string > & children) const;
72 
73  /**
74  * Retrieve the display string of the node and its eventual child nodes in C.
75  * @return const Data & value
76  */
77  virtual std::string getCCodeString(const std::vector< std::string > & children) const;
78 
79  /**
80  * Retrieve the display string of the node and its eventual child nodes
81  * in Berkeley Madonna format.
82  * @return const Data & value
83  */
84  virtual std::string getBerkeleyMadonnaString(const std::vector< std::string > & children) const;
85 
86  /**
87  ** Retrieve the display string of the node and its eventual child nodes
88  ** in XPPAUT format.
89  ** @return const Data & value
90  **/
91  virtual std::string getXPPString(const std::vector< std::string > & children) const;
92 
93  /**
94  * Creates a new CEvaluationNodeCall from an ASTNode and the given children
95  * @param const ASTNode* pNode
96  * @param const std::vector< CEvaluationNode * > & children
97  * @return CEvaluationNode * pCretedNode
98  */
99  static CEvaluationNode * fromAST(const ASTNode * pASTNode, const std::vector< CEvaluationNode * > & children);
100 
101  /**
102  * Create a new ASTNode corresponding to this delay node.
103  * @return ASTNode* return a pointer to the newly created node;
104  */
105  ASTNode* toAST(const CCopasiDataModel* pDataModel) const;
106 
107  /**
108  * Build the MathML string
109  * @param const std::vector< std::string > & children
110  * @param bool expand = true
111  * @param const std::vector< std::vector< std::string > > & variables
112  * @return std::string MMLString
113  */
114  virtual std::string getMMLString(const std::vector< std::string > & children,
115  bool expand,
116  const std::vector< std::vector< std::string > > & variables) const;
117 
118  /**
119  * Compile a node;
120  * @param const CEvaluationTree * pTree
121  * @return bool success;
122  */
123  virtual bool compile(const CEvaluationTree * pTree);
124 
125  /**
126  * Retrieve the infix value of the node and its eventual child nodes.
127  * @return const Data & value
128  */
129  virtual std::string getInfix(const std::vector< std::string > & children) const;
130 
131 private:
134 };
135 
136 #endif // COPASI_CEvaluationNodeDelay
virtual std::string getDisplayString(const std::vector< std::string > &children) const
ASTNode * toAST(const CCopasiDataModel *pDataModel) const
virtual std::string getInfix(const std::vector< std::string > &children) const
virtual bool compile(const CEvaluationTree *pTree)
virtual std::string getBerkeleyMadonnaString(const std::vector< std::string > &children) const
virtual std::string getXPPString(const std::vector< std::string > &children) const
CEvaluationNode * mpDeltaT
static CEvaluationNode * fromAST(const ASTNode *pASTNode, const std::vector< CEvaluationNode * > &children)
virtual std::string getMMLString(const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) const
static Type subType(const Type &type)
CEvaluationNode * mpDelayedObject
virtual std::string getCCodeString(const std::vector< std::string > &children) const