Class for loading many datasets. More...
#include <WBatchLoader.h>
Public Member Functions | |
WBatchLoader (std::vector< std::string > fileNames, boost::shared_ptr< WModuleContainer > targetContainer) | |
Initializes the batchloader but does not start it. | |
virtual | ~WBatchLoader () |
Destructor. | |
virtual void | run () |
Run thread and load the data. | |
Protected Member Functions | |
virtual void | threadMain () |
Function that has to be overwritten for execution. | |
Protected Attributes | |
std::vector< std::string > | m_fileNamesToLoad |
List of files to load. | |
boost::shared_ptr < WModuleContainer > | m_targetContainer |
The container which later will contain the loaded datasets. |
Class for loading many datasets.
It runs in a separate thread.
Definition at line 43 of file WBatchLoader.h.
WBatchLoader::WBatchLoader | ( | std::vector< std::string > | fileNames, | |
boost::shared_ptr< WModuleContainer > | targetContainer | |||
) |
Initializes the batchloader but does not start it.
Use run().
fileNames | the files to load. | |
targetContainer | the container to which the data modules should be added. |
Definition at line 35 of file WBatchLoader.cpp.
WBatchLoader::~WBatchLoader | ( | ) | [virtual] |
Destructor.
Definition at line 44 of file WBatchLoader.cpp.
void WBatchLoader::run | ( | ) | [virtual] |
Run thread and load the data.
Definition at line 49 of file WBatchLoader.cpp.
References m_targetContainer.
void WBatchLoader::threadMain | ( | ) | [protected, virtual] |
Function that has to be overwritten for execution.
It gets executed in a separate thread after run() has been called.
Definition at line 58 of file WBatchLoader.cpp.
References WModuleFactory::getModuleFactory(), m_fileNamesToLoad, and m_targetContainer.
std::vector< std::string > WBatchLoader::m_fileNamesToLoad [protected] |
boost::shared_ptr< WModuleContainer > WBatchLoader::m_targetContainer [protected] |
The container which later will contain the loaded datasets.
Definition at line 82 of file WBatchLoader.h.
Referenced by run(), and threadMain().