COPASI API  4.16.103
CCrossSectionMethod.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/crosssection/CCrossSectionMethod.cpp,v $
3 // $Revision: 1.3 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/07 19:27:36 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 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 #include "CCrossSectionMethod.h"
15 
16 #include "CCrossSectionProblem.h"
17 
20 {
21  CCrossSectionMethod * pMethod = NULL;
22 
23  switch (subType)
24  {
25  case unset:
26  case crossSectionMethod:
27  pMethod = new CCrossSectionMethod(subType);
28  break;
29 
30  default:
31  fatalError();
32  }
33 
34  return pMethod;
35 }
36 
37 /**
38  * Default constructor.
39  */
41  const CCopasiContainer * pParent):
42  CCopasiMethod(CCopasiTask::crosssection, subType, pParent)
43  //mpProblem(NULL)
44 {
45 
47 }
48 
49 /**
50  * Copy constructor.
51  * @param "const CCrossSectionMethod &" src
52  */
54  const CCopasiContainer * pParent):
55  CCopasiMethod(src, pParent)
56  //mpProblem(src.mpProblem)
58 
59 /**
60  * Destructor.
61  */
64 
65 
67 {
68  return false;
69 }
70 
72 {
73  return false;
74 }
75 
77 {
78  if (!CCopasiMethod::isValidProblem(pProblem)) return false;
79 
80  const CCrossSectionProblem * pP = dynamic_cast<const CCrossSectionProblem *>(pProblem);
81 
82  if (!pP)
83  {
84  //not a correct Problem
85  CCopasiMessage(CCopasiMessage::EXCEPTION, "Problem is not a Cross section problem.");
86  return false;
87  }
88 
89  return true;
90 }
virtual bool isValidProblem(const CCopasiProblem *pProblem)
#define fatalError()
virtual bool isValidProblem(const CCopasiProblem *pProblem)
bool initialize(CCrossSectionProblem *problem)
bool process(CProcessReport *handler)
#define DESTRUCTOR_TRACE
Definition: copasi.h:206
static CCrossSectionMethod * createCrossSectionMethod(CCopasiMethod::SubType subType=CCopasiMethod::crossSectionMethod)
#define CONSTRUCTOR_TRACE
Definition: copasi.h:202