Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

X3D_X3DComponentCreator.h

Go to the documentation of this file.
00001 
00002 //                            X3D_X3DComponentCreator.h                       //
00004 
00005 #ifndef X3DCOMPONENTCREATOR_H
00006 #define X3DCOMPONENTCREATOR_H
00007 
00008 #include "X3DComponent.h"
00009 #include "X3D_CreationFunction.h"
00010 
00011 namespace X3DTK {
00012 namespace X3D {
00013 
00015 
00016 class X3DComponentCreator : public X3DComponent
00017 {
00018 public:
00020   X3DComponentCreator();
00022   virtual ~X3DComponentCreator() = 0;
00023   
00025   CreationFunction *getCreationFunctionOf(const SFString &name) const;
00027   inline CreationDict getCreationDict() const {return _creationDict;};
00028   
00030   bool contains(const SFString &name) const;
00031   
00032 protected:
00034   template<class T>
00035   inline void defineNode();
00036 
00037 private:
00038   template<class T>
00039   inline SFNode create() const;
00040   
00042   template<class T, class C> 
00043   void defineCreationFunction(SFNode (C::*ptrF)() const);
00044 
00045   CreationDict _creationDict;
00046 };
00047 
00048 }
00049 }
00050 
00051 #include "X3D_X3DComponentCreator.inl"
00052 
00053 #endif

Generated on Mon Jan 19 10:32:07 2004 for X3DToolKit by doxygen1.2.18