Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
OperationManager.h
Go to the documentation of this file.
1 
11 #ifndef __KOM_OPERATION_OPERATION_MANAGER_H__
12 #define __KOM_OPERATION_OPERATION_MANAGER_H__
13 
14 #include "stdafx.h"
15 #include "Operation.h"
16 
17 #include <vector>
18 
19 namespace kome {
20  namespace operation {
21 
22  class Operation;
23 
28  class DATA_OPERATION_CLASS OperationManager {
29  protected:
35 
40  virtual ~OperationManager();
41 
42  protected:
44  std::string m_updateFilePath;
45 
47  std::string m_prevFilePath;
48 
53  typedef enum {
54  TYPE_NONE = 5,
55  TYPE_FINISH = 0,
56  TYPE_CANCEL = 1
57  } OperationState;
58 
63  struct OperationInfo{
64  Operation* operation;
65  int iState;
66  };
67 
69  std::vector<OperationInfo> m_operations;
70 
73 
75  bool m_saveFlg;
76 
79  public:
85  void addOperation( Operation* operation );
86 
92  void removeOperation( Operation* operation );
93 
99  unsigned int getNumberOfOperations();
100 
107  Operation* getOperation( const unsigned int index );
108 
114  int getNumberOfFinishedOperations();
115 
122  Operation* getFinishedOperation( int i );
123 
129  int getNumberOfCanceledOperations();
130 
137  Operation* getCanceledOperation( int i );
138 
145  const char* getUpdateDataFilePath( Operation* operation );
146 
153  const char* getPreviousDataFilePath( Operation* operation );
154 
160  void moveToFinished( Operation* operation );
161 
167  void movetoCanseled( Operation* operation );
168 
173  void clearCanceledOperation();
174 
181  void setState( const unsigned int index, int state );
182 
189  int getState( const unsigned int index );
190 
196  static OperationManager& getInstance();
197 
203  void setSaveCount( int count ){ m_saveCount = count; }
204 
210  int getSaveCount(){ return m_saveCount; }
211 
217  void setSaveCountFlg( const bool bSave ){ m_saveFlg = bSave; }
218 
224  bool getSaveCountFlg(){ return m_saveFlg; }
225 
231  void setSaveCancelFlg( const bool bCancel ){ m_cancelFlg = bCancel; }
232 
238  bool getSaveCancelFlg(){ return m_cancelFlg; }
239  private:
240 
245  void SendStatusToList();
246 
247  };
248  }
249 }
250 
251 #endif // __KOM_OPERATION_OPERATION_MANAGER_H__
bool getSaveCountFlg()
get the save count flag
implements of GridEmailTextCtrl class
int getSaveCount()
get the save count
void setSaveCancelFlg(const bool bCancel)
set the save cancel flag
void setSaveCountFlg(const bool bSave)
set the save count flag
bool getSaveCancelFlg()
get the save cancel flag
Operation information class.
Definition: Operation.h:22
operation management class
std::vector< OperationInfo > m_operations
void setSaveCount(int count)
set the save count