COPASI API  4.16.103
CCopasiMethod.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2003 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 /**
16  * CCopasiMethod class.
17  * This class is used to describe a method in COPASI. This class is
18  * intended to be used as the parent class for all methods whithin COPASI.
19  *
20  * Created for Copasi by Stefan Hoops 2003
21  */
22 
23 #ifndef COPASI_CCopasiMethod
24 #define COPASI_CCopasiMethod
25 
26 #include <string>
27 
31 
32 class CProcessReport;
33 
35 {
36 public:
37  /**
38  * Enumeration of the sub types of methods known to COPASI.
39  */
40  enum SubType
41  {
42  unset = 0,
80 #ifdef COPASI_SSA
81  stoichiometricStabilityAnalysis,
82 #endif // COPASI_SSA
89  };
90 
91  /**
92  * String literals for the GUI to display sub type names of methods known
93  * to COPASI.
94  */
95  static const std::string SubTypeName[];
96 
97  /**
98  * XML sub type names of methods known to COPASI.
99  */
100  static const char* XMLSubType[];
101 
102  // Attributes
103 private:
104  /**
105  * The type of the method
106  */
108 
109  /**
110  * The type of the method
111  */
113 
114 protected:
115  /**
116  * a pointer to the callback
117  */
119 
120  /**
121  * A pointer to the report
122  */
123  //CReport * mpReport;
124 
125  // Operations
126 
127 private:
128  /**
129  * Default constructor
130  */
131  CCopasiMethod();
132 
133 protected:
134  /**
135  * Specific constructor
136  * @param const CCopasiTask::Type & type
137  * @param const CCopasiMethod::SubType & subType
138  * @param const CCopasiContainer * pParent (default: NULL)
139  */
140  CCopasiMethod(const CCopasiTask::Type & taskType,
141  const SubType & subType,
142  const CCopasiContainer * pParent = NULL);
143 
144 public:
145  /**
146  * Copy constructor
147  * @param const CCopasiMethodr & src
148  * @param const CCopasiContainer * pParent (default: NULL)
149  */
150  CCopasiMethod(const CCopasiMethod & src,
151  const CCopasiContainer * pParent = NULL);
152 
153  /**
154  * Destructor
155  */
156  virtual ~CCopasiMethod();
157 
158  /**
159  * Set the call back of the problem
160  * @param CProcessReport * pCallBack
161  * @result bool succes
162  */
163  virtual bool setCallBack(CProcessReport * pCallBack);
164 
165  /**
166  * Retrieve the type of the method
167  * @return const string & type
168  */
169  const CCopasiTask::Type & getType() const;
170 
171  /**
172  * Retrieve the sub type of the method
173  * @return CCopasiMethod::SubType & subType
174  */
175  const CCopasiMethod::SubType & getSubType() const;
176 
177  /**
178  * Check if the method is suitable for this problem
179  * @return bool suitability of the method
180  */
181  virtual bool isValidProblem(const CCopasiProblem * pProblem);
182 
183  /**
184  * Load a list of parameters
185  * @param "CReadConfig &" configBuffer
186  * @param "CReadConfig::Mode" mode Default(CReadConfig::SEARCH)
187  */
188  virtual void load(CReadConfig & configBuffer,
190 
191  /**
192  * This is the output method for any object. The default implementation
193  * provided with CCopasiObject uses the ostream operator<< of the object
194  * to print the object.To overide this default behaviour one needs to
195  * reimplement the virtual print function.
196  * @param std::ostream * ostream
197  */
198  virtual void print(std::ostream * ostream) const;
199 
200  /**
201  * Output stream operator
202  * @param ostream & os
203  * @param const CCopasiMethod & A
204  * @return ostream & os
205  */
206  friend std::ostream &operator<<(std::ostream &os, const CCopasiMethod & o);
207 
208  /**
209  * This is the output method for any result of a method. The default implementation
210  * provided with CCopasiMethod. Does only print "Not implmented." To overide this
211  * default behaviour one needs to reimplement the virtual printResult function.
212  * @param std::ostream * ostream
213  **/
214 
215  virtual void printResult(std::ostream * ostream) const;
216 };
217 
218 #endif // COPASI_CCopasiMethod
virtual void printResult(std::ostream *ostream) const
virtual bool setCallBack(CProcessReport *pCallBack)
const CCopasiMethod::SubType & getSubType() const
virtual bool isValidProblem(const CCopasiProblem *pProblem)
virtual void load(CReadConfig &configBuffer, CReadConfig::Mode mode=CReadConfig::SEARCH)
virtual void print(std::ostream *ostream) const
virtual ~CCopasiMethod()
const CCopasiTask::Type & getType() const
static const std::string SubTypeName[]
Definition: CCopasiMethod.h:95
CCopasiTask::Type mType
CCopasiMethod::SubType mSubType
friend std::ostream & operator<<(std::ostream &os, const CCopasiMethod &o)
static const char * XMLSubType[]
CProcessReport * mpCallBack