X3DMFNodeFunctor.h

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

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