Scopira 20080306

scopira::tool::treenode Class Reference

#include <tree.h>

Inheritance diagram for scopira::tool::treenode:
scopira::tool::object

List of all members.

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::objectget_object (void)
 gets the object
void set (const std::string &name, treenode *nd)
 sets a node, returns created node
treenodeget (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)

Protected Attributes

nodemap_t dm_nodes
scopira::tool::count_ptr
< scopira::tool::object
dm_data

Detailed Description

A recursive tree structure, useful for building menus and other light systems.

Each node can have an associated (reference counted) data object and name.

Author:
Aleksander Demko

Member Function Documentation

key_iterator scopira::tool::treenode::get_key_iterator ( void  )

Get an iterator of all the childeren.

Author:
Aleksander Demko
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.

Author:
Aleksander Demko

The documentation for this class was generated from the following file: