Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Providing clients of your class with a proxy class that knows only the public interface to your class enables the clients to use your class’s services without gaining access to your class’s implementation details, such as its private data.
When a class definition uses only a pointer or reference to an object of another class, the class header file for that other class (which would ordinarily reveal the private data of that class) is not required to be included with #include. You can simply declare that other class as a data type with a forward class declaration before the type is used in the file.
The implementation file containing the member functions for a proxy class is the only file that includes the header file for the class whose private data we would like to hide.
The implementation file containing the member functions for the proxy class is provided to the client as a precompiled object code file along with the header file that includes the function prototypes of the services provided by the proxy class.