30 printf(
" --> Creating instance of real class...\n");
51 printf(
" --> proxy class DoWork() in\n");
52 if (someArgument != NULL)
55 printf(
" --> Forwarding DoWork() call to real class...\n");
56 success = service->
DoWork(someArgument);
77 printf(
" --> Creating instance of proxy class...\n");
bool Proxy_DoWork(DynamicString *someArgument)
Do some work on a dynamic string.
static IWorkByProxy * Proxy_GetRealService(void)
Helper function to retrieve the one and only instance of the real service. This hides the details of ...
static IWorkByProxy * _realService
The one and only instance of the real service associated with this proxy service instance.
IWorkByProxy * GetProxyService(void)
Obtain the proxy service.
IWorkByProxy proxy_service
The proxy service.
Declaration of the proxy service, accessed through the GetProxyService() function,...
IWorkByProxy * GetRealService(void)
Return a pointer to the real service expressed as an IWorkByProxy service.
Declaration of the real service, accessed through the GetRealService() function, as used in the Proxy...
Represents a string that can be grown dynamically.
Represents what can be done on the proxy object. This same interface is implemented on the real objec...
bool(* DoWork)(DynamicString *someArgument)
Does some work on the given argument and updates the given argument.