Helios++
Helios software for LiDAR simulations
SerialIO.h
1 #pragma once
2 
3 
4 #include <string>
5 
11 class SerialIO {
12 private:
13  // *** SINGLETON *** //
14  // ******************* //
18  static SerialIO * instance;
22  SerialIO() = default;
23 public:
24  // *** SINGLETON *** //
25  // ******************* //
31  static SerialIO * getInstance();
32 
33  ~SerialIO(){};
34 
35  // *** SERIAL IO METHODS *** //
36  // ************************* //
47  template<class SerialClass>
48  void write(
49  std::string& path,
50  SerialClass *object,
51  bool fastCompression=true
52  );
53 
64  template<typename SerialClass>
65  SerialClass * read(std::string& path, bool fastCompression=true);
66 };
67 
68 #include <SerialIO.tcc>
SerialClass * read(std::string &path, bool fastCompression=true)
static SerialIO * instance
Pointer to singleton instance of SerialIO.
Definition: SerialIO.h:18
SerialIO()=default
Singleton constructor.
Utils for Input/Output operations of serializable objects.
Definition: SerialIO.h:11
void write(std::string &path, SerialClass *object, bool fastCompression=true)
static SerialIO * getInstance()
Definition: SerialIO.cpp:6