alignment class
More...
#include <BatchAnalysis.h>
alignment class
Definition at line 24 of file BatchAnalysis.h.
| kome::operation::BatchAnalysis::BatchAnalysis |
( |
const char * |
analysisName | ) |
|
constructor
- Parameters
-
| [in] | analysisName | analysis name |
Definition at line 36 of file BatchAnalysis.cpp.
int addFileProperty(const char *prop)
adds file property
kome::plugin::SettingsPage * m_parametersPage
kome::plugin::SettingsPage * m_filesPage
#define NVL(checkVal, replaceVal)
static const char * FILE_NAME_PROP_NAME
kome::plugin::ParameterSettings m_params
| int kome::operation::BatchAnalysis::addFileProperty |
( |
const char * |
prop | ) |
|
adds file property
- Parameters
-
- Returns
- file property index
Definition at line 56 of file BatchAnalysis.cpp.
#define NVL(checkVal, replaceVal)
std::vector< std::string > m_fileProperties
| void kome::operation::BatchAnalysis::analyze |
( |
std::vector< std::string > & |
paths, |
|
|
kome::core::Progress & |
Progress |
|
) |
| |
analyzes
- Parameters
-
| [in] | paths | file paths |
| [out] | progress | the object to show progress |
Definition at line 135 of file BatchAnalysis.cpp.
137 progress.createSubProgresses( paths.size() + 2 );
145 if( progress.isStopped() ) {
151 for(
unsigned int i = 0; i < paths.size() && !progress.isStopped(); i++ ) {
153 std::string message = FMT(
"Analyzing ... [%d/%d]", ( i + 1 ), paths.size() );
154 progress.setStatus( message.c_str() );
159 onAnalyze( paths[ i ].c_str(), *subProgress );
162 if( progress.isStopped() ) {
171 if( !progress.isStopped() ) {
virtual void onFinishAnalysis(kome::core::Progress &progress)=0
on finish analysis
void fill()
sets end position
Progress * getSubProgress(const unsigned int idx)
gets subprogress
virtual void onAnalyze(const char *path, kome::core::Progress &progress)=0
on analyze
progress display abstract class
virtual void onPrepareAnalysis(std::vector< std::string > &paths, kome::core::Progress &progress)=0
on prepares analysis
void setStatus(const char *status, const bool bForced=false)
sets status
| const char * kome::operation::BatchAnalysis::getFileProperty |
( |
const unsigned int |
idx | ) |
|
gets the file property
- Parameters
-
- Returns
- file property
Definition at line 68 of file BatchAnalysis.cpp.
std::vector< std::string > m_fileProperties
gets files
- Parameters
-
| [in] | settings | parameters |
| [out] | paths | the array to store file paths. |
Definition at line 87 of file BatchAnalysis.cpp.
virtual void onGetFiles(kome::objects::SettingParameterValues *settings, std::vector< std::pair< std::string, kome::core::Properties > > &files)
This method is called form the getFiles method.
| static void kome::operation::BatchAnalysis::getFiles |
( |
const char * |
dir, |
|
|
std::vector< std::pair< std::string, kome::core::Properties > > & |
files |
|
) |
| |
|
staticprotected |
gets files
- Parameters
-
| [in] | dir | directory |
| [out] | files | the array to store file informations |
Definition at line 187 of file BatchAnalysis.cpp.
189 boost::filesystem::path p( dir, boost::filesystem::native );
192 if( boost::filesystem::is_directory( p ) ) {
193 boost::filesystem::directory_iterator end;
194 for( boost::filesystem::directory_iterator it( p ); it != end; it++ ) {
195 boost::filesystem::path child = (*it);
196 getFiles( boost::filesystem::absolute( child ).
string().c_str(), files );
200 files.resize( files.size() + 1 );
201 files.back().first = boost::filesystem::absolute( p ).string();
void getFiles(kome::objects::SettingParameterValues *settings, std::vector< std::pair< std::string, kome::core::Properties > > &files)
gets files
static const char * FILE_NAME_PROP_NAME
| kome::plugin::SettingsPage * kome::operation::BatchAnalysis::getFilesPage |
( |
| ) |
|
gets the files page
- Returns
- files page
Definition at line 76 of file BatchAnalysis.cpp.
virtual void onCreateFilesPage(kome::plugin::ParameterSettings ¶ms, kome::plugin::SettingsPage &page)
creates files page
kome::plugin::SettingsPage * m_filesPage
kome::plugin::ParameterSettings m_params
| unsigned int kome::operation::BatchAnalysis::getNumberOfFileProperties |
( |
| ) |
|
gets the number of file properties
- Returns
- the number of file properties
Definition at line 63 of file BatchAnalysis.cpp.
std::vector< std::string > m_fileProperties
| kome::plugin::SettingsPage * kome::operation::BatchAnalysis::getParametersPage |
( |
| ) |
|
gets the parameters page
- Returns
- parameters page
Definition at line 92 of file BatchAnalysis.cpp.
kome::plugin::SettingsPage * m_parametersPage
virtual void onCreateParametersPage(kome::plugin::ParameterSettings ¶ms, kome::plugin::SettingsPage &page)
creates parameters
kome::plugin::ParameterSettings m_params
| void kome::operation::BatchAnalysis::onAnalyze |
( |
const char * |
path, |
|
|
kome::core::Progress & |
progress |
|
) |
| |
|
protectedpure virtual |
on analyze
- Parameters
-
| [in] | path | file path |
| [out] | progress | the object to show the progress |
| void kome::operation::BatchAnalysis::onCreateFilesPage |
( |
kome::plugin::ParameterSettings & |
params, |
|
|
kome::plugin::SettingsPage & |
page |
|
) |
| |
|
protectedvirtual |
creates files page
- Parameters
-
| [out] | params | parameters information |
| [out] | page | page |
Definition at line 103 of file BatchAnalysis.cpp.
105 kome::plugin::SettingsValue* value = params.addValue();
106 value->setType( kome::plugin::SettingsValue::TYPE_DIR );
107 value->setRequired(
true );
110 kome::plugin::SettingsParam* param = params.addParam();
111 param->setSection( FMT(
"Batch Analysis (%s)",
m_name.c_str() ).c_str() );
112 param->setKey(
"DIR" );
116 kome::plugin::SettingsForm* form = page.addForm();
117 form->setTitle(
"Directory" );
118 form->setParam( param );
119 form->setDesc(
"Select the data folder." );
static const char * DIR_PARAM_NAME
| void kome::operation::BatchAnalysis::onCreateParametersPage |
( |
kome::plugin::ParameterSettings & |
params, |
|
|
kome::plugin::SettingsPage & |
page |
|
) |
| |
|
protectedvirtual |
creates parameters
- Parameters
-
| [out] | params | parameters information |
| [out] | page | page |
Definition at line 182 of file BatchAnalysis.cpp.
183 LOG_WARN( FMT(
"This method is underconstruction. Please implement onCreateParametersPage method in the subclass of BatchAnalysis." ) );
on finish analysis
- Parameters
-
| [out] | progress | the object to show the progress |
This method is called form the getFiles method.
- Parameters
-
| [in] | settings | parameters |
| [out] | files | the array to store file informations |
Definition at line 123 of file BatchAnalysis.cpp.
static const char * DIR_PARAM_NAME
void getFiles(kome::objects::SettingParameterValues *settings, std::vector< std::pair< std::string, kome::core::Properties > > &files)
gets files
const char * getParameterValue(const unsigned int index)
gets parameter value
| void kome::operation::BatchAnalysis::onPrepareAnalysis |
( |
std::vector< std::string > & |
paths, |
|
|
kome::core::Progress & |
progress |
|
) |
| |
|
protectedpure virtual |
on prepares analysis
- Parameters
-
| [in] | paths | analysis files |
| [out] | progress | the object to show the progress |
| const char * BatchAnalysis::DIR_PARAM_NAME = "dir" |
|
staticprotected |
| const char * BatchAnalysis::FILE_NAME_PROP_NAME = "File Name" |
|
staticprotected |
| std::vector< std::string > kome::operation::BatchAnalysis::m_fileProperties |
|
protected |
| kome::plugin::SettingsPage* kome::operation::BatchAnalysis::m_filesPage |
|
protected |
| std::string kome::operation::BatchAnalysis::m_name |
|
protected |
| kome::plugin::SettingsPage* kome::operation::BatchAnalysis::m_parametersPage |
|
protected |
| kome::plugin::ParameterSettings kome::operation::BatchAnalysis::m_params |
|
protected |
The documentation for this class was generated from the following files: