• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa/Objective-C's Relative Performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa/Objective-C's Relative Performance


  • Subject: Re: Cocoa/Objective-C's Relative Performance
  • From: Steven Kramer <email@hidden>
  • Date: Fri, 14 Jan 2005 12:55:27 +0100


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.

Regards,

Steven Kramer

--
email@hidden
http://sprintteam.com/

_______________________________________________
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


  • Follow-Ups:
    • Re: Cocoa/Objective-C's Relative Performance
      • From: Clark Cox <email@hidden>
References: 
 >Re: Cocoa/Objective-C's Relative Performance (From: Alun ap Rhisiart <email@hidden>)
 >Re: Cocoa/Objective-C's Relative Performance (From: Steven Kramer <email@hidden>)
 >Re: Cocoa/Objective-C's Relative Performance (From: Clark Cox <email@hidden>)

  • Prev by Date: Convert String into Expression
  • Next by Date: Re: Convert String into Expression
  • Previous by thread: Re: Cocoa/Objective-C's Relative Performance
  • Next by thread: Re: Cocoa/Objective-C's Relative Performance
  • Index(es):
    • Date
    • Thread