C++ main module for emicrom Package  1.0
EMMH_Run.h
Go to the documentation of this file.
1 #ifndef EMMH_Run_H
2 #define EMMH_Run_H
3 
4 #include "EMM_Run.h"
5 
6 
7 #include "EMMH_ClassFactory.h"
8 
26 class EMMH_Run : public EMM_Run {
28 
29  //attributes
30 private :
31 
32 protected:
33  // CONSTRUCTORS
36  EMMH_Run(void) {
38  setSoftName("emicrom_hysteresis.exe");
39  }
40 
41  // DESTRUCTORS
44  virtual ~EMMH_Run(void) {
45  }
46 
47 public:
51  inline static SP::EMMH_Run New() {
52  SP::EMMH_Run p(new EMMH_Run(),EMMH_Run::Delete());
53  p->setThis(p);
54  return p;
55  };
56 
57 protected:
61  virtual void createClassFactories(const map<tString,tString>& options) const;
62 public:
66  virtual void initOptions(map<tString,tString>& options) const;
67 
71  virtual void initManOptions(map<tString,map<tString,tString> >& manParameters) const;
72 
73 protected:
84  virtual tBoolean make(const map<tString,tString>&options,const tString& arg) const {
85 
86  if (arg.compare("hysteresis")==0) return makeHysteresis(options);
87  else {
88  return EMM_Run::make(options,arg);
89  }
90  }
91 
92 
93 
94 public:
97  virtual tBoolean makeHysteresis(const map<tString,tString>& options) const;
98 };
99 
100 
101 #endif
Definition: EMMH_Run.h:26
static SP::EMMH_Run New()
create a run class
Definition: EMMH_Run.h:51
void setSoftName(const tString &soft)
set soft name
Definition: CORE_Run.h:76
static SP::EMMH_ClassFactory New()
create a shared pointer to the class factory
Definition: EMMH_ClassFactory.h:58
virtual void createClassFactories(const map< tString, tString > &options) const
create the class factories as mentioned in options
Definition: EMMH_Run.cpp:21
This class is the runner class for the generic package of the core module of mricom Package...
Definition: EMM_Run.h:27
EMMH_Run(void)
create
Definition: EMMH_Run.h:36
#define tBoolean
Definition: types.h:139
virtual ~EMMH_Run(void)
destroy
Definition: EMMH_Run.h:44
virtual tBoolean make(const map< tString, tString > &options, const tString &arg) const
make the arg in parameter
Definition: CORE_Run.h:161
void addClassFactory(SP::CORE_ClassFactory cf)
add to class factory
Definition: CORE_ClassFactory.h:100
virtual void initOptions(map< tString, tString > &options) const
init the options
Definition: EMMH_Run.cpp:85
virtual tBoolean makeHysteresis(const map< tString, tString > &options) const
run the program
Definition: EMMH_Run.cpp:116
DEFINE_SPTR(EMMH_Run)
#define tString
Definition: types.h:135
static CORE_ClassFactory & getClassFactory()
get the class factory to create classes
Definition: CORE_Run.h:109
virtual void initManOptions(map< tString, map< tString, tString > > &manParameters) const
init the man of options
Definition: EMMH_Run.cpp:61
virtual tBoolean make(const map< tString, tString > &options, const tString &arg) const
make the arg in parameter
Definition: EMMH_Run.h:84
SP_OBJECT(EMMH_Run)
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141