00001 00002 // EnterFunction.h // 00004 00005 #ifndef ENTERFUNCTION_H 00006 #define ENTERFUNCTION_H 00007 00008 #include "X3DActiveFunction.h" 00009 #include "X3DTypes.h" 00010 00011 namespace X3DTK { 00012 00013 class X3DComponentVisitor; 00015 typedef void (X3DComponentVisitor::* ptrToEnterFunction)(SFAbstractNode) const; 00016 00018 00019 class EnterFunction : public X3DActiveFunction 00020 { 00021 public: 00023 EnterFunction(const ptrToEnterFunction enter, const X3DComponentVisitor *component); 00025 ~EnterFunction(); 00026 00028 inline void enter(SFAbstractNode N) const {(component_->*ptr2enter_)(N);}; 00029 00030 private: 00031 const ptrToEnterFunction ptr2enter_; 00032 const X3DComponentVisitor *component_; 00033 }; 00034 00035 } 00036 00037 #endif