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 <agro...@onlinehome.de>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 (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/bjhomer%40gmail.com > > This email sent to bjho...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com