Utopia 2
Framework for studying models of complex & adaptive systems.
Loading...
Searching...
No Matches
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

namespace  Utopia
 
namespace  Utopia::DataIO
 

Enumerations

enum struct  Utopia::DataIO::HDFCategory {
  Utopia::DataIO::HDFCategory::file = H5I_FILE , Utopia::DataIO::HDFCategory::group = H5I_GROUP , Utopia::DataIO::HDFCategory::datatype = H5I_DATATYPE , Utopia::DataIO::HDFCategory::dataspace = H5I_DATASPACE ,
  Utopia::DataIO::HDFCategory::dataset = H5I_DATASET , Utopia::DataIO::HDFCategory::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.
 
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.
 
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.
 
template<HDFCategory category>
std::string Utopia::DataIO::category_to_string ()
 Turn category enum into a string that names it.
 
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.
 
template<typename Object >
hid_t Utopia::DataIO::open_dataspace (Object &&object)
 Depending on object category, opens a dataset or attribute dataspace.
 
template<typename Object >
hid_t Utopia::DataIO::open_type (Object &&object)
 Depending on object category, invokes H5Dget_type or H5Aget_type.
 

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.