|
Scopira
20080306
|
#include <tree.h>
Public Types | |
| typedef scopira::tool::iterator_g< const std::string &> | key_iterator |
Public Member Functions | |
| treenode (scopira::tool::object *o=0) | |
| ctor | |
| virtual | ~treenode () |
| dtor | |
| scopira::tool::object * | get_object (void) |
| gets the object | |
| void | set (const std::string &name, treenode *nd) |
| sets a node, returns created node | |
| treenode * | get (const std::string &name) |
| gets a node, might return null | |
| void | set_path (const std::string &path_name, treenode *nd) |
| key_iterator | get_key_iterator (void) |
Public Member Functions inherited from scopira::tool::object | |
| virtual | ~object () |
| int | add_ref (void) const |
| bool | sub_ref (void) const |
| void | auto_ref (void) const |
| int | current_ref (void) const |
| virtual scopira::tool::oflow_i & | print (scopira::tool::oflow_i &o) const |
| virtual bool | load (scopira::tool::iobjflow_i &in) |
| virtual void | save (scopira::tool::oobjflow_i &out) const |
| bool | is_alive_object (void) const |
| bool | is_dead_object (void) const |
Protected Attributes | |
| nodemap_t | dm_nodes |
| scopira::tool::count_ptr< scopira::tool::object > | dm_data |
Additional Inherited Members | |
Protected Member Functions inherited from scopira::tool::object | |
| object (void) | |
| object (bool neverusecounter) | |
A recursive tree structure, useful for building menus and other light systems.
Each node can have an associated (reference counted) data object and name.
| key_iterator scopira::tool::treenode::get_key_iterator | ( | void | ) |
Get an iterator of all the childeren.
Referenced by get_object().
| void scopira::tool::treenode::set_path | ( | const std::string & | path_name, |
| treenode * | nd | ||
| ) |
Parses the path (with / deliminating sub nodes) and inserts the node into the tree.
nd is ref counted.
Referenced by get_object().