gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOrderedSet implementation


From: Eric Wasylishen
Subject: Re: NSOrderedSet implementation
Date: Thu, 1 Aug 2013 00:48:01 -0600

Hi Luboš,
I started implementing NSOrderedSet but got distracted with some other things. 

My current idea is to use a combination of an NSMutableArray, and a NSMapTable configured to map objects to integers. The idea is that the array maps the object's index to the object, and the map table maps objects to their index.

I have some untested code that illustrates the idea here:
http://svn.gna.org/svn/etoile/trunk/Etoile/Frameworks/CoreObject/Sandbox/COWeakMutableOrderedSet.m

This is just a NSMutableOrderedSet subclass where I wanted weak references, but I think we could use the same code for a concrete GSMutableOrderedSet subclass. Btw, those are all of the primitive methods for NSOrderedSet / NSMutableOrderedSet according to the Foundation release notes.

Eric

On 2013-07-23, at 3:45 AM, Luboš Doležel <address@hidden> wrote:

Hi,

gnustep-base currently lacks NSOrderedSet.

Before I set to work, does gnustep-base include any primitives that could be/should be used for this? This seems to be a case for a binary tree.

--
Luboš Doležel


_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]