The proxy class that implements the IWorkByProxy. More...
Public Member Functions | |
std::string | DoWork (std::string someArgument) |
Do some work on a std::string. | |
Public Member Functions inherited from IWorkByProxy | |
virtual | ~IWorkByProxy () |
virtual std::string | DoWork (std::string someArgument)=0 |
Does some work on the given argument and returns a new std::string. | |
Private Member Functions | |
DesignPatternExamples_cpp::IWorkByProxy * | _GetRealClass () |
Helper method to retrieve the one and only instance of the real class. This hides the details of instantiating the real class. | |
Private Attributes | |
std::unique_ptr< DesignPatternExamples_cpp::IWorkByProxy > | _realClassInstance |
The one and only instance of the real class associated with this proxy class instance. | |
The proxy class that implements the IWorkByProxy.
Definition at line 54 of file Proxy_Class.cpp.
|
inlineprivate |
Helper method to retrieve the one and only instance of the real class. This hides the details of instantiating the real class.
Definition at line 67 of file Proxy_Class.cpp.
References Proxy_Class::_realClassInstance.
Referenced by Proxy_Class::DoWork().
|
inlinevirtual |
Do some work on a std::string.
someArgument | A std::string to work on. |
The real class this proxy represents is not instantiated until this method is called even though the proxy class has been instantiated. When this method is called for the first time, the real class is instantiated, incurring a performance penalty only on the first call.
Implements IWorkByProxy.
Definition at line 95 of file Proxy_Class.cpp.
References Proxy_Class::_GetRealClass(), and IWorkByProxy::DoWork().
|
private |
The one and only instance of the real class associated with this proxy class instance.
Definition at line 58 of file Proxy_Class.cpp.
Referenced by Proxy_Class::_GetRealClass().