hops
Public Member Functions | List of all members
HighFive::NodeTraits< Derivate > Class Template Reference

NodeTraits: Base class for Group and File. More...

#include <H5_definitions.hpp>

Collaboration diagram for HighFive::NodeTraits< Derivate >:
Collaboration graph

Public Member Functions

DataSet createDataSet (const std::string &dataset_name, const DataSpace &space, const DataType &type, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 createDataSet Create a new dataset in the current file of datatype type and of size space More...
 
template<typename Type >
DataSet createDataSet (const std::string &dataset_name, const DataSpace &space, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 createDataSet create a new dataset in the current file with a size specified by space More...
 
template<typename T >
DataSet createDataSet (const std::string &dataset_name, const T &data, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 createDataSet create a new dataset in the current file and write to it, inferring the DataSpace from the data. More...
 
template<std::size_t N>
DataSet createDataSet (const std::string &dataset_name, const FixedLenStringArray< N > &data, const DataSetCreateProps &createProps=DataSetCreateProps(), const DataSetAccessProps &accessProps=DataSetAccessProps())
 
DataSet getDataSet (const std::string &dataset_name, const DataSetAccessProps &accessProps=DataSetAccessProps()) const
 get an existing dataset in the current file More...
 
Group createGroup (const std::string &group_name, bool parents=true)
 create a new group, and eventually intermediate groups More...
 
Group getGroup (const std::string &group_name) const
 open an existing group with the name group_name More...
 
size_t getNumberObjects () const
 return the number of leaf objects of the node / group More...
 
std::string getObjectName (size_t index) const
 return the name of the object with the given index More...
 
std::string getPath () const
 return the path to the current object More...
 
bool rename (const std::string &src_path, const std::string &dest_path, bool parents=true) const
 moves an object and its content within an HDF5 file. More...
 
std::vector< std::stringlistObjectNames () const
 list all leaf objects name of the node / group More...
 
bool exist (const std::string &node_name) const
 check a dataset or group exists in the current node / group More...
 
void unlink (const std::string &node_name) const
 unlink the given dataset or group More...
 
LinkType getLinkType (const std::string &node_name) const
 Returns the kind of link of the given name (soft, hard...) More...
 
ObjectType getObjectType (const std::string &node_name) const
 A shorthand to get the kind of object pointed to (group, dataset, type...) More...
 

Detailed Description

template<typename Derivate>
class HighFive::NodeTraits< Derivate >

NodeTraits: Base class for Group and File.

Member Function Documentation

◆ createDataSet() [1/4]

template<typename Derivate >
template<typename Type >
DataSet HighFive::NodeTraits< Derivate >::createDataSet ( const std::string dataset_name,
const DataSpace space,
const DataSetCreateProps createProps = DataSetCreateProps(),
const DataSetAccessProps accessProps = DataSetAccessProps() 
)
inline

createDataSet create a new dataset in the current file with a size specified by space

Parameters
dataset_nameidentifier of the dataset
spaceAssociated DataSpace, see DataSpace for more information
createPropsA property list with data set creation properties
accessPropsA property list with data set access properties
Returns
DataSet Object

◆ createDataSet() [2/4]

template<typename Derivate >
DataSet HighFive::NodeTraits< Derivate >::createDataSet ( const std::string dataset_name,
const DataSpace space,
const DataType type,
const DataSetCreateProps createProps = DataSetCreateProps(),
const DataSetAccessProps accessProps = DataSetAccessProps() 
)
inline

createDataSet Create a new dataset in the current file of datatype type and of size space

Parameters
dataset_nameidentifier of the dataset
spaceAssociated DataSpace, see DataSpace for more informations
typeType of Data
createPropsA property list with data set creation properties
accessPropsA property list with data set access properties
Returns
DataSet Object

◆ createDataSet() [3/4]

template<typename Derivate >
template<std::size_t N>
DataSet HighFive::NodeTraits< Derivate >::createDataSet ( const std::string dataset_name,
const FixedLenStringArray< N > &  data,
const DataSetCreateProps createProps = DataSetCreateProps(),
const DataSetAccessProps accessProps = DataSetAccessProps() 
)
inline

◆ createDataSet() [4/4]

template<typename Derivate >
template<typename T >
DataSet HighFive::NodeTraits< Derivate >::createDataSet ( const std::string dataset_name,
const T &  data,
const DataSetCreateProps createProps = DataSetCreateProps(),
const DataSetAccessProps accessProps = DataSetAccessProps() 
)
inline

createDataSet create a new dataset in the current file and write to it, inferring the DataSpace from the data.

Parameters
dataset_nameidentifier of the dataset
dataAssociated data, must support DataSpace::From, see DataSpace for more information
createPropsA property list with data set creation properties
accessPropsA property list with data set access properties
Returns
DataSet Object

◆ createGroup()

template<typename Derivate >
Group HighFive::NodeTraits< Derivate >::createGroup ( const std::string group_name,
bool  parents = true 
)
inline

create a new group, and eventually intermediate groups

Parameters
group_name
parentsWhether it shall create intermediate groups if necessary. Default: true
Returns
the group object

◆ exist()

template<typename Derivate >
bool HighFive::NodeTraits< Derivate >::exist ( const std::string node_name) const
inline

check a dataset or group exists in the current node / group

Parameters
node_namedataset/group name to check
Returns
true if a dataset/group with the associated name exists, or false

◆ getDataSet()

template<typename Derivate >
DataSet HighFive::NodeTraits< Derivate >::getDataSet ( const std::string dataset_name,
const DataSetAccessProps accessProps = DataSetAccessProps() 
) const
inline

get an existing dataset in the current file

Parameters
dataset_name
accessPropsproperty list to configure dataset chunk cache
Returns
return the named dataset, or throw exception if not found

◆ getGroup()

template<typename Derivate >
Group HighFive::NodeTraits< Derivate >::getGroup ( const std::string group_name) const
inline

open an existing group with the name group_name

Parameters
group_name
Returns
the group object

◆ getLinkType()

template<typename Derivate >
LinkType HighFive::NodeTraits< Derivate >::getLinkType ( const std::string node_name) const
inline

Returns the kind of link of the given name (soft, hard...)

Parameters
node_nameThe entry to check, path relative to the current group

◆ getNumberObjects()

template<typename Derivate >
size_t HighFive::NodeTraits< Derivate >::getNumberObjects
inline

return the number of leaf objects of the node / group

Returns
number of leaf objects

◆ getObjectName()

template<typename Derivate >
std::string HighFive::NodeTraits< Derivate >::getObjectName ( size_t  index) const
inline

return the name of the object with the given index

Returns
the name of the object

◆ getObjectType()

template<typename Derivate >
ObjectType HighFive::NodeTraits< Derivate >::getObjectType ( const std::string node_name) const
inline

A shorthand to get the kind of object pointed to (group, dataset, type...)

Parameters
node_nameThe entry to check, path relative to the current group

◆ getPath()

template<typename Derivate >
std::string HighFive::NodeTraits< Derivate >::getPath
inline

return the path to the current object

Returns
the path to the object

◆ listObjectNames()

template<typename Derivate >
std::vector< std::string > HighFive::NodeTraits< Derivate >::listObjectNames
inline

list all leaf objects name of the node / group

Returns
number of leaf objects

◆ rename()

template<typename Derivate >
bool HighFive::NodeTraits< Derivate >::rename ( const std::string src_path,
const std::string dest_path,
bool  parents = true 
) const
inline

moves an object and its content within an HDF5 file.

Parameters
src_pathrelative path of the object to current File/Group
dest_pathnew relative path of the object to current File/Group
parentsif true necessary intermediate groups are created. Default: true
Returns
boolean that is true if the move was successful

◆ unlink()

template<typename Derivate >
void HighFive::NodeTraits< Derivate >::unlink ( const std::string node_name) const
inline

unlink the given dataset or group

Parameters
node_namedataset/group name to unlink

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