OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
WDataSet Class Reference

Base class for all data set types. More...

#include <WDataSet.h>

+ Inheritance diagram for WDataSet:
+ Collaboration diagram for WDataSet:

Public Types

typedef std::shared_ptr< WDataSetSPtr
 Shared pointer abbreviation to a instance of this class. More...
 
typedef std::shared_ptr< const WDataSetConstSPtr
 Shared pointer abbreviation to a const instance of this class. More...
 

Public Member Functions

 WDataSet ()
 This constructor should be used if a dataSet does not stem from a file. More...
 
virtual ~WDataSet ()
 Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. More...
 
void setFilename (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
std::string getFilename () const
 Get the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED void setFileName (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED std::string getFileName () const
 Get the name of the file that this data set stems from. More...
 
virtual bool isTexture () const
 Determines whether this dataset can be used as a texture. More...
 
virtual std::shared_ptr< WDataSetVectorisVectorDataSet ()
 Checks if this dataset is a vector dataset. More...
 
virtual osg::ref_ptr< WDataTexture3DgetTexture () const
 Returns the texture- representation of the dataset. More...
 
virtual const std::string getName () const
 Gets the name of this prototype. More...
 
virtual const std::string getDescription () const
 Gets the description for this prototype. More...
 
std::shared_ptr< WPropertiesgetProperties () const
 Return a pointer to the properties object of the dataset. More...
 
std::shared_ptr< WPropertiesgetInformationProperties () const
 Return a pointer to the information properties object of the dataset. More...
 
- Public Member Functions inherited from WTransferable
 WTransferable ()
 Default constructor. More...
 
virtual ~WTransferable ()
 Destructor. More...
 
- Public Member Functions inherited from WPrototyped
 WPrototyped ()
 Default constructor. More...
 
virtual ~WPrototyped ()
 Destructor. More...
 
template<typename T >
bool isA ()
 Checks whether the actual prototype has the specified runtime type. More...
 

Static Public Member Functions

static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 

Protected Attributes

std::shared_ptr< WPropertiesm_properties
 The property object for the dataset. More...
 
std::shared_ptr< WPropertiesm_infoProperties
 The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". More...
 

Static Protected Attributes

static std::shared_ptr< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 

Private Attributes

std::string m_filename
 Name of the file this data set was loaded from. More...
 

Detailed Description

Base class for all data set types.

This class has a number of subclasses specifying the different types of data sets. Two of the dataset types represent single and time-dependent datasets (compound of several time steps) respectively.

Definition at line 49 of file WDataSet.h.

Member Typedef Documentation

◆ ConstSPtr

typedef std::shared_ptr< const WDataSet > WDataSet::ConstSPtr

Shared pointer abbreviation to a const instance of this class.

Definition at line 60 of file WDataSet.h.

◆ SPtr

typedef std::shared_ptr< WDataSet > WDataSet::SPtr

Shared pointer abbreviation to a instance of this class.

Definition at line 55 of file WDataSet.h.

Constructor & Destructor Documentation

◆ WDataSet()

WDataSet::WDataSet ( )

This constructor should be used if a dataSet does not stem from a file.

It presets the correpsonding filename as empty string.

Definition at line 39 of file WDataSet.cpp.

References m_infoProperties.

Referenced by getPrototype().

+ Here is the caller graph for this function:

◆ ~WDataSet()

virtual WDataSet::~WDataSet ( )
inlinevirtual

Since WDataSet is a base class and thus should be polymorphic we add virtual destructor.

Definition at line 72 of file WDataSet.h.

Member Function Documentation

◆ getDescription()

const std::string WDataSet::getDescription ( ) const
virtual

◆ getFilename()

std::string WDataSet::getFilename ( ) const

Get the name of the file that this data set stems from.

Returns
the filename.

Definition at line 64 of file WDataSet.cpp.

References m_filename.

Referenced by getFileName().

+ Here is the caller graph for this function:

◆ getFileName()

std::string WDataSet::getFileName ( ) const

Get the name of the file that this data set stems from.

Returns
the filename.
Deprecated:
use getFilename instead

Definition at line 53 of file WDataSet.cpp.

References getFilename().

+ Here is the call graph for this function:

◆ getInformationProperties()

std::shared_ptr< WProperties > WDataSet::getInformationProperties ( ) const

Return a pointer to the information properties object of the dataset.

The dataset intends these properties to not be modified.

Returns
the properties.

Definition at line 109 of file WDataSet.cpp.

References m_infoProperties.

◆ getName()

const std::string WDataSet::getName ( ) const
virtual

◆ getProperties()

std::shared_ptr< WProperties > WDataSet::getProperties ( ) const

Return a pointer to the properties object of the dataset.

Add all the modifiable settings here. This allows the user to modify several properties of a dataset.

Returns
the properties.

Definition at line 104 of file WDataSet.cpp.

References m_properties.

◆ getPrototype()

std::shared_ptr< WPrototyped > WDataSet::getPrototype ( )
static

Returns a prototype instantiated with the true type of the deriving class.

Returns
the prototype.

Definition at line 89 of file WDataSet.cpp.

References m_prototype, and WDataSet().

+ Here is the call graph for this function:

◆ getTexture()

osg::ref_ptr< WDataTexture3D > WDataSet::getTexture ( ) const
virtual

Returns the texture- representation of the dataset.

May throw an exception if no texture is available.

Returns
The texture.
Deprecated:

Reimplemented in WDataSetSingle.

Definition at line 74 of file WDataSet.cpp.

◆ isTexture()

bool WDataSet::isTexture ( ) const
virtual

Determines whether this dataset can be used as a texture.

Returns
true if usable as texture.

Reimplemented in WEEG, WDataSetVector, WDataSetSphericalHarmonics, WDataSetSingle, WDataSetPoints, WDataSetFiberVector, and WDataSetFibers.

Definition at line 69 of file WDataSet.cpp.

◆ isVectorDataSet()

std::shared_ptr< WDataSetVector > WDataSet::isVectorDataSet ( )
virtual

Checks if this dataset is a vector dataset.

Returns
Returns a nonempty shared_ptr to it if it is a vector dataset, otherwise the pointer is empty!

Reimplemented in WDataSetVector.

Definition at line 99 of file WDataSet.cpp.

◆ setFilename()

void WDataSet::setFilename ( const std::string  filename)

Set the name of the file that this data set stems from.

Parameters
filenamethe string representing the name

Definition at line 58 of file WDataSet.cpp.

References m_filename.

Referenced by setFileName(), WDataSetFiberVector::WDataSetFiberVector(), and WEEG2::WEEG2().

+ Here is the caller graph for this function:

◆ setFileName()

void WDataSet::setFileName ( const std::string  filename)

Set the name of the file that this data set stems from.

Parameters
filenamethe string representing the name
Deprecated:
use setFilename instead

Definition at line 48 of file WDataSet.cpp.

References setFilename().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_filename

std::string WDataSet::m_filename
private

Name of the file this data set was loaded from.

This information may allow hollowing data sets later. DataSets that were not loaded from a file should have the empty string stored here.

Definition at line 189 of file WDataSet.h.

Referenced by getFilename(), and setFilename().

◆ m_infoProperties

std::shared_ptr< WProperties > WDataSet::m_infoProperties
protected

The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION".

It is useful to define some property to only be of informational nature. The GUI does not modify them. As it is a WProperties instance, you can use it the same way as m_properties.

Definition at line 181 of file WDataSet.h.

Referenced by getInformationProperties(), WDataSetFibers::init(), WDataSet(), WDataSetSingle::WDataSetSingle(), and WEEG2::WEEG2().

◆ m_properties

std::shared_ptr< WProperties > WDataSet::m_properties
protected

The property object for the dataset.

Definition at line 174 of file WDataSet.h.

Referenced by getProperties(), and WDataSetFibers::init().

◆ m_prototype

std::shared_ptr< WPrototyped > WDataSet::m_prototype = std::shared_ptr< WPrototyped >()
staticprotected

The prototype as singleton.

Definition at line 169 of file WDataSet.h.

Referenced by getPrototype().


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