Friends access to an arbitrary class?

Ald aldarri_s at yahoo.com
Sun Jul 8 18:28:00 PDT 2007


Suppose I have a hierarchy of classes, with base class Human.
Each Human has a reference to a class of (super) type Algorithm, which contains the implementation of the Human's behavior.

How can I give every Algorithm (and derivative) access to every private method and member to any Human (or derivative) that holds reference to that Algorithm?

I tried inheriting from nested classes and from classes in the same module.


More information about the Digitalmars-d-learn mailing list