00001 00002 00003 00005 00006 00011 00016 00021 // NodeWalkingProxy.h // 00023 00024 #ifndef NODEWALKINGPROXY_H 00025 #define NODEWALKINGPROXY_H 00026 00027 #include "X3DNodeProxy.h" 00028 #include "X3DAbstractNode.h" 00029 #include "WalkingFunction.h" 00030 00031 #include <list> 00032 00033 namespace X3DTK { 00034 00035 class Type; 00036 class X3DComponentWalker; 00037 class NodeVisitingProxy; 00038 00040 00041 class NodeWalkingProxy : public X3DNodeProxy 00042 { 00043 public: 00045 NodeWalkingProxy(); 00047 virtual ~NodeWalkingProxy(); 00048 00050 void setNodeVisitingProxy(const NodeVisitingProxy *nodeVisitingProxy); 00052 void setComponentWalker(X3DComponentWalker *component); 00054 inline void walk(SFAbstractNode N) const {walkingArray_[N->getType()->getId()]->walk(N);}; 00056 void reset(); 00057 00058 friend NodeWalkingProxy *joinNodeWalkingProxies(NodeWalkingProxy *N0, NodeWalkingProxy *N1); 00059 00060 private: 00062 virtual void addType(const Type *type); 00064 WalkingFunction *getWalkingFunctionOf(const Type *type) const; 00065 00066 //Dictionary of all the creation functions used. 00067 WalkingArray walkingArray_; 00068 std::list<X3DComponentWalker *> componentList_; 00069 NodeVisitingProxy *nodeVisitingProxy_; 00070 }; 00071 00072 } 00073 00074 #endif