MatLogger2  1.0.0
Library for logging of numeric data to HDF5 MAT-files, which is RT-safe and multithreaded.
matlogger2_backend.h
Go to the documentation of this file.
1 #ifndef __XBOT_MATLOGGER2_BACKEND_H__
2 #define __XBOT_MATLOGGER2_BACKEND_H__
3 
4 #include <string>
5 #include <memory>
6 
7 namespace XBot { namespace matlogger2 {
8 
9  class Backend
10  {
11 
12  public:
13 
14  typedef std::unique_ptr<Backend> UniquePtr;
15  typedef std::shared_ptr<Backend> Ptr;
16 
17  static UniquePtr MakeInstance(std::string type);
18 
19  virtual bool init(std::string logger_name,
20  bool enable_compression
21  ) = 0;
22 
23  virtual bool write(const char * name,
24  const double * data,
25  int rows,
26  int cols,
27  int slices) = 0;
28 
29  virtual bool close() = 0;
30 
31 
32  };
33 
34 } }
35 
36 #endif
std::shared_ptr< Backend > Ptr
virtual bool init(std::string logger_name, bool enable_compression)=0
virtual bool write(const char *name, const double *data, int rows, int cols, int slices)=0
virtual bool close()=0
static UniquePtr MakeInstance(std::string type)
std::unique_ptr< Backend > UniquePtr