• 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: A tree data structure?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A tree data structure?


  • Subject: Re: A tree data structure?
  • From: BJ Homer <email@hidden>
  • Date: Tue, 5 May 2009 08:46:25 -0600

You may be interested the CHDataStructures framework, hosted by the BYU
CocoaHeads group.  It has a number of such structures that should work for
you.
http://cocoaheads.byu.edu/code/CHDataStructures

<http://cocoaheads.byu.edu/code/CHDataStructures>-BJ Homer

On Tue, May 5, 2009 at 7:10 AM, Andreas Grosam <email@hidden>wrote:

>
> NSTreeController and CFTree is not exactly what I'm searching for. I would
> like to have  a *pure*, simple and effective but complete tree data
> structure which comprises a hierarchy of objects:
>
> root
>  |- object1
>  |- object2
>     |- object4
>     |- object5
>
>
> The container shall be sequential, that is its elements shall be ordered.
>
>
> A possible approach could look like this:
>
> @interface Tree {
>  Node* root;
> }
> -(void) addObject: (NSObject)* data into:(Node*)parent;
> -(TreeEnumerator*) enumeratorOfType:(int) enumeratorType;
> - (int) count;
> ...
> @end
>
>
> Class Node contains the data and structural information:
>
> @interface Node {
>    NSMutableArray*  data;
>    Node*            parent;
> }
> -(void) addObject:(NSObject*) data;
> -(int) count;
> ...
> @end
>
>
>
> Is there already something available like this?
> Thanks in advance for hints.
>
>
> Regards
> Andreas Grosam
> _______________________________________________
>
> 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

  • Follow-Ups:
    • Re: A tree data structure?
      • From: Andreas Grosam <email@hidden>
References: 
 >A tree data structure? (From: Andreas Grosam <email@hidden>)

  • Prev by Date: NSTextView & Tabs ...
  • Next by Date: Re: NSImage drawing
  • Previous by thread: Re: A tree data structure?
  • Next by thread: Re: A tree data structure?
  • Index(es):
    • Date
    • Thread