18 #ifndef _VIEWERFACTORY_HH_
19 #define _VIEWERFACTORY_HH_
36 typedef TopicView* (*ViewFactoryFn) (QWidget *_parent);
46 public:
static void RegisterAll();
52 public:
static void RegisterView(
const std::string &_className,
60 public:
static TopicView *NewView(
const std::string &_msgType,
61 const std::string &_topicName,
62 QWidget *_parent =
NULL);
66 public:
static void GetViewTypes(std::vector<std::string> &_types);
69 private:
static std::map<std::string, ViewFactoryFn> viewMap;
78 #define GZ_REGISTER_STATIC_VIEWER(msgtype, classname) \
79 GZ_GUI_VIEWERS_VISIBLE TopicView *New##classname(QWidget *_parent) \
81 return new gazebo::gui::classname(_parent); \
83 GZ_GUI_VIEWERS_VISIBLE \
84 void Register##classname() \
86 ViewFactory::RegisterView(msgtype, New##classname);\
TopicView *(* ViewFactoryFn)(QWidget *_parent)
Definition: ViewFactory.hh:36
The view factory creates GUI widgets to visualize data on a topic.
Definition: ViewFactory.hh:43
Base class for widgets that display topic data.
Definition: TopicView.hh:76
#define NULL
Definition: CommonTypes.hh:30
default namespace for gazebo
#define GZ_GUI_VIEWERS_VISIBLE
Definition: system.hh:468