Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a node class, such as NSNode?

Is there a node class, such as NSNode or similar in objective-c, or should I roll my own? Searching doesn't seem to turn up anything.

Something simple with add/remove nodes/children, etc.

like image 882
TigerCoding Avatar asked Sep 25 '26 04:09

TigerCoding


1 Answers

I think you are looking for CFTree. It does not have a corresponding NS wrapper, but it provides the operations that you are looking for: adding other CFTree instances as children, iterating over siblings, associating your own data with a tree node, and so on. Becoming comfortable with Core Foundation programming takes some time, but it is usually better than rolling your own.

like image 174
Sergey Kalinichenko Avatar answered Sep 26 '26 16:09

Sergey Kalinichenko