00001 00002 // ClonerStateVariables.h // 00004 00005 #ifndef CLONERGLOBALVARIABLES_H 00006 #define CLONERGLOBALVARIABLES_H 00007 00008 #include "StateVariables.h" 00009 00010 namespace X3DTK { 00011 00013 00014 class ClonerStateVariables : public StateVariables 00015 { 00016 public: 00018 ClonerStateVariables(); 00020 virtual ~ClonerStateVariables(); 00021 00023 void initRoot(); 00025 virtual void init(); 00027 virtual void finish(); 00028 00030 void addCoupleNode(SFAbstractNode N, SFAbstractNode NN); 00032 void pushNode(SFAbstractNode N); 00034 void popNode(); 00035 00037 inline SFAbstractNode getRoot() const {return _root;}; 00039 inline SFAbstractNode getTop() const {return (!_nodeStack.empty() ? _nodeStack.front() : 0);}; 00041 SFAbstractNode getNode(SFAbstractNode N) const; 00042 00043 private: 00044 SFAbstractNode _root; 00045 MFAbstractNode _nodeStack; 00046 std::map<SFAbstractNode, SFAbstractNode> _nodeCoupleMap; 00047 }; 00048 00049 } 00050 00051 #endif