CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
CNORXZ::hdf5::Dataset Class Reference

#include <h5_dataset.h>

Inheritance diagram for CNORXZ::hdf5::Dataset:
CNORXZ::hdf5::ContentBase CNORXZ::hdf5::SDataset< T >

Public Member Functions

 DEFAULT_MEMBERS (Dataset)
 
 Dataset (const String &name, const ContentBase *_parent)
 
 ~Dataset ()
 
virtual ContentType type () const override final
 
virtual bool ro () const override final
 
virtual Datasetopen () override final
 
virtual Datasetclose () override final
 
virtual String path () const override final
 
virtual String filename () const override final
 
virtual bool exists () const override final
 
Datasetinit (const RangePtr &dataRange, hid_t type)
 
template<typename T >
Datasetinit (const ArrayBase< T > &data)
 
const RangePtrdataRange () const
 
- Public Member Functions inherited from CNORXZ::hdf5::ContentBase
 DEFAULT_MEMBERS (ContentBase)
 
 ContentBase (const String &_name, const ContentBase *_parent=nullptr)
 
virtual ~ContentBase ()=default
 
const Stringname () const
 
const ContentBaseparent () const
 
hid_t id () const
 
bool isOpen () const
 
template<typename T >
ContentBaseaddAttribute (const String &name, const T &value)
 
DType getAttribute (const String &name) const
 
bool attributeExists (const String &name) const
 
std::map< String, DTypegetAttributes () const
 
std::map< String, DTypegetRecursiveAttributes () const
 

Protected Attributes

RangePtr mDataRange
 
hid_t mType
 
hid_t mFilespace
 
- Protected Attributes inherited from CNORXZ::hdf5::ContentBase
String mName
 
const ContentBasemParent = nullptr
 
hid_t mId = 0
 

Detailed Description


Class to handle hdf5 datasets.

Definition at line 25 of file h5_dataset.h.

Constructor & Destructor Documentation

◆ Dataset()

CNORXZ::hdf5::Dataset::Dataset ( const String & name,
const ContentBase * _parent )

Construct the class.

Parameters
nameDataset name.
_parentParent content object.

Definition at line 18 of file h5_dataset.cc.

◆ ~Dataset()

CNORXZ::hdf5::Dataset::~Dataset ( )

Destructor. Release all involved hdf5 ids.

Definition at line 26 of file h5_dataset.cc.

Member Function Documentation

◆ close()

Dataset & CNORXZ::hdf5::Dataset::close ( )
finaloverridevirtual

Close object.

Returns
Reference to this object.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 61 of file h5_dataset.cc.

◆ dataRange()

const RangePtr & CNORXZ::hdf5::Dataset::dataRange ( ) const

Get the data range.

Returns
Pointer to the range.

Definition at line 108 of file h5_dataset.cc.

◆ DEFAULT_MEMBERS()

CNORXZ::hdf5::Dataset::DEFAULT_MEMBERS ( Dataset )

Default constructors and assignments.

◆ exists()

bool CNORXZ::hdf5::Dataset::exists ( ) const
finaloverridevirtual

Check if group exists in the parent object.

Returns
True if object exists, else false.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 82 of file h5_dataset.cc.

◆ filename()

String CNORXZ::hdf5::Dataset::filename ( ) const
finaloverridevirtual

Get the file name.

Returns
Name of the hdf5 file this object is stored in.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 77 of file h5_dataset.cc.

◆ init() [1/2]

template<typename T >
Dataset & CNORXZ::hdf5::Dataset::init ( const ArrayBase< T > & data)

Initalize the dataset.

Parameters
dataArray containing the dataset.

Definition at line 22 of file h5_dataset.cc.h.

◆ init() [2/2]

Dataset & CNORXZ::hdf5::Dataset::init ( const RangePtr & dataRange,
hid_t type )

Initalize the dataset.

Parameters
dataRangeA potentially multi-dimensional range characterizing the dataset.
typeData type id.

Definition at line 87 of file h5_dataset.cc.

◆ open()

Dataset & CNORXZ::hdf5::Dataset::open ( )
finaloverridevirtual

Open object.

Returns
Reference to this object.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 41 of file h5_dataset.cc.

◆ path()

String CNORXZ::hdf5::Dataset::path ( ) const
finaloverridevirtual

Get object path.

Returns
Absolute hdf5 file internal path of this object.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 72 of file h5_dataset.cc.

◆ ro()

bool CNORXZ::hdf5::Dataset::ro ( ) const
finaloverridevirtual

Check if in read-only mode

Returns
True if read-only else false.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 36 of file h5_dataset.cc.

◆ type()

ContentType CNORXZ::hdf5::Dataset::type ( ) const
finaloverridevirtual

Get the content type.

Returns
Content type.

Implements CNORXZ::hdf5::ContentBase.

Definition at line 31 of file h5_dataset.cc.

Member Data Documentation

◆ mDataRange

RangePtr CNORXZ::hdf5::Dataset::mDataRange
protected

The data range.

Definition at line 65 of file h5_dataset.h.

◆ mFilespace

hid_t CNORXZ::hdf5::Dataset::mFilespace
protected

The hdf5 file space identifier.

Definition at line 67 of file h5_dataset.h.

◆ mType

hid_t CNORXZ::hdf5::Dataset::mType
protected

The data type identifier.

Definition at line 66 of file h5_dataset.h.


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