OpenWalnut
1.4.0
|
Base for all data loader modules. More...
#include <WDataModule.h>
Public Types | |
typedef boost::shared_ptr < WDataModule > | SPtr |
Convenience typedef for a boost::shared_ptr< WDataModule >. | |
typedef boost::shared_ptr < const WDataModule > | ConstSPtr |
Convenience typedef for a boost::shared_ptr< const WDataModule >. | |
Public Member Functions | |
WDataModule () | |
Default constructor. | |
virtual | ~WDataModule () |
Destructor. | |
virtual MODULE_TYPE | getType () const |
Gets the type of the module. | |
virtual boost::shared_ptr < WDataSet > | getDataSet ()=0 |
Getter for the dataset. | |
virtual void | setFilename (boost::filesystem::path fname)=0 |
Sets the filename of the file to load. | |
virtual boost::filesystem::path | getFilename () const =0 |
Gets the path of the file that has been loaded. | |
virtual void | setSuppressColormaps (bool suppress=true) |
Allows suppression of colormap registration in data modules. | |
bool | getSuppressColormaps () const |
Checks whether suppression of colormaps is active. | |
Private Attributes | |
bool | m_suppressColormaps |
If true, data modules are instructed to suppress colormap registration. |
Base for all data loader modules.
This currently is only a prototype to move WMData out of the core. Later, it will provide a whole interface to handle arbitrary data/multi-file data and other complex things.
Definition at line 36 of file WDataModule.h.
typedef boost::shared_ptr< const WDataModule > WDataModule::ConstSPtr |
Convenience typedef for a boost::shared_ptr< const WDataModule >.
Reimplemented from WModule.
Definition at line 47 of file WDataModule.h.
typedef boost::shared_ptr< WDataModule > WDataModule::SPtr |
Convenience typedef for a boost::shared_ptr< WDataModule >.
Reimplemented from WModule.
Definition at line 42 of file WDataModule.h.
Default constructor.
Definition at line 27 of file WDataModule.cpp.
WDataModule::~WDataModule | ( | ) | [virtual] |
Destructor.
Definition at line 33 of file WDataModule.cpp.
virtual boost::shared_ptr< WDataSet > WDataModule::getDataSet | ( | ) | [pure virtual] |
Getter for the dataset.
virtual boost::filesystem::path WDataModule::getFilename | ( | ) | const [pure virtual] |
Gets the path of the file that has been loaded.
It always is the value which has been set during the FIRST call of setFilename.
bool WDataModule::getSuppressColormaps | ( | ) | const |
Checks whether suppression of colormaps is active.
Definition at line 48 of file WDataModule.cpp.
References m_suppressColormaps.
MODULE_TYPE WDataModule::getType | ( | ) | const [virtual] |
Gets the type of the module.
This is useful for FAST differentiation between several modules like standard modules and data modules which play a special role in OpenWalnut/Kernel.
Reimplemented from WModule.
Definition at line 38 of file WDataModule.cpp.
virtual void WDataModule::setFilename | ( | boost::filesystem::path | fname | ) | [pure virtual] |
Sets the filename of the file to load.
If this method is called multiple times it has no effect. It has to be called right after construction BEFORE running the data module.
fname | the name of the file |
void WDataModule::setSuppressColormaps | ( | bool | suppress = true | ) | [virtual] |
Allows suppression of colormap registration in data modules.
This can be handy if you use data modules in a container to construct more complex data sets from multiple input files.
suppress | true if suppress |
Definition at line 43 of file WDataModule.cpp.
References m_suppressColormaps.
Referenced by WModuleContainerWrapper::createDataModule(), and WBatchLoader::threadMain().
bool WDataModule::m_suppressColormaps [private] |
If true, data modules are instructed to suppress colormap registration.
Definition at line 114 of file WDataModule.h.
Referenced by getSuppressColormaps(), and setSuppressColormaps().