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