Re: Needed : set class for Cocoa
Re: Needed : set class for Cocoa
- Subject: Re: Needed : set class for Cocoa
- From: Jordan Breeding <email@hidden>
- Date: Thu, 05 Feb 2009 17:47:57 -0600
On 05 Feb, 2009, at 17:44, Jordan Breeding wrote:
On 05 Feb, 2009, at 17:29, Tommy Nordgren 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
NSSet/NSMutableSet
Sorry, I guess that won't help, I forgot that you said you wanted to
store two pointers to objects with the same value. Pretty sure that
NSSet/NSMutableSet rely on hash and isEqual: to do their storing.Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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