cgv
node.h
1 #pragma once
2 
3 #include "named.h"
4 #include <cgv/data/ref_ptr.h>
5 #include "lib_begin.h"
6 
7 namespace cgv {
8  namespace base {
9 
10 class CGV_API node;
11 
14 
16 class CGV_API node : public named
17 {
18 protected:
20  friend class data::ref_ptr<node,true>;
23 public:
25  node(const std::string& name = "");
27  node_ptr get_parent() const;
29  base_ptr get_root() const;
31  void set_parent(node_ptr _parent);
33  data::ref_ptr<node,true> get_node();
35  std::string get_type_name() const;
36 };
37 
38 template <>
39 struct cast_helper<node>
40 {
41  inline static data::ref_ptr<node,true> cast(base* b)
42  {
43  return b->get_node();
44  }
45 };
46 
47 #if _MSC_VER >= 1400
48 CGV_TEMPLATE template class CGV_API data::ref_ptr<node>;
49 #endif
50 
51  }
52 }
53 
54 #include <cgv/config/lib_end.h>
cgv::base::node::parent
node_ptr parent
store a pointer to the parent node
Definition: node.h:22
cgv::base::node_ptr
data::ref_ptr< node, true > node_ptr
ref counted pointer to a node
Definition: node.h:13
cgv::data::ref_ptr< node, true >
cgv::base::named
Definition: named.h:17
cgv::base::base
Definition: base.h:57
cgv
the cgv namespace
Definition: vr_calib.cxx:9
cgv::base::node
Definition: node.h:17