delphi_cb
 All Classes Namespaces Files Functions Variables Macros
interface_datamarshal.h
Go to the documentation of this file.
1 
12 #ifndef IDATAMARSHAL_H_
13 #define IDATAMARSHAL_H_
14 
15 #include <iostream>
16 #include <fstream>
17 #include <string> // std::string
18 
19 #include "environment.h"
20 #include "interface_exceptions.h"
21 
23 {
24  protected:
30  bool getBiomodel(const string &strLineNoSpace);
31 
37  bool getQinclude(const string &strLineNoSpace);
38 
45  bool getParameter(const string &strLineNoSpace);
46 
52  virtual bool getStatement(string strLineNoSpace) = 0;
53 
59  virtual bool getFunction(string strLineNoSpace) = 0;
60 
61  public:
62  string strParamFile;
63  string strBioModel;
64  string strNumSolver;
65 
70  {
71 #ifdef DEBUG_OBJECT
72  cout << endl;
73  cout << "****************************************************************\n";
74  cout << "* IDataMarshal is constructed *\n";
75  cout << "****************************************************************\n";
76 #endif
77 
78  strParamFile = "fort.10";
79  strBioModel = "PBE";
80  strNumSolver = "DELPHI"; // default
81  };
82 
86  IDataMarshal(int argc, char *argv[])
87  {
88 #ifdef DEBUG_OBJECT
89  cout << endl;
90  cout << "****************************************************************\n";
91  cout << "* IDataMarshal is constructed *\n";
92  cout << "****************************************************************\n";
93 #endif
94 
95  strParamFile = "fort.10";
96  strBioModel = "PBE";
97  strNumSolver = "DELPHI"; // default
98 
99  if (1 < argc) strParamFile = argv[1]; // input parameter file name
100  };
101 
105  virtual ~IDataMarshal()
106  {
107 #ifdef DEBUG_OBJECT
108  cout << endl;
109  cout << "****************************************************************\n";
110  cout << "* IDataMarshal is destroyed *\n";
111  cout << "****************************************************************\n";
112 #endif
113  };
114 
119  void read(string strFileName);
120 
124  virtual void updateParameters() = 0;
125 };
126 
127 #endif // IDATAMARSHAL_H_
bool getQinclude(const string &strLineNoSpace)
Definition: interface_datamarshal.cpp:65
virtual bool getFunction(string strLineNoSpace)=0
string strBioModel
Bio-model to solve (default: PBE)
Definition: interface_datamarshal.h:63
virtual void updateParameters()=0
virtual bool getStatement(string strLineNoSpace)=0
bool getParameter(const string &strLineNoSpace)
Definition: interface_datamarshal.cpp:82
bool getBiomodel(const string &strLineNoSpace)
Definition: interface_datamarshal.cpp:19
virtual ~IDataMarshal()
Definition: interface_datamarshal.h:105
IDataMarshal(int argc, char *argv[])
Definition: interface_datamarshal.h:86
Definition: interface_datamarshal.h:22
string strParamFile
read-in parameter file (default: fort.10)
Definition: interface_datamarshal.h:62
warnings/exceptions occurring in interface classes
pre-processor marco's used for compiling the code
string strNumSolver
numerical solver (default: DelPhi)
Definition: interface_datamarshal.h:64
IDataMarshal()
Definition: interface_datamarshal.h:69
void read(string strFileName)
Definition: interface_datamarshal.cpp:114