I am writing a B-link tree and its attendant sub classes like a data page class and a node class etc.
I was wondering is there a way to protect the public interfaces of the nodes and pages such that only the b-link tree class itself can access them, WITHOUT simultaneously exposing the private methods of the pages and nodes to the b-link class?
IE I have already thought of simply changing the 'public' interface of the pages and nodes into the protected category and then declaring the B-link tree as a friend but that gives the b-link tree access to private methods that I want to stay private.