Maybe I'm thinking about this the wrong way but here's the idea:
Class A gets, as part of it's constructor, a pointer to class B and saves that pointer in a private variable. Class B exposes a public function, F. I'd like for class A and all classes that inherit from class A to NOT be able to call B.F.
The idea is that class A will implement its own version of F, one that calls B.F, but the rest of the code should not be calling B.F. If it matters, the two have different function signatures.
Can this be done? Or should it be done? Maybe another way, like a class C that inherits from class B and hides the public functions? (Cant that even be done?)