Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Operation.h
Go to the documentation of this file.
1 
12 #ifndef __KOM_OPERATION_OPERATION_H__
13 #define __KOM_OPERATION_OPERATION_H__
14 
15 
16 namespace kome {
17  namespace operation {
22  class DATA_OPERATION_CLASS Operation {
23  public:
28  Operation();
29 
34  virtual ~Operation();
35 
36  protected:
38  std::string m_operatName;
39 
41  std::string m_shortName;
42 
44  int m_type;
45 
47  std::string m_descript;
48 
51 
53  std::string m_paramString;
54 
56  std::string m_prevPath;
57 
59  std::string m_updatePath;
60 
61  public:
66  typedef enum {
67  TYPE_STANDARD = 0,
68  TYPE_GUI = 1,
69  TYPE_INPUT = 2,
70  TYPE_OUTPUT = 4,
71  TYPE_AUTO = 8
72  } OperationType;
73 
74  public:
80  void setOperationName( const char* operationName );
81 
87  const char* getOperationName();
88 
94  void setShortName( const char* shortName );
95 
101  const char* getShortName();
102 
108  void setOperationType( int type );
109 
115  int getOperationType();
116 
122  void setDescription( const char* description );
123 
129  const char* getDescription();
130 
136  void setTargetSample( kome::objects::Sample* sample );
137 
143  kome::objects::Sample* getTargetSample();
144 
150  void setParametersString( const char* parameter );
151 
157  const char* getParametersString();
158 
164  void loadCondition( boost::function< int ( void*, int ) > readFun );
165 
171  void saveCondition( boost::function< int ( void*, int ) > writeFun );
172 
178  bool execute();
179 
185  std::string getPrevFilePath();
186 
192  void setPrevFilePath( const char* strPath );
193 
199  std::string getUpdateFilePath();
200 
206  void setUpdateFilePath( const char* strPath );
207 
213  void removeOperation( Operation* opt );
214  protected:
220  virtual std::string onGetDescription() = 0;
221 
227  virtual std::string onGetParametersString() = 0;
228 
234  virtual void onSetParametersString( const char* strParam ) = 0;
235 
241  virtual void onLoadCondition( boost::function< int ( void*, int ) > readFun ) = 0;
242 
248  virtual void onSaveCondition( boost::function< int ( void*, int ) > writeFun ) = 0;
249 
255  virtual bool onExecute() = 0;
256 
257 
258  };
259  }
260 }
261 
262 #endif // __KOM_OPERATION_OPERATION_H__
kome::objects::Sample * m_targetSample
Definition: Operation.h:50
sample information management class
Definition: Sample.h:34
std::string m_updatePath
Definition: Operation.h:59
std::string m_paramString
Definition: Operation.h:53
Operation information class.
Definition: Operation.h:22
std::string m_operatName
Definition: Operation.h:38