This may not be the answer you're looking for, but you might refer to the MFC source code (available with VC++) for an example of how this kind of encapsulation works. If you're unaware, MFC is a C++ ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results