h5cpp  0.5.2
A modern C++ wrapper for the HDF5 C library
hdf5::dataspace::Dataspace Class Reference

dataspace base class

#include <dataspace.hpp>

Inheritance diagram for hdf5::dataspace::Dataspace:
Collaboration diagram for hdf5::dataspace::Dataspace:

Public Member Functions

virtual ~Dataspace ()
 destructor More...
 
 Dataspace ()
 default constructor More...
 
 Dataspace (ObjectHandle &&handle)
 constructor More...
 
 Dataspace (Dataspace &&type)=default
 move constructor More...
 
 Dataspace (const Dataspace &space)
 copy constructor More...
 
Dataspaceoperator= (const Dataspace &space)
 copy assignment More...
 
virtual hssize_t size () const
 number of elements in the dataspace More...
 
 operator hid_t () const
 allows explicit conversion to hid_t More...
 
Type type () const
 get the type of the dataspace More...
 
bool is_valid () const
 check validity of the dataspace More...
 

Public Attributes

SelectionManager selection
 access to selection manager More...
 

Protected Member Functions

 Dataspace (Type type)
 

Constructor & Destructor Documentation

◆ ~Dataspace()

virtual hdf5::dataspace::Dataspace::~Dataspace ( )
virtual

Has to be virtual due to inheritance

◆ Dataspace() [1/5]

hdf5::dataspace::Dataspace::Dataspace ( )

The default constructor will leave the dataspace as an invalid HDF5 object. Default construction is however necessary for using a Dataspace with certain C++ STL containers.

See also
is_valid()

◆ Dataspace() [2/5]

hdf5::dataspace::Dataspace::Dataspace ( ObjectHandle &&  handle)

Constructs a dataspace object from an rvalue reference to an HDF5 handle. The class will take full ownership of the handle.

Parameters
handlervalue reference to the handle

◆ Dataspace() [3/5]

hdf5::dataspace::Dataspace::Dataspace ( Dataspace &&  type)
default

Use default implementation here.

◆ Dataspace() [4/5]

hdf5::dataspace::Dataspace::Dataspace ( const Dataspace space)

◆ Dataspace() [5/5]

hdf5::dataspace::Dataspace::Dataspace ( Type  type)
protected

Member Function Documentation

◆ is_valid()

bool hdf5::dataspace::Dataspace::is_valid ( ) const

Returns true if the dataspace is a valid HDF5 object. This member function should return true in most cases. However, in cases that the dataspace was

  • default constructed
  • or the close() method was called before

this function will return false.

Exceptions
std::runtime_errorin case of a failure
Returns
true if valid, false if invalid
See also
Dataspace()

◆ operator hid_t()

hdf5::dataspace::Dataspace::operator hid_t ( ) const
inlineexplicit

This function is mainly used by static_cast for explicit conversion to hid_t.

Dataspace space();
hid_t id = static_cast<hid_t>(space);
Dataspace()
default constructor

◆ operator=()

Dataspace& hdf5::dataspace::Dataspace::operator= ( const Dataspace space)

◆ size()

virtual hssize_t hdf5::dataspace::Dataspace::size ( ) const
virtual
Exceptions
std::runtime_errorin case of a failure

◆ type()

Type hdf5::dataspace::Dataspace::type ( ) const
Exceptions
std::runtime_errorin case of a failure

Member Data Documentation

◆ selection

SelectionManager hdf5::dataspace::Dataspace::selection

This public member provides access to the selection manager of the dataspace. See the SelectionManager documentation for interface details.

See also
SelectionManager

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