00001 00002 // NodeWalkingProxy.h // 00004 00005 #ifndef NODEWALKINGPROXY_H 00006 #define NODEWALKINGPROXY_H 00007 00008 #include "X3DNodeProxy.h" 00009 #include "X3DAbstractNode.h" 00010 #include "WalkingFunction.h" 00011 00012 #include <list> 00013 00014 namespace X3DTK { 00015 00016 class Type; 00017 class X3DComponentWalker; 00018 class NodeVisitingProxy; 00019 00021 00022 class NodeWalkingProxy : public X3DNodeProxy 00023 { 00024 public: 00026 NodeWalkingProxy(); 00028 virtual ~NodeWalkingProxy(); 00029 00031 void setNodeVisitingProxy(const NodeVisitingProxy *nodeVisitingProxy); 00033 void setComponentWalker(X3DComponentWalker *component); 00035 inline void walk(SFAbstractNode N) const {walkingArray_[N->getType()->getId()]->walk(N);}; 00037 void reset(); 00038 00039 friend NodeWalkingProxy *joinNodeWalkingProxies(NodeWalkingProxy *N0, NodeWalkingProxy *N1); 00040 00041 private: 00043 virtual void addType(const Type *type); 00045 WalkingFunction *getWalkingFunctionOf(const Type *type) const; 00046 00047 //Dictionary of all the creation functions used. 00048 WalkingArray walkingArray_; 00049 std::list<X3DComponentWalker *> componentList_; 00050 NodeVisitingProxy *nodeVisitingProxy_; 00051 }; 00052 00053 } 00054 00055 #endif