OpenDaVINCI  4.16.0
Recorder.h
Go to the documentation of this file.
1 
20 #ifndef OPENDAVINCI_TOOLS_RECORDER_RECORDER_H_
21 #define OPENDAVINCI_TOOLS_RECORDER_RECORDER_H_
22 
23 #include <map>
24 #include <memory>
25 #include <string>
26 
30 
31 namespace odcore { namespace data { class Container; } }
32 
33 namespace odtools {
34  namespace recorder {
35 
36  class RecorderDelegate;
37  class SharedDataListener;
38 
39  using namespace std;
40 
44  class Recorder {
45  private:
53  Recorder(const Recorder &/*obj*/);
54 
63  Recorder& operator=(const Recorder &/*obj*/);
64 
65  public:
79  Recorder(const string &url, const uint32_t &memorySegmentSize, const uint32_t &numberOfSegments, const bool &threading, const bool &dumpSharedData);
80 
81  virtual ~Recorder();
82 
88  void recordQueueEntries();
89 
96  odcore::base::FIFOQueue& getFIFO();
97 
105  void registerRecorderDelegate(const uint32_t &containerID, RecorderDelegate* r);
106 
113  SharedDataListener& getDataStoreForSharedData();
114 
122  void store(odcore::data::Container c);
123 
124  private:
126  unique_ptr<SharedDataListener> m_sharedDataListener;
127  std::shared_ptr<ostream> m_out;
128  std::shared_ptr<ostream> m_outSharedMemoryFile;
129  bool m_dumpSharedData;
130  odcore::base::Mutex m_mapOfRecorderDelegatesMutex;
131  map<int32_t, RecorderDelegate*> m_mapOfRecorderDelegates;
132  };
133 
134  } // recorder
135 } // tools
136 
137 #endif /*OPENDAVINCI_TOOLS_RECORDER_RECORDER_H_*/
Definition: Recorder.h:44
Definition: base/Mutex.h:49
Definition: Container.h:40
Definition: RecorderDelegate.h:41
Definition: SharedDataListener.h:48
Definition: FIFOQueue.h:38