OpenWalnut  1.5.0dev
Public Member Functions | List of all members
WDataSetSingleCreatorInterface Class Referenceabstract

Define the interface which is injected into an WObjectNDIP. More...

#include <WDataSetSingleCreatorInterface.h>

+ Inheritance diagram for WDataSetSingleCreatorInterface:

Public Member Functions

virtual WValueSetBase::SPtr operator() (WProgress::SPtr progress, WGridRegular3D::ConstSPtr grid, unsigned char order=0, unsigned char dimension=1, dataType type=W_DT_FLOAT)=0
 Create the dataset. More...
 
virtual ~WDataSetSingleCreatorInterface ()
 Destructor. More...
 

Detailed Description

Define the interface which is injected into an WObjectNDIP.

Remember that WObjectNDIP is a template class deriving from its template type. This way we can inject methods into the base class. It avoids derivation from WObjectNDIP.

This class is especially useful for all dataset types that are WDataSetSingle types. So, strategies written using this interface can be utilized for vector and scalar data for example.

Definition at line 41 of file WDataSetSingleCreatorInterface.h.

Constructor & Destructor Documentation

◆ ~WDataSetSingleCreatorInterface()

WDataSetSingleCreatorInterface::~WDataSetSingleCreatorInterface ( )
virtual

Destructor.

Definition at line 27 of file WDataSetSingleCreatorInterface.cpp.

Member Function Documentation

◆ operator()()

virtual WValueSetBase::SPtr WDataSetSingleCreatorInterface::operator() ( WProgress::SPtr  progress,
WGridRegular3D::ConstSPtr  grid,
unsigned char  order = 0,
unsigned char  dimension = 1,
dataType  type = W_DT_FLOAT 
)
pure virtual

Create the dataset.

This needs to be implemented by all the creators you write. This method is designed to be applicable to all kinds of WDataSetSingle that use WValueSetBase. Your implementation does not need to support all types. If you do not support any order/dimension combination, throw an exception (like by using WAssert).

Parameters
orderthe tensor order of the values stored in this WValueSet
dimensionthe tensor dimension of the values stored in this WValueSet
progressthe progress instance you should increment each time you fill the value for one voxel.
gridthe grid on which the value set has to be build
typethe value type in the value set
Returns
the value set for the given grid

Implemented in WDataCreatorSingleDirection, WDataCreatorTuring, WDataCreatorTangle, WDataCreatorSphere, WDataCreatorRandom, WDataCreatorLinearAscent, WDataCreatorConstant, and WDataCreatorBreyzel5.


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