GSLAM  3.0.0
Display.h
1 #ifndef GSLAM_DISPLAY_H
2 #define GSLAM_DISPLAY_H
3 
4 #include "Messenger.h"
5 
6 namespace GSLAM {
7 
8 /// Class Topic is used by display panel to choose a Messenger Topic
9 class Topic{
10 public:
11  Topic(const Svar& cls=SvarClass::instance<Svar>(),
12  const std::string& name=""):
13  _class(cls),_name(name) {}
14 
15  std::string name()const{return _name;}
16  Svar type()const{return _class;}
17 
18  Svar _class;
19  std::string _name;
20 };
21 
23 public:
24  DisplayProperty(const Svar& value,
25  const Svar& callback=Svar(),
26  const std::string& describe="")
27  :_value(value),_callback(callback),_describe(describe){}
28 
29  void refresh(){if(_refresh.isFunction()) _refresh();}
30 
31  void notify(){if(_callback.isFunction()) _callback();}
32 
33  Svar _value,_callback,_refresh;
34  std::string _describe;
35 };
36 
37 }
38 #endif
Definition: Camera.h:45
Definition: Display.h:22
The Svar class, A Tiny Modern C++ Header Brings Unified Interface for Different Languages.
Definition: Svar.h:561
Class Topic is used by display panel to choose a Messenger Topic.
Definition: Display.h:9