Main Page | Modules | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

Walker.h

Go to the documentation of this file.
00001 #ifndef X3DTK_WALKER_H
00002 #define X3DTK_WALKER_H
00003 
00004 #include "X3DActor.h"
00005 #include "X3DAbstractNode.h"
00006 #include "WalkingFunction.h"
00007 
00008 #include <list>
00009 
00010 namespace X3DTK {
00011 
00012 class SFType;
00013 class X3DComponentWalker;
00014 class Visitor;
00015 
00022 class Walker : public X3DActor
00023 {
00024 public:  
00026   Walker();
00028   virtual ~Walker();
00029   
00031   void setVisitor(Visitor *visitor);  
00033   void setComponentWalker(X3DComponentWalker *component);
00035   inline void walk(SFAbstractNode N) const {_walkingArray[N->getType()->getId()]->walk(N);};
00037   void reset();
00038   
00039   friend Walker *joinWalkers(Walker *N0, Walker *N1);
00040 
00041 private:  
00043   virtual void addType(const SFType *type);
00045   WalkingFunction *getWalkingFunctionOf(const SFType *type) const;
00046   
00047   //Dictionary of all the creation functions used.
00048   WalkingArray _walkingArray;
00049   std::list<X3DComponentWalker *> _componentList;
00050   Visitor *_visitor;
00051 };
00052 
00053 }
00054 
00055 #endif

Generated on Tue Mar 2 14:08:51 2004 for X3DToolKit by doxygen 1.3.3