Design Patterns
window.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 STRUCTURAL_BRIDGE_WINDOW_H_
7 #define STRUCTURAL_BRIDGE_WINDOW_H_
8 
9 #include "window_interface.h"
10 #include "window_imp.h"
11 
12 namespace structural
13 {
14 namespace bridge
15 {
16 class Window :public WindowInterface
17 {
18  public:
19  explicit Window(WindowImp* imp);
20  ~Window() override;
21 
22  virtual void DrawRect(const commons::Point<float>& p1, const commons::Point<float>& p2) override;
23  virtual void DrawText(const std::string& text, const commons::Point<float>&) override = 0;
24 
25  protected:
26  WindowImp *GetWindowImp() const;
27 
28  private:
29  WindowImp* imp_;
30 };
31 }
32 }
33 
34 #endif
35 
Definition: window_imp.h:15
Definition: shape_interface.h:11
virtual void DrawText(const std::string &text, const commons::Point< float > &) override=0
virtual void DrawRect(const commons::Point< float > &p1, const commons::Point< float > &p2) override
Definition: window.cc:20
Window(WindowImp *imp)
Definition: window.cc:13
~Window() override
Definition: window.cc:15
Definition: window.h:16
WindowImp * GetWindowImp() const
Definition: window.cc:26
Definition: window_interface.h:15