Design Patterns
button.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_BUTTON_H_
7 #define OPERATIONAL_CHAIN_BUTTON_H_
8 
9 #include "widget.h"
10 
11 namespace operational
12 {
13 namespace chain
14 {
15 class Button : public Widget
16 {
17  public:
18  Button();
19  explicit Button(std::string name);
20  Button(std::string name, int topic);
21  Button(std::string name, int topic, HelpHandlerInterface* parent);
22 
23  virtual bool HasHelp() override;
24  virtual void HandleHelp() override;
25 
26  virtual std::string help_message() const override;
27 
28  private:
29  int topic_;
30  std::string name_;
31  std::string help_message_;
32 };
33 }
34 }
35 
36 #endif
37 
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
Definition: widget.h:17
virtual void HandleHelp() override
Definition: button.cc:30
Button()
Definition: button.cc:14
Definition: button.h:15
virtual std::string help_message() const override
Definition: button.cc:44
virtual bool HasHelp() override
Definition: button.cc:25