Re: Needed : set class for Cocoa
Re: Needed : set class for Cocoa
- Subject: Re: Needed : set class for Cocoa
- From: Ken Thomases <email@hidden>
- Date: Thu, 5 Feb 2009 17:59:44 -0600
On Feb 5, 2009, at 5:29 PM, 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
If you can require Leopard, take a look at NSHashTable.
Prior to Leopard, you can use the C interface for the same
functionality: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#/
/apple_ref/doc/uid/20000055-BCIGGJGB
Cheers,
Ken
_______________________________________________
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