VisitingFunctions.h

Go to the documentation of this file.
00001 #ifndef X3DTK_VISITINGFUNCTIONS_H
00002 #define X3DTK_VISITINGFUNCTIONS_H
00003 
00004 #include "EnterFunction.h"
00005 #include "WalkOnFunction.h"
00006 #include "LeaveFunction.h"
00007 
00008 namespace X3DTK {
00009 
00015 class VisitingFunctions
00016 {
00017 public:
00019   VisitingFunctions(const EnterFunction *enter, const WalkOnFunction *walkon, const LeaveFunction *leave);
00021   ~VisitingFunctions();
00022   
00024   void setEnterFunction(const EnterFunction *enter);
00026   void setWalkOnFunction(const WalkOnFunction *walkon);
00028   void setLeaveFunction(const LeaveFunction *leave);
00029 
00031   inline void enter(SFNode N) const {enter_->enter(N);};
00033   inline bool walkOn(SFNode N, SFNode child = 0) const {return walkon_->walkOn(N, child);};  
00035   inline void leave(SFNode N) const  {leave_->leave(N);};
00036 
00037 private:
00038   EnterFunction *enter_;
00039   WalkOnFunction *walkon_;
00040   LeaveFunction *leave_;
00041 };
00042 
00043 }
00044 
00045 #endif

Generated on Mon Jul 12 09:40:00 2004 for X3DToolKit by doxygen 1.3.6