roviz  0.7
Code Documentation of roviz
output_p.h
1 #ifndef OUTPUT_P_H
2 #define OUTPUT_P_H
3 
4 #include <functional>
5 #include <mutex>
6 #include <list>
7 #include "streams/stream_object.h"
8 
9 class InputPrivate;
10 
16 class ROVIZ_EXPORT OutputPrivate
17 {
18 public:
19  typedef std::list<std::function<void (StreamObject)> >::const_iterator Connection;
20 
21  std::list<std::function<void (StreamObject)> > pushInFuncs;
22  std::list<InputPrivate*> connected_inputs;
23 
24  OutputPrivate() = default;
25  ~OutputPrivate();
26 
35  Connection connect(InputPrivate *in, std::function<void (StreamObject)> fn);
36 
44  void disconnect(InputPrivate *in, Connection conn);
45 
46 private:
47  std::mutex mtx;
48 };
49 
50 #endif // OUTPUT_P_H
Base class of all objects that can be transported with a stream.
Definition: stream_object.h:39
Private part of the Ouput class.
Definition: output_p.h:16
Private part of the Input class.
Definition: input_p.h:21