OpenWalnut 1.2.5
Public Types | Public Member Functions

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.

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 48 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 43 of file WDataModule.h.


Constructor & Destructor Documentation

WDataModule::WDataModule ( )

Default constructor.

Definition at line 27 of file WDataModule.cpp.

WDataModule::~WDataModule ( ) [virtual]

Destructor.

Definition at line 32 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.
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 37 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

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends