29 #include "WModuleContainer.h"
30 #include "WModuleFactory.h"
32 #include "WBatchLoader.h"
37 m_filenamesToLoad( filenames ),
38 m_targetContainer( targetContainer ),
39 m_suppressColormaps( false )
70 dmod->setFilename( *iter );
75 mod->isReadyOrCrashed().wait();
Class for loading many datasets.
Base for all data loader modules.
void push_back(const typename S::value_type &x)
Adds a new element at the end of the container.
virtual void run()
Run thread.
WBatchLoader(std::vector< std::string > filenames, boost::shared_ptr< WModuleContainer > targetContainer)
Initializes the batchloader but does not start it.
virtual ~WBatchLoader()
Destructor.
DataModuleList m_dataModules
The list of modules that have been added.
void setSuppressColormaps(bool suppress=true)
Allows suppression of colormap registration in data modules.
Base class for all classes needing to be executed in a separate thread.
ReadTicket getReadTicket() const
Returns a ticket to get read access to the contained data.
virtual void setSuppressColormaps(bool suppress=true)
Allows suppression of colormap registration in data modules.
boost::shared_ptr< WDataModule > SPtr
Convenience typedef for a boost::shared_ptr< WDataModule >.
DataModuleList::ReadTicket getDataModuleList() const
Returns a ticket to the list of data modules that have been added so far.
virtual void threadMain()
Function that has to be overwritten for execution.
bool m_suppressColormaps
If true, data modules are instructed to suppress colormap registration.
std::vector< std::string > m_filenamesToLoad
List of files to load.
static SPtr getModuleFactory()
Returns instance of the module factory to use to create modules.
bool getSuppressColormaps() const
Checks whether suppression of colormaps is active.
virtual void run()
Run thread and load the data.
boost::shared_ptr< WSharedObjectTicketRead< std::vector< WDataModule::SPtr > > > ReadTicket
Type for read tickets.
boost::shared_ptr< WModuleContainer > m_targetContainer
The container which later will contain the loaded datasets.