Re: Needed : set class for Cocoa
Re: Needed : set class for Cocoa
- Subject: Re: Needed : set class for Cocoa
- From: Jason Foreman <email@hidden>
- Date: Thu, 5 Feb 2009 18:02:27 -0600
You could throw the pointers into NSValue objects and store those in
an NS[Mutable]Set..
Jason
On Feb 5, 2009, at 5:29 PM, Tommy Nordgren <email@hidden>
wrote:
Do anyone know of a set container class for Cocoa objects, that use
pointer semantics.
Like this:
NSMutableString * s1 = [@"Hello" mutableCopy], * s2 = [@"Hello"
mutableCopy];
Somesetclass *someSet = [[Somesetclass alloc]init];
[someSet add:s1];
[someSet add: s2];
// After these calls, someSet should contain 2 elements because
s1 != s2 by pointer semantics
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden