Re: Cocoa/Objective-C's Relative Performance
Re: Cocoa/Objective-C's Relative Performance
- Subject: Re: Cocoa/Objective-C's Relative Performance
- From: Clark Cox <email@hidden>
- Date: Fri, 14 Jan 2005 09:13:42 -0500
On Fri, 14 Jan 2005 12:55:27 +0100, Steven Kramer
<email@hidden> wrote:
>
> Op 13-jan-05 om 15:23 heeft Clark Cox het volgende geschreven:
>
> >>
> >> Alan Odgaard has written ObjC wrappers for C++ STL containers (whose
> >> operation complexities are well-specified and whose implementations
> >> are
> >> often close to optimal, or at least better than what you or I could
> >> come up with on a short timescale ;-).
> >>
> >> http://www.top-house.dk/~aae0030/cocoastl/
> >
> > That looks more like *STL* wrappers to *Cocoa* containers, which seems
> > to be the opposite of what the OP needs.
> >
>
> And right you are. To use STL containers for Cocoa objects you could
> probably get away with a light wrapper. Typing in mail, but, in the
> absence of Obj-C exceptions, you might use this
>
> class OCWrapper
> {
> public:
> OCWrapper (id inObject) : object ([inObject retain]) { }
> ~OCWrapper () { [object release]; }
> id Object () { return object; }
> private:
> id object;
> };
>
> to be able to do this:
>
> std::vector < OCWrapper >
>
> And maybe throw in a few of these later?
>
> bool operator == (OCWrapper const& inOther) { return [Object ()
> isEqual: inOther.Object ()]; }
>
> Somebody has probably been there and back already, though. Time for
> some googling, I guess.
Something I posted to comp.sys.mac.programmer.help back in 2001:
<http://groups.google.ca/groups?hl=en&lr=&ie=UTF-8&selm=1f18atz.3l26hmwk9f74N%email@hidden&rnum=19>
--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden