3 #ifndef ROBOWFLEX_IO_HDF5_
4 #define ROBOWFLEX_IO_HDF5_
10 #include <boost/variant.hpp>
56 const void *getData()
const;
94 typedef boost::make_recursive_variant<
121 template <
typename T>
130 template <
typename T>
#define ROBOWFLEX_CLASS_FORWARD(C)
Macro that forward declares a class and defines two shared ptrs types:
A shared pointer wrapper for robowflex::IO::HDF5Data.
A container class for HDF5 DataSets loaded by an HDF5File.
const hsize_t * dims_
Dimensions of the dataset (rank_ dimensions)
const void * data_
Data itself.
const H5::DataSet dataset_
Dataset being read from.
const int rank_
Rank of the dataset.
const H5T_class_t type_
Type of the dataset.
const H5::DataSpace space_
Size of the dataset.
An HDF5 File loaded into memory.
boost::make_recursive_variant< HDF5DataPtr, std::map< std::string, boost::recursive_variant_ > >::type Node
A recursive map that has a dictionary-like structure to store HDF5 datasets.
Node data_
A recursive map of loaded data.
std::vector< std::string > listObjects(const T &location) const
List the objects at the HDF5 location.
void loadData(Node &node, const T &location, const std::string &name)
Loads the data in the object name at the HDF5 location. Recursive.
const std::vector< std::vector< std::string > > getKeys() const
Gets all valid keys in the file.
const H5::H5File file_
The loaded HDF5 file.
HDF5File(const std::string &filename)
Constructor. Opens filename.
std::map< std::string, Node > NodeMap
A specific map in the recursive set.
const HDF5DataPtr getData(const std::vector< std::string > &keys) const
Get the dataset under the set of keys. Each key is applied successively.
Main namespace. Contains all library classes and functions.