hops
Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
HighFive::DataSet Class Reference

Class representing a dataset. More...

#include <H5DataSet.hpp>

Inheritance diagram for HighFive::DataSet:
Inheritance graph
Collaboration diagram for HighFive::DataSet:
Collaboration graph

Public Member Functions

std::string getPath () const
 return the path to the current dataset More...
 
uint64_t getStorageSize () const
 getStorageSize More...
 
uint64_t getOffset () const
 getOffset More...
 
DataType getDataType () const
 getDataType More...
 
DataSpace getSpace () const
 getSpace More...
 
DataSpace getMemSpace () const
 getMemSpace More...
 
void resize (const std::vector< size_t > &dims)
 Change the size of the dataset. More...
 
std::vector< size_t > getDimensions () const
 Get the dimensions of the whole DataSet. This is a shorthand for getSpace().getDimensions() More...
 
size_t getElementCount () const
 Get the total number of elements in the current dataset. E.g. 2x2x2 matrix has size 8. This is a shorthand for getSpace().getTotalCount() More...
 
- Public Member Functions inherited from HighFive::Object
 ~Object ()
 
bool isValid () const noexcept
 isValid More...
 
hid_t getId () const noexcept
 getId More...
 
ObjectInfo getInfo () const
 Retrieve several infos about the current object (address, dates, etc) More...
 
ObjectType getType () const
 Gets the fundamental type of the object (dataset, group, etc) More...
 
- Public Member Functions inherited from HighFive::SliceTraits< DataSet >
Selection select (const std::vector< size_t > &offset, const std::vector< size_t > &count, const std::vector< size_t > &stride=std::vector< size_t >()) const
 Select a region in the current Slice/Dataset of count points at offset separated by stride. If strides are not provided they will default to 1 in all dimensions. More...
 
Selection select (const std::vector< size_t > &columns) const
 Select a set of columns in the last dimension of this dataset. More...
 
Selection select (const ElementSet &elements) const
 Select a region in the current Slice/Dataset out of a list of elements. More...
 
void read (T &array) const
 
void read (T *array, const DataType &dtype=DataType()) const
 
void write (const T &buffer)
 
void write_raw (const T *buffer, const DataType &dtype=DataType())
 
- Public Member Functions inherited from HighFive::AnnotateTraits< DataSet >
Attribute createAttribute (const std::string &attribute_name, const DataSpace &space, const DataType &type)
 create a new attribute with the name attribute_name More...
 
Attribute createAttribute (const std::string &attribute_name, const DataSpace &space)
 createAttribute create a new attribute on the current dataset with size specified by space More...
 
Attribute createAttribute (const std::string &attribute_name, const T &data)
 createAttribute create a new attribute on the current dataset and write to it, inferring the DataSpace from data. More...
 
void deleteAttribute (const std::string &attribute_name)
 deleteAttribute let you delete an attribute by its name. More...
 
Attribute getAttribute (const std::string &attribute_name) const
 open an existing attribute with the name attribute_name More...
 
size_t getNumberAttributes () const
 return the number of attributes of the node / group More...
 
std::vector< std::stringlistAttributeNames () const
 list all attribute name of the node / group More...
 
bool hasAttribute (const std::string &attr_name) const
 checks an attribute exists More...
 

Static Public Attributes

const static ObjectType type = ObjectType::Dataset
 

Protected Member Functions

 DataSet (Object &&o) noexcept
 
 Object ()
 
 Object (const Object &other)
 
 Object (Object &&other) noexcept
 
 Object (hid_t)
 
- Protected Member Functions inherited from HighFive::Object
 Object ()
 
 Object (const Object &other)
 
 Object (Object &&other) noexcept
 
 Object (hid_t)
 
Objectoperator= (const Object &other)
 

Friends

class Reference
 
template<typename Derivate >
class NodeTraits
 

Additional Inherited Members

- Protected Attributes inherited from HighFive::Object
hid_t _hid
 

Detailed Description

Class representing a dataset.

Constructor & Destructor Documentation

◆ DataSet()

HighFive::DataSet::DataSet ( Object &&  o)
inlineprotectednoexcept

Member Function Documentation

◆ getDataType()

DataType HighFive::DataSet::getDataType ( ) const
inline

getDataType

Returns
return the datatype associated with this dataset

◆ getDimensions()

std::vector<size_t> HighFive::DataSet::getDimensions ( ) const
inline

Get the dimensions of the whole DataSet. This is a shorthand for getSpace().getDimensions()

Returns
The shape of the current HighFive::DataSet

◆ getElementCount()

size_t HighFive::DataSet::getElementCount ( ) const
inline

Get the total number of elements in the current dataset. E.g. 2x2x2 matrix has size 8. This is a shorthand for getSpace().getTotalCount()

Returns
The shape of the current HighFive::DataSet

◆ getMemSpace()

DataSpace HighFive::DataSet::getMemSpace ( ) const
inline

getMemSpace

Returns
same than getSpace for DataSet, compatibility with Selection class

◆ getOffset()

uint64_t HighFive::DataSet::getOffset ( ) const
inline

getOffset

Returns
returns DataSet address in file

◆ getPath()

std::string HighFive::DataSet::getPath ( ) const
inline

return the path to the current dataset

Returns
the path to the dataset

◆ getSpace()

DataSpace HighFive::DataSet::getSpace ( ) const
inline

getSpace

Returns
return the dataspace associated with this dataset

◆ getStorageSize()

uint64_t HighFive::DataSet::getStorageSize ( ) const
inline

getStorageSize

Returns
returns the amount of storage allocated for a dataset.

◆ Object() [1/4]

HighFive::Object::Object
inlineprotected

◆ Object() [2/4]

HighFive::Object::Object
inlineprotected

◆ Object() [3/4]

HighFive::Object::Object
inlineexplicitprotected

◆ Object() [4/4]

HighFive::Object::Object
inlineprotectednoexcept

◆ resize()

void HighFive::DataSet::resize ( const std::vector< size_t > &  dims)
inline

Change the size of the dataset.

This requires that the dataset was created with chunking, and you would generally want to have set a larger maxdims setting

Parameters
dimsNew size of the dataset

Friends And Related Function Documentation

◆ NodeTraits

template<typename Derivate >
friend class NodeTraits
friend

◆ Reference

friend class Reference
friend

Member Data Documentation

◆ type

const static ObjectType HighFive::DataSet::type = ObjectType::Dataset
static

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