Utopia  2
Framework for studying models of complex & adaptive systems.
Namespaces | Enumerations | Functions
hdfutilities.hh File Reference

This file provides metafunctions for automatically determining the nature of a C/C++ types at compile time (container or not, string or not, fixed-size array ), and getting the base type of pointer and cv-qualified types. More...

#include <array>
#include <cmath>
#include <iostream>
#include <string>
#include <string_view>
#include <type_traits>
#include <vector>
#include <hdf5.h>
#include <hdf5_hl.h>
#include <utopia/core/type_traits.hh>
Include dependency graph for hdfutilities.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Utopia
 
 Utopia::DataIO
 

Enumerations

enum class  Utopia::DataIO::HDFCategory {
  Utopia::DataIO::file = H5I_FILE , Utopia::DataIO::group = H5I_GROUP , Utopia::DataIO::datatype = H5I_DATATYPE , Utopia::DataIO::dataspace = H5I_DATASPACE ,
  Utopia::DataIO::dataset = H5I_DATASET , Utopia::DataIO::attribute = H5I_ATTR
}
 Enumerate the different HDF5 object types for use in HDFObject class. More...
 

Functions

bool Utopia::DataIO::check_validity (htri_t valid, const std::string_view object_name)
 Check for validity of a hdf5 htri_t type or similar. More...
 
htri_t Utopia::DataIO::path_exists (hid_t loc_id, std::string path, hid_t link_property_list=H5P_DEFAULT)
 Checks iteratively if each segment of a path exists. More...
 
auto Utopia::DataIO::path_is_valid (hid_t id, std::string path)
 Check if the path given relative to the object identified by 'id' exists and points to a valid hdf5 object. More...
 
template<HDFCategory category>
std::string Utopia::DataIO::category_to_string ()
 Turn category enum into a string that names it. More...
 
template<class Object >
std::string Utopia::DataIO::generate_object_name (const Object &object)
 Use category and path variable of object to make a string that identifies the object it is applied to. More...
 
template<typename Object >
hid_t Utopia::DataIO::open_dataspace (Object &&object)
 Depending on object category, opens a dataset or attribute dataspace. More...
 
template<typename Object >
hid_t Utopia::DataIO::open_type (Object &&object)
 Depending on object category, invokes H5Dget_type or H5Aget_type. More...
 

Detailed Description

This file provides metafunctions for automatically determining the nature of a C/C++ types at compile time (container or not, string or not, fixed-size array ), and getting the base type of pointer and cv-qualified types.