OpenWalnut  1.4.0
Public Types | Public Member Functions | Private Attributes
WDataModule Class Reference

Base for all data loader modules. More...

#include <WDataModule.h>

+ Inheritance diagram for WDataModule:

List of all members.

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.

Detailed Description

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.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

Default constructor.

Definition at line 27 of file WDataModule.cpp.

Destructor.

Definition at line 33 of file WDataModule.cpp.


Member Function Documentation

virtual boost::shared_ptr< WDataSet > WDataModule::getDataSet ( ) [pure virtual]

Getter for the dataset.

Returns:
the dataset encapsulated by this module.
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.

Returns:
the path of the file that has been loaded.

Checks whether suppression of colormaps is active.

Returns:
true if colormaps are suppressed.

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.

Returns:
the Type. If you do not overwrite this method, it will return MODULE_ARBITRARY.

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.

Notes:
The reason for using this method to set the filename instead of a property is, that a property gets set AFTER ready(), but this (and only this module) needs it before ready got called.
Parameters:
fnamethe 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.

Notes:
call this before adding and running the module.
Parameters:
suppresstrue if suppress

Definition at line 43 of file WDataModule.cpp.

References m_suppressColormaps.

Referenced by WModuleContainerWrapper::createDataModule(), and WBatchLoader::threadMain().


Member Data Documentation

If true, data modules are instructed to suppress colormap registration.

Definition at line 114 of file WDataModule.h.

Referenced by getSuppressColormaps(), and setSuppressColormaps().


The documentation for this class was generated from the following files: