• 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: Where is NSList?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is NSList?


  • Subject: Re: Where is NSList?
  • From: Tim Conkling <email@hidden>
  • Date: Tue, 27 Jul 2004 19:07:32 -0400

std::map, std::multimap, and std::set also offer this capability. std::deque, std::vector, and a few others don't, that's correct. I'm looking for an NS object with the same sort of functionality as std::list (or even std::map). From the responses my original post has generated, I am going to assume that such an object does not exist, and move on.

Thanks,
Tim

On Jul 27, 2004, at 6:25 PM, Allan Odgaard wrote:

On 28. Jul 2004, at 0:07, Tim Conkling wrote:

The reason NSArray/NSMutableArray doesn't work for my purposes is because there is no way for an object in an NSArray to know where its position in that NSArray is (unless I'm missing something), and for that information to remain accurate after the array is modified. This is a feature that is provided by, for example, the STL with its list and map templates, through the use of iterator objects.

Only std::list offers this, the rest of the STL doesn't.

However, with Cocoa you always store pointers to objects in contrast to STL, where you often store the objects inline. This means that the storage for the actual data can change when the vector is resized, which is not the case with Cocoa, so here you can just use the object pointer.

So I see no need for the iterator indirection you are requesting?!?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Where is NSList?
      • From: Bob Hutchison <email@hidden>
References: 
 >Where is NSList? (From: Tim Conkling <email@hidden>)
 >Re: Where is NSList? (From: David Brown <email@hidden>)
 >Re: Where is NSList? (From: Tim Conkling <email@hidden>)
 >Re: Where is NSList? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: Where is NSList?
  • Next by Date: Re: Where is NSList?
  • Previous by thread: Re: Where is NSList?
  • Next by thread: Re: Where is NSList?
  • Index(es):
    • Date
    • Thread