ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
hdps::Dataset< DatasetType > Class Template Reference

#include <Dataset.h>

Inheritance diagram for hdps::Dataset< DatasetType >:
hdps::DatasetPrivate

Public Member Functions

 Dataset (DatasetType *dataset=nullptr)
 
 Dataset (DatasetType &dataset)
 
 Dataset (const Dataset< DatasetType > &other)
 
template<typename OtherDatasetType >
 Dataset (const Dataset< OtherDatasetType > &other)
 
DatasetType & operator* ()
 
const DatasetType & operator* () const
 
Dataset< DatasetType > & operator= (const Dataset< DatasetType > &rhs)
 
DatasetType * operator-> ()
 
const DatasetType * operator-> () const
 
DatasetType * operator() () const
 
template<typename TargetSetType >
TargetSetType * get () const
 
DatasetType * get () const
 
bool isValid () const
 
- Public Member Functions inherited from hdps::DatasetPrivate
QString getDatasetId () const
 
void setDatasetId (const QString &datasetId)
 
DatasetImplgetDataset ()
 
const DatasetImplgetDataset () const
 
void setDataset (DatasetImpl *dataset)
 
void reset ()
 
void connectNotify (const QMetaMethod &signal) override
 
void disconnectNotify (const QMetaMethod &signal) override
 

Additional Inherited Members

- Signals inherited from hdps::DatasetPrivate
void changed (DatasetImpl *dataset)
 
void aboutToBeRemoved ()
 
void removed (const QString &datasetId)
 
void dataChanged ()
 
void dataDimensionsChanged ()
 
void dataSelectionChanged ()
 
void guiNameChanged ()
 
void childAdded (const Dataset< DatasetImpl > &childDataset)
 
void childRemoved (const QString &childDatasetGuid)
 
- Protected Member Functions inherited from hdps::DatasetPrivate
 DatasetPrivate ()
 
 DatasetPrivate (const DatasetPrivate &other)
 
DatasetPrivateoperator= (const DatasetPrivate &other)=delete
 
 ~DatasetPrivate () override=default
 
void registerDatasetEvents ()
 

Detailed Description

template<typename DatasetType>
class hdps::Dataset< DatasetType >

Smart dataset class

Smart pointer for datasets

This smart pointer aims to make dataset access through pointers more secure. It internally manages a pointer throughout the lifetime of a dataset (resets the datasets to nullptr when a dataset is removed etc.). Access is through standard arrow and dereference operators. It is advised to always check for pointer validity before use of the pointer. In addition, it emits data signals when data is renamed, removed etc.

Author
T. Kroes

Only dataset reference template classes have access to protected members

Constructor & Destructor Documentation

◆ Dataset() [1/4]

template<typename DatasetType >
hdps::Dataset< DatasetType >::Dataset ( DatasetType *  dataset = nullptr)
inline

(Default) constructor

Parameters
datasetPointer to dataset (if any)

◆ Dataset() [2/4]

template<typename DatasetType >
hdps::Dataset< DatasetType >::Dataset ( DatasetType &  dataset)
inline

Construct from dataset reference

Parameters
datasetReference to dataset

◆ Dataset() [3/4]

template<typename DatasetType >
hdps::Dataset< DatasetType >::Dataset ( const Dataset< DatasetType > &  other)
inline

Copy constructor

Parameters
otherSmart pointer to copy from

◆ Dataset() [4/4]

template<typename DatasetType >
template<typename OtherDatasetType >
hdps::Dataset< DatasetType >::Dataset ( const Dataset< OtherDatasetType > &  other)
inline

Templated copy constructor

Parameters
otherSmart pointer to copy from

Member Function Documentation

◆ get() [1/2]

template<typename DatasetType >
template<typename TargetSetType >
TargetSetType * hdps::Dataset< DatasetType >::get ( ) const
inline

Get pointer of TargetSetType to dataset

Returns
Pointer of TargetSetType to dataset (if any, maybe nullptr)

◆ get() [2/2]

template<typename DatasetType >
DatasetType * hdps::Dataset< DatasetType >::get ( ) const
inline

Get pointer to dataset

Returns
Pointer to dataset (if any, maybe nullptr)

◆ isValid()

template<typename DatasetType >
bool hdps::Dataset< DatasetType >::isValid ( ) const
inline

Returns smart pointer validity

Returns
Boolean determining whether the dataset pointer is valid (if the dataset actually exists)

◆ operator()()

template<typename DatasetType >
DatasetType * hdps::Dataset< DatasetType >::operator() ( ) const
inline

Parenthesis operator

Returns
Pointer to dataset (if any, maybe nullptr)

◆ operator*() [1/2]

template<typename DatasetType >
DatasetType & hdps::Dataset< DatasetType >::operator* ( )
inline

Dereference operator

Returns
Reference to dataset

◆ operator*() [2/2]

template<typename DatasetType >
const DatasetType & hdps::Dataset< DatasetType >::operator* ( ) const
inline

Const dereference operator

Returns
Reference to dataset

◆ operator->() [1/2]

template<typename DatasetType >
DatasetType * hdps::Dataset< DatasetType >::operator-> ( )
inline

Overloaded arrow operator

Returns
Pointer to dataset (if any, maybe nullptr)

◆ operator->() [2/2]

template<typename DatasetType >
const DatasetType * hdps::Dataset< DatasetType >::operator-> ( ) const
inline

Const overloaded arrow operator

Returns
Const pointer to dataset (if any, maybe nullptr)

◆ operator=()

template<typename DatasetType >
Dataset< DatasetType > & hdps::Dataset< DatasetType >::operator= ( const Dataset< DatasetType > &  rhs)
inline

Assignment operator

Parameters
rhsRight hand side operator

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