discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: dia2code objc


From: Mondragon, Ian
Subject: RE: dia2code objc
Date: Tue, 26 Mar 2002 10:26:31 -0600

just my 2 cents here, but this is NOT C++.  if you want to have particular
ivars of a class accessable by other classes, yet at the same time have them
protected or private, you will have to do one of the following:

        1. implement accessor methods
        2. have a common superclass

there is no "friend" specifier in objective-c (thank god.  what a stupid
name, too...).  in fact, "friend" is just a way of escaping data hiding
restrictions in select cases, but if you're going to need to do it once,
you'll probably need to do it again.  just create an accessor method.

- ian

ps - at least it's not called "buddy".  bwaaaahaaahaaa...

> > but how do we protect a member variable, assuming 'protected' means that
> the 
> > variable is only accessible by certain objects? i was hoping there was a
> 
> > simple default way to check whether a calling class is a 'friend'
> allowed to 
> > access protected members, or perhaps this could be a chance to check
> wether 
> > that would be useful a concept to have in gnustep.
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]