On Tuesday 26 March 2002 13:36, Helge Hess wrote:
Björn Gohla wrote:
i am working on a dia2code plugin for objective-c. i have some issues
with class member visibility. public attributes are represented in
objc
via a set/get pair, and private ones by the absence of it. but is
there
any useful interpretation of protected attributes, if so how?
Actually private/protected/public attributes should probably be mapped
to instance variables ? ivars do support those flags:
@interface MyClass
{
@private
id myPrivate;
@protected
id myProtected;
@public
id myPublic;
}
@end
perhaps this can be done without changing the compiler, by using an
authentication mechanism like the one in NSProxy. the accessor methods
could
check whether the caller is allowed to access the variable, we can even
have
write only and read only access and different access rights for
different
classes, try that with c++ ;) .