hdf5/VariantChannelIO.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef LVR2_IO_HDF5_VARIANTCHANNELIO_HPP
3 #define LVR2_IO_HDF5_VARIANTCHANNELIO_HPP
4 
5 #include <highfive/H5DataSet.hpp>
7 #include <highfive/H5File.hpp>
8 
9 // Object to store
12 
13 // Dependencies
14 #include "ChannelIO.hpp"
15 
16 namespace lvr2 {
17 
18 namespace hdf5features {
19 
54 struct ConstructType {
55 
56 };
57 
58 template<typename Derived = ConstructType>
60 public:
61 
62  template<typename ...Tp>
63  void save(std::string groupName, std::string datasetName, const VariantChannel<Tp...>& vchannel);
64 
65  template<typename ...Tp>
66  void save(HighFive::Group& group, std::string datasetName, const VariantChannel<Tp...>& vchannel);
67 
68  template<typename VariantChannelT>
69  boost::optional<VariantChannelT> load(std::string groupName, std::string datasetName);
70 
71  template<typename VariantChannelT>
72  boost::optional<VariantChannelT> load(HighFive::Group& group, std::string datasetName);
73 
74  template<typename VariantChannelT>
75  boost::optional<VariantChannelT> loadVariantChannel(std::string groupName, std::string datasetName);
76 
77 protected:
78 
79  template<typename VariantChannelT>
80  boost::optional<VariantChannelT> loadDynamic(HighFive::DataType dtype,
81  HighFive::Group& group,
82  std::string name);
83 
84  template<typename ...Tp>
85  void saveDynamic(HighFive::Group& group,
86  std::string datasetName,
87  const VariantChannel<Tp...>& vchannel
88  );
89 
90  Derived* m_file_access = static_cast<Derived*>(this);
92 };
93 
94 } // hdf5features
95 
99 template<typename BaseIO>
100 struct Hdf5Construct<hdf5features::VariantChannelIO, BaseIO> {
101 
102  // DEPS
104 
105  // add actual feature
106  using type = typename deps::template add_features<hdf5features::VariantChannelIO>::type;
107 };
108 
109 
110 
111 
112 // generator
113 
114 } // namespace lvr2
115 
116 #include "VariantChannelIO.tcc"
117 
118 #endif // LVR2_IO_HDF5_VARIANTCHANNELIO_HPP
VariantChannel.hpp
lvr2::hdf5features::VariantChannelIO::loadDynamic
boost::optional< VariantChannelT > loadDynamic(HighFive::DataType dtype, HighFive::Group &group, std::string name)
lvr2::hdf5features::VariantChannelIO::save
void save(std::string groupName, std::string datasetName, const VariantChannel< Tp... > &vchannel)
lvr2::Hdf5Construct::type
typename Derived::template add_features< Feature >::type type
Definition: HDF5FeatureBase.hpp:165
H5File.hpp
HighFive::DataType
HDF5 Data Type.
Definition: H5DataType.hpp:21
H5DataSet.hpp
H5DataSpace.hpp
lvr2::Hdf5Construct< hdf5features::VariantChannelIO, BaseIO >::type
typename deps::template add_features< hdf5features::VariantChannelIO >::type type
Definition: hdf5/VariantChannelIO.hpp:106
lvr2::hdf5features::ConstructType
Definition: hdf5/VariantChannelIO.hpp:54
lvr2::hdf5features::VariantChannelIO
Hdf5IO Feature for handling VariantChannel related IO.
Definition: hdf5/VariantChannelIO.hpp:59
HighFive::Group
Definition: H5Group.hpp:20
lvr2::hdf5features::VariantChannelIO::m_file_access
Derived * m_file_access
Definition: hdf5/VariantChannelIO.hpp:90
lvr2::hdf5features::VariantChannelIO::m_channel_io
ChannelIO< Derived > * m_channel_io
Definition: hdf5/VariantChannelIO.hpp:91
ChannelIO.hpp
HDF5FeatureBase.hpp
lvr2::hdf5features::VariantChannelIO::saveDynamic
void saveDynamic(HighFive::Group &group, std::string datasetName, const VariantChannel< Tp... > &vchannel)
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::VariantChannel
Definition: VariantChannel.hpp:18
lvr2::hdf5features::VariantChannelIO::load
boost::optional< VariantChannelT > load(std::string groupName, std::string datasetName)
lvr2::Hdf5Construct
Helper class how to construct a IO feature with its dependencies.
Definition: HDF5FeatureBase.hpp:27
lvr2::VariantChannelIO
Hdf5IO Feature for handling VariantChannel related IO.
Definition: descriptions/VariantChannelIO.hpp:54
lvr2::Hdf5Construct< hdf5features::VariantChannelIO, BaseIO >::deps
typename Hdf5Construct< hdf5features::ChannelIO, BaseIO >::type deps
Definition: hdf5/VariantChannelIO.hpp:103
lvr2::hdf5features::VariantChannelIO::loadVariantChannel
boost::optional< VariantChannelT > loadVariantChannel(std::string groupName, std::string datasetName)
lvr2::hdf5features::ChannelIO
Definition: hdf5/ChannelIO.hpp:20
lvr2::BaseIO
Interface specification for low-level io. All read elements are stored in linear arrays.
Definition: BaseIO.hpp:57


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:25