hdf5/ScanIO.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef LVR2_IO_HDF5_SCANIO_HPP
4 #define LVR2_IO_HDF5_SCANIO_HPP
5 
6 #include "ArrayIO.hpp"
7 #include "MatrixIO.hpp"
9 
10 namespace lvr2
11 {
12 
13 namespace hdf5features
14 {
15 
16 template <typename Derived>
17 class ScanIO
18 {
19  public:
20  void save(uint scanPos, uint scanNr, const ScanPtr& buffer);
21  void save(HighFive::Group& group, uint scanNr, const ScanPtr& buffer);
22  void save(HighFive::Group& group, const ScanPtr& buffer);
23 
24  ScanPtr load(uint scanPos, uint scanNr);
25  ScanPtr load(HighFive::Group& group, uint scanNr);
27  // ScanPtr loadScan(HighFive::Group& group, std::string name);
28 
29  protected:
30  bool isScan(HighFive::Group& group);
31 
32  Derived* m_file_access = static_cast<Derived*>(this);
33 
34  // dependencies
37 
38  static constexpr const char* ID = "ScanIO";
39  static constexpr const char* OBJID = "Scan";
40 };
41 
42 } // namespace hdf5features
43 
51 template <typename Derived>
52 struct Hdf5Construct<hdf5features::ScanIO, Derived>
53 {
54 
55  // DEPS
58  using deps = typename dep1::template Merge<dep2>;
59 
60  // ADD THE FEATURE ITSELF
61  using type = typename deps::template add_features<hdf5features::ScanIO>::type;
62 };
63 
64 } // namespace lvr2
65 
66 #include "ScanIO.tcc"
67 
68 #endif // LVR2_IO_HDF5_SCANIO_HPP
typename Hdf5Construct< hdf5features::MatrixIO, Derived >::type dep2
Definition: hdf5/ScanIO.hpp:57
typename Hdf5Construct< hdf5features::ArrayIO, Derived >::type dep1
Definition: hdf5/ScanIO.hpp:56
static constexpr const char * OBJID
Definition: hdf5/ScanIO.hpp:39
std::shared_ptr< Scan > ScanPtr
Shared pointer to scans.
Definition: ScanTypes.hpp:98
MatrixIO< Derived > * m_matrixIO
Definition: hdf5/ScanIO.hpp:36
typename deps::template add_features< hdf5features::ScanIO >::type type
Definition: hdf5/ScanIO.hpp:61
typename dep1::template Merge< dep2 > deps
Definition: hdf5/ScanIO.hpp:58
Helper class how to construct a IO feature with its dependencies.
void save(uint scanPos, uint scanNr, const ScanPtr &buffer)
unsigned int uint
Definition: Model.hpp:46
ArrayIO< Derived > * m_arrayIO
Definition: hdf5/ScanIO.hpp:35
typename Derived::template add_features< Feature >::type type
ScanPtr load(uint scanPos, uint scanNr)
static constexpr const char * ID
Definition: hdf5/ScanIO.hpp:38
bool isScan(HighFive::Group &group)


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