00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef HxSampleFunctorTable_h
00012 #define HxSampleFunctorTable_h
00013
00014 #include "HxString.h"
00015 #include <map>
00016
00017 template <class ArgType, class ResType>
00018 class HxSampleFunctorTem;
00019
00020 template <class ArgType, class ResType>
00021 class HxSampleFunctorTable
00022 {
00023 public:
00024
00025 typedef HxSampleFunctorTem<ArgType, ResType> HxSampleFunctorTem;
00026 typedef std::map<HxString, HxSampleFunctorTem*, std::less<HxString> > Map;
00027
00028 static HxSampleFunctorTable* instance();
00029 void insert(HxString name, HxSampleFunctorTem* sf);
00030 void erase(HxString name);
00031 HxSampleFunctorTem* find(HxString name);
00032
00033 protected:
00034 HxSampleFunctorTable();
00035 HxSampleFunctorTable(const HxSampleFunctorTable&);
00036
00037 private:
00038 static HxSampleFunctorTable<ArgType, ResType>* _instance;
00039 static Map* _map;
00040 };
00041
00042 #ifdef INC_TEMPLATE_SRC
00043 #ifdef HX_EXPORT_TEMPLATE
00044 #include "HxSampleFunctorTable.c"
00045 #endif
00046 #endif
00047
00048 #endif