Design Patterns
widget.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef OPERATIONAL_CHAIN_WIDGET_H_
7 #define OPERATIONAL_CHAIN_WIDGET_H_
8 
10 
11 #include <string>
12 
13 namespace operational
14 {
15 namespace chain
16 {
18 {
19  public:
20  virtual bool HasHelp() override;
21  virtual void SetHandler(HelpHandlerInterface*, int) override;
22 
23  virtual void HandleHelp() override;
24 
25  virtual int topic() const;
26  virtual std::string name() const;
27  virtual std::string help_message() const;
28 
29  protected:
30  Widget();
31  explicit Widget(std::string name);
32  Widget(std::string name, int topic);
33  Widget(std::string name, int topic, HelpHandlerInterface* parent);
34 
35  private:
36  int topic_;
37  std::string name_;
38  std::string help_message_;
39  HelpHandlerInterface* parent_;
40 };
41 }
42 }
43 
44 #endif
45 
virtual void SetHandler(HelpHandlerInterface *, int) override
Definition: widget.cc:33
Definition: help_handler_interface.h:13
virtual int topic() const
Definition: widget.cc:56
virtual std::string name() const
Definition: widget.cc:61
Definition: application.cc:10
virtual bool HasHelp() override
Definition: widget.cc:28
Definition: widget.h:17
Widget()
Definition: widget.cc:14
virtual std::string help_message() const
Definition: widget.cc:66
virtual void HandleHelp() override
Definition: widget.cc:39