00001 00002 #ifndef __geometry_creator_hpp__ 00003 #define __geometry_creator_hpp__ 00004 00005 #include <vector> 00006 00007 #include <crbn/basic/basic.h> 00008 #include <crbn/basic/paramlist.hpp> 00009 00010 #include <crbn/geometry/geometry.hpp> 00011 00012 #include <crbn/geometry/gmod.h> 00013 00014 typedef struct _gmod_entry { 00015 void* handle; 00016 char* name; 00017 GMOD_CREATE_PL_FUNC create_pl; 00018 GMOD_CREATE_FP_FUNC create_fp; 00019 } gmod_entry; 00020 00021 typedef struct _gc_entry { 00022 Geometry* geometry; 00023 char* module; 00024 } gc_entry; 00025 00026 class gCreator 00027 { 00028 public: 00029 gCreator(); 00030 ~gCreator(); 00031 00032 char* last_module_called() { return _last_module_called; } 00033 00034 void clear(); 00035 00036 Geometry* create( char* object_type, paramlist& pl ); 00037 Geometry* create( char* object_type, FILE* fp ); 00038 00039 private: 00040 char* _last_module_called; 00041 std::vector<gmod_entry*> _mod_list; 00042 }; 00043 00044 #endif // __geometry_creator_hpp__