Proxy Classes

Sometimes, it is desirable to hide the implementation details of a class to prevent access to proprietary information (including private data) and proprietary program login in a class. 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 giving the client access to your class's implementation details. Implementation of a proxy class is demonstrated in Figs. 2.29-2.31.
Figure 2.29: Implementation class definition.
\includegraphics[scale=0.45]{figures/img7.73.ps}
\includegraphics[scale=0.45]{figures/img7.74.ps}
Figure 2.30: Interface class definition.
\includegraphics[scale=0.45]{figures/img7.75.ps}
\includegraphics[scale=0.45]{figures/img7.76.ps}
Figure 2.31: Interface class member-function definitions and Implementing a proxy class.
\includegraphics[scale=0.45]{figures/img7.77.ps}
\includegraphics[scale=0.45]{figures/img7.78.ps}
2004-07-29