X3DSFNodeFunctor.h

Go to the documentation of this file.
00001 #ifndef X3DTK_X3DSFNODEFUNCTOR_H
00002 #define X3DTK_X3DSFNODEFUNCTOR_H
00003 
00004 namespace X3DTK {
00005 
00006 class X3DAbstractNode;
00007 
00008 class X3DSFNodeFunctor
00009 {
00010 public:
00011   virtual X3DAbstractNode *getNode(X3DAbstractNode const *N) = 0;
00012   virtual bool setNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
00013   virtual bool removeNode(X3DAbstractNode *N, X3DAbstractNode *C) = 0;
00014   virtual void removeThisNode(X3DAbstractNode *N) = 0;
00015 };
00016 
00017 template<class T, class V>
00018 class SFNodeFunctor : public X3DSFNodeFunctor
00019 {
00020 public:
00021   SFNodeFunctor(V *T:: *node);
00022   
00023   X3DAbstractNode *getNode(X3DAbstractNode const *N);
00024   bool setNode(X3DAbstractNode *N, X3DAbstractNode *C);
00025   bool removeNode(X3DAbstractNode *N, X3DAbstractNode *C);
00026   void removeThisNode(X3DAbstractNode *N);
00027   
00028 private:
00029   V *T::*_node;
00030 };
00031 
00032 }
00033 
00034 #include "X3DSFNodeFunctor.inl"
00035 
00036 #endif

Generated on Fri Aug 27 13:16:23 2004 for X3DToolKit by doxygen 1.3.6