inlib  1.2.0
/Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/sg/noderef
Go to the documentation of this file.
00001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
00002 // See the file inlib.license for terms.
00003 
00004 #ifndef inlib_sg_noderef
00005 #define inlib_sg_noderef
00006 
00007 #include "node"
00008 
00009 namespace inlib {
00010 namespace sg {
00011 
00012 class noderef : public node {
00013 public:
00014   static const std::string& s_class() {
00015     static const std::string s_v("inlib::sg::noderef");
00016     return s_v;
00017   }
00018 public:
00019   virtual void* cast(const std::string& a_class) const {
00020     if(void* p = inlib::cmp_cast<noderef>(this,a_class)) {return p;}
00021     return node::cast(a_class);
00022   }
00023 public: //node
00024   virtual node* copy() const {return new noderef(*this);}
00025   virtual const std::string& s_cls() const {return s_class();}
00026 public:
00027   virtual void render(render_action& a_action) {m_node.render(a_action);}
00028   virtual void pick(pick_action& a_action) {m_node.pick(a_action);}
00029   virtual void bbox(bbox_action& a_action) {m_node.bbox(a_action);}
00030   virtual void event(event_action& a_action) {m_node.event(a_action);}
00031   virtual void search(search_action& a_action) {m_node.search(a_action);}
00032   virtual bool write(write_action& a_action) {return m_node.write(a_action);}
00033 public:
00034   noderef(node& a_node):m_node(a_node){}
00035   virtual ~noderef(){}
00036 public:
00037   noderef(const noderef& a_from)
00038   :node(a_from)
00039   ,m_node(a_from.m_node)
00040   {}
00041   noderef& operator=(const noderef& a_from){
00042     node::operator=(a_from);
00043     return *this;
00044   }
00045 protected:
00046   node& m_node;
00047 };
00048 
00049 }}
00050 
00051 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines