[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dia2code objc
From: |
Björn Gohla |
Subject: |
Re: dia2code objc |
Date: |
Tue, 26 Mar 2002 14:36:15 +0100 |
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++ ;) .
> > how can private and
> >
> > protected methods be represented in objc?
>
> There is no protection for methods in ObjC. Common convention is, that
> private and protected methods have an "_" underscore prefix. "Protected"
> might be mapped to a "MyClass+Protected.h" headerfile which contains an
> informal protocol for the protected _ methods.
- dia2code objc, Björn Gohla, 2002/03/26
- Re: dia2code objc, Helge Hess, 2002/03/26
- Re: dia2code objc,
Björn Gohla <=
- Re: dia2code objc, Richard Frith-Macdonald, 2002/03/26
- Re: dia2code objc, Björn Gohla, 2002/03/26
- Re: dia2code objc, Frederic Stark, 2002/03/26
- Re: dia2code objc, Björn Gohla, 2002/03/26
- Re: dia2code objc, Frederic Stark, 2002/03/27
Re: dia2code objc, Philippe C.D. Robert, 2002/03/26