Design Patterns
virtual_image_proxy.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_PROXY_VIRTUAL_IMAGE_PROXY_H_
7 #define STRUCTURAL_PROXY_VIRTUAL_IMAGE_PROXY_H_
8 
9 #include "image.h"
10 
11 namespace structural
12 {
13 namespace proxy
14 {
16 {
17  public:
18  explicit VirtualImageProxy(const std::string& imageFile);
19  virtual ~VirtualImageProxy();
20 
21  virtual Image *operator->();
22  virtual Image &operator*();
23 
24  private:
25  Image *LoadImage();
26  Image* image_;
27  std::string image_file_;
28 };
29 }
30 }
31 
32 #endif
33 
Definition: shape_interface.h:11
VirtualImageProxy(const std::string &imageFile)
Definition: virtual_image_proxy.cc:12
virtual ~VirtualImageProxy()
Definition: virtual_image_proxy.cc:18
Definition: image.h:18
virtual Image & operator*()
Definition: virtual_image_proxy.cc:39
Definition: virtual_image_proxy.h:15
virtual Image * operator->()
Definition: virtual_image_proxy.cc:34