Scopira  20080306
tree.h
1 
2 /*
3  * Copyright (c) 2002-2003 National Research Council
4  *
5  * All rights reserved.
6  *
7  * This material is confidential and proprietary information of
8  * National Research Council Canada ("Confidential Information").
9  * This Confidential Information may only be used and reproduced
10  * in accordance with the terms of the license agreement.
11  *
12  */
13 
14 #ifndef __INCLUDED_SCOPIRA_TOOL_TREE_H__
15 #define __INCLUDED_SCOPIRA_TOOL_TREE_H__
16 
17 #include <map>
18 #include <string>
19 
20 #include <scopira/tool/object.h>
21 #include <scopira/tool/iterator.h>
22 #include <scopira/tool/object.h>
23 #include <scopira/tool/export.h>
24 
25 namespace scopira
26 {
27  namespace tool
28  {
29  class treenode;
30  }
31 }
32 
41 {
42  public:
44 
45  private:
46  typedef std::map<std::string, scopira::tool::count_ptr<treenode> > nodemap_t;
47 
48  public:
50  SCOPIRA_EXPORT treenode(scopira::tool::object *o = 0);
52  SCOPIRA_EXPORT virtual ~treenode();
53 
55  SCOPIRA_EXPORT scopira::tool::object * get_object(void) { return dm_data.get(); }
56 
58  SCOPIRA_EXPORT void set(const std::string &name, treenode *nd);
60  SCOPIRA_EXPORT treenode * get(const std::string &name);
61 
70  SCOPIRA_EXPORT void set_path(const std::string &path_name, treenode *nd);
71 
77  SCOPIRA_EXPORT key_iterator get_key_iterator(void);
78 
79  protected:
80  nodemap_t dm_nodes;
82 };
83 
84 #endif
85 
Definition: tree.h:40
Definition: archiveflow.h:20
virtual ~treenode()
dtor
T * get(void) const
Definition: object.h:378
void set_path(const std::string &path_name, treenode *nd)
Definition: object.h:71
Definition: iterator.h:26
scopira::tool::object * get_object(void)
gets the object
Definition: tree.h:55
key_iterator get_key_iterator(void)
treenode(scopira::tool::object *o=0)
ctor