Topic: protected and friends: a question


Author: bouaziz@polymnie.NoSubdomain.NoDomain (Laurent BOUAZIZ)
Date: Thu, 18 Feb 93 15:57:20 GMT
Raw View
Is there a way to allow a class that does not belong to a hierarchy of classes to
be friend of the whole hierarchy?

Please E-mail answers to bouaziz@antigone.enpc.fr




Author: cmain@giraffe.ru.ac.za (MR CRAIG MAIN)
Date: 23 Feb 93 12:56:19 GMT
Raw View
In article <1993Feb18.155720.9254@enpc.fr> bouaziz@polymnie.NoSubdomain.NoDomain (Laurent BOUAZIZ) writes:
>From: bouaziz@polymnie.NoSubdomain.NoDomain (Laurent BOUAZIZ)
>Subject: protected and friends: a question
>Date: Thu, 18 Feb 93 15:57:20 GMT
>Is there a way to allow a class that does not belong to a hierarchy of classes to
>be friend of the whole hierarchy?
>
>Please E-mail answers to bouaziz@antigone.enpc.fr

Making a class a friend class of an entire heirarchy is NOT possible unless
you explicitly declare it a friend class of each class in the heirarchy,
however, if you declare a class the friend of the class in the top of the
hierarchy, and declare all data and methods that inherit this base class
public or protected, your friend class should be able to access all the
methods and data directly.
(Whew, I hope you got that)