Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
BatchAnalysis.h
Go to the documentation of this file.
1 
12 #ifndef __KOME_OPERATION_BATCH_ANALYSIS_H__
13 #define __KOME_OPERATION_BATCH_ANALYSIS_H__
14 
15 
16 
17 namespace kome {
18  namespace operation {
19 
24  class DATA_OPERATION_CLASS BatchAnalysis {
25  public:
31  BatchAnalysis( const char* analysisName );
32 
37  virtual ~BatchAnalysis();
38 
39  protected:
41  std::string m_name;
42 
44  std::vector< std::string > m_fileProperties;
45 
47  kome::plugin::ParameterSettings m_params;
48 
50  kome::plugin::SettingsPage* m_filesPage;
51 
53  kome::plugin::SettingsPage* m_parametersPage;
54 
55  protected:
57  static const char* FILE_NAME_PROP_NAME;
58 
60  static const char* DIR_PARAM_NAME;
61 
62  public:
67  void clearFileProperties();
68 
75  int addFileProperty( const char* prop );
76 
82  unsigned int getNumberOfFileProperties();
83 
90  const char* getFileProperty( const unsigned int idx );
91 
97  kome::plugin::SettingsPage* getFilesPage();
98 
105  void getFiles( kome::objects::SettingParameterValues* settings, std::vector< std::pair< std::string, kome::core::Properties > >& files );
106 
112  kome::plugin::SettingsPage* getParametersPage();
113 
120  void analyze( std::vector< std::string >& paths, kome::core::Progress& progress );
121 
126  void showResult();
127 
128  protected:
135  virtual void onCreateFilesPage( kome::plugin::ParameterSettings& params, kome::plugin::SettingsPage& page );
136 
143  virtual void onGetFiles( kome::objects::SettingParameterValues* settings, std::vector< std::pair< std::string, kome::core::Properties > >& files );
144 
151  virtual void onCreateParametersPage( kome::plugin::ParameterSettings& params, kome::plugin::SettingsPage& page );
152 
153  protected:
160  virtual void onPrepareAnalysis( std::vector< std::string >& paths, kome::core::Progress& progress ) = 0;
161 
168  virtual void onAnalyze( const char* path, kome::core::Progress& progress ) = 0;
169 
175  virtual void onFinishAnalysis( kome::core::Progress& progress ) = 0;
176 
181  virtual void onShowResult() = 0;
182 
183 
184  protected:
191  static void getFiles( const char* dir, std::vector< std::pair< std::string, kome::core::Properties > >& files );
192 
193  };
194  }
195 }
196 
197 
198 #endif // __KOME_OPERATION_BATCH_ANALYSIS_H__
static const char * DIR_PARAM_NAME
Definition: BatchAnalysis.h:60
setting parameter values management class
kome::plugin::SettingsPage * m_parametersPage
Definition: BatchAnalysis.h:53
kome::plugin::SettingsPage * m_filesPage
Definition: BatchAnalysis.h:50
progress display abstract class
Definition: Progress.h:31
static const char * FILE_NAME_PROP_NAME
Definition: BatchAnalysis.h:57
std::vector< std::string > m_fileProperties
Definition: BatchAnalysis.h:44
kome::plugin::ParameterSettings m_params
Definition: BatchAnalysis.h:47