Design Pattern Examples
Overview of object-oriented design patterns
Proxy_Class.h
Go to the documentation of this file.
1
7
8#pragma once
9#ifndef __PROXY_CLASS_H__
10#define __PROXY_CLASS_H__
11
12#include <memory>
13#include <string>
14
16{
17
25 {
26 virtual ~IWorkByProxy() {}
27
33 virtual std::string DoWork(std::string someArgument) = 0;
34 };
35
36
37 //========================================================================
38 //========================================================================
39
40
48 {
49 public:
54 static std::unique_ptr<IWorkByProxy> CreateProxy();
55 };
56
57} // end namespace
58
59
60#endif // __PROXY_CLASS_H__
61
For the purposes of this example, this class hides the details about the proxy class and the real cla...
Definition: Proxy_Class.h:48
static std::unique_ptr< IWorkByProxy > CreateProxy()
Retrieve a new instance of the proxy class.
The namespace containing all Design Pattern Examples implemented in C++.
Represents what can be done on the proxy object. This same interface is implemented on the real objec...
Definition: Proxy_Class.h:25
virtual std::string DoWork(std::string someArgument)=0
Does some work on the given argument and returns a new std::string.