descriptions/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 
7 
8 // Dependencies
10 
11 
12 namespace lvr2 {
13 
14 
49 struct ConstructType {
50 
51 };
52 
53 template<typename FeatureBase = ConstructType>
55 public:
56 
57  template<typename ...Tp>
58  void save(std::string groupName, std::string datasetName, const VariantChannel<Tp...>& vchannel);
59 
60  template<typename ...Tp>
61  void save(HighFive::Group& group, std::string datasetName, const VariantChannel<Tp...>& vchannel);
62 
63  template<typename VariantChannelT>
64  boost::optional<VariantChannelT> load(std::string groupName, std::string datasetName);
65 
66  template<typename VariantChannelT>
67  boost::optional<VariantChannelT> load(HighFive::Group& group, std::string datasetName);
68 
69  template<typename VariantChannelT>
70  boost::optional<VariantChannelT> loadVariantChannel(std::string groupName, std::string datasetName);
71 
72 protected:
73 
74  template<typename VariantChannelT>
75  boost::optional<VariantChannelT> loadDynamic(HighFive::DataType dtype,
76  HighFive::Group& group,
77  std::string name);
78 
79  template<typename ...Tp>
80  void saveDynamic(HighFive::Group& group,
81  std::string datasetName,
82  const VariantChannel<Tp...>& vchannel
83  );
84 
85  FeatureBase* m_file_access = static_cast<FeatureBase*>(this);
86  ChannelIO<FeatureBase>* m_channel_io = static_cast<ChannelIO<FeatureBase>*>(m_file_access);
87 };
88 
92 template<typename BaseIO>
94 
95  // DEPS
97 
98  // add actual feature
99  using type = typename deps::template add_features<VariantChannelIO>::type;
100 };
101 
102 
103 } // namespace lvr2
104 
105 #include "VariantChannelIO.tcc"
106 
107 #endif // LVR2_IO_HDF5_VARIANTCHANNELIO_HPP
Manager Class for all FeatureBase components located in hdf5 directory.
Definition: FeatureBase.hpp:31
typename Hdf5Construct< ChannelIO, BaseIO >::type deps
typename deps::template add_features< VariantChannelIO >::type type
Hdf5IO Feature for handling VariantChannel related IO.
Interface specification for low-level io. All read elements are stored in linear arrays.
Definition: BaseIO.hpp:57
Helper class how to construct a IO feature with its dependencies.
HDF5 Data Type.
Definition: H5DataType.hpp:21
typename Derived::template add_features< Feature >::type type


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 Mon Feb 28 2022 22:46:09