Main Page   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 
00002 //                            Walker.h                                        //
00004 
00005 #ifndef WALKER_H
00006 #define WALKER_H
00007 
00008 #include "X3DActor.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 Visitor;
00019 
00021 
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 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   Visitor *_visitor;
00051 };
00052 
00053 }
00054 
00055 #endif

Generated on Thu Oct 9 13:50:55 2003 for X3DToolKit by doxygen1.2.18