COPASI API  4.16.103
CKinFunction.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/function/CKinFunction.h,v $
3  $Revision: 1.35 $
4  $Name: $
5  $Author: shoops $
6  $Date: 2012/05/16 23:11:32 $
7  End CVS Header */
8 
9 // Copyright (C) 2012 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc. and EML Research, gGmbH.
16 // All rights reserved.
17 
18 /**
19  * CKinFunction
20  *
21  * Created for Copasi by Stefan Hoops
22  * (C) Stefan Hoops 2002
23  */
24 
25 #ifndef COPASI_CKinFunction
26 #define COPASI_CKinFunction
27 
28 #include <vector>
29 
30 #include "function/CFunction.h"
31 
32 #include "function/CNodeK.h"
33 #include "utilities/CReadConfig.h"
34 
35 class CCopasiObject;
36 
37 /** @dia:pos 61.7476,54.3157 */
38 /** @dia:route CFunction; v,58.2,35.55,51.6337,82.8684,54.3157 */
39 class CKinFunction : public CFunction
40 {
41  // Attributes
42 private:
43  /**
44  * The vector of nodes of the binary tree of the function
45  * @supplierCardinality 0..*
46  * @associates <{CNodeK}>
47  */
48  /** @dia:route 0,2; h,61.7476,54.3157,55.1707,42.4925,46.911 */
49  std::vector< CNodeK * > mNodes;
50 
51  std::vector<CCopasiObject*> ObjList;
52  /**
53  * Internal variable
54  */
55  unsigned C_INT32 mNidx;
56 
57  // Operations
58 public:
59  /**
60  * Default constructor
61  * @param const std::string & name (default: "NoName")
62  * @param const CCopasiContainer * pParent (default: NULL)
63  */
64  CKinFunction(const std::string & name = "NoName",
65  const CCopasiContainer * pParent = NULL);
66 
67  /**
68  * Copy constructor
69  * @param "const CFunction &" src
70  * @param "CReadConfig *" configBuffer (Default = NULL)
71  * @param const CCopasiContainer * pParent (default: NULL)
72  */
73  CKinFunction(const CFunction & src,
74  CReadConfig * configBuffer = NULL,
75  const CCopasiContainer * pParent = NULL);
76 
77  /**
78  * Copy constructor
79  * @param "const CKinFunction &" src
80  * @param const CCopasiContainer * pParent (default: NULL)
81  */
82  CKinFunction(const CKinFunction & src,
83  const CCopasiContainer * pParent = NULL);
84 
85  /**
86  * Destructor
87  */
88  ~CKinFunction();
89 
90  /**
91  * Cleanup
92  */
93  void cleanup();
94 
95  /**
96  * Retreives the nodes of the function
97  */
98  std::vector< CNodeK * > & getNodes();
99 
100 private:
101 
102  /**
103  * This function indentify the object from name
104  */
105  //bool createObjList();
106 
107  /**
108  * This connects the nodes to build the binary function tree
109  */
110  //C_INT32 connectNodes();
111 
112  /**
113  * This function is part of the algorithm that builds the binary tree.
114  * The expression to the right of the current node (mNidx) is parsed until
115  * an operand with a left priority <= the argument (right priority)
116  * is encounterd. The pointer to the top node of the parsed expression is
117  * returned.
118  * @param C_INT16 priority
119  * @return CNodeK *
120  */
121  //CNodeK * parseExpression(C_INT16 priority);
122 
123  /**
124  * This function is part of the algorithm that builds the binary tree.
125  * It returns a pointer to next primary node. Here next is with repect
126  * to the internal counter mNidx. If the node is a dead end, i.e., any contant
127  * a pointer the node is returned. If then node is '(' the expression between
128  * the node and the matching ')' is parsed and a pointer to the resulting top
129  * node is returned. If the node is a function or a unary minus the argument is
130  * parsed and a pointer to the function node is returned.
131  * @return CNodeK *
132  */
133  //CNodeK * parsePrimary();
134 
135  /**
136  * This function creates the parameter description for older file versions
137  */
138  void createParameters();
139 
140  /**
141  * Cleanup nodes
142  */
143  void cleanupNodes();
144 };
145 
146 #endif // COPASI_CKinFunction
std::vector< CCopasiObject * > ObjList
Definition: CKinFunction.h:48
#define C_INT32
Definition: copasi.h:90
unsigned C_INT32 mNidx
Definition: CKinFunction.h:52
void createParameters()
std::vector< CNodeK * > & getNodes()
void cleanupNodes()
CKinFunction(const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
std::vector< CNodeK * > mNodes
Definition: CKinFunction.h:46