/******************************************************************** created: 2008/05/27 created: 27:5:2008 10:08 filename: d:\Projects\ServiceSpace\ServiceSpace\ServiceSpaceLib\utilib\function_map.h file path: d:\Projects\ServiceSpace\ServiceSpace\ServiceSpaceLib\utilib file base: function_map file ext: h author: purpose: 提供普通函数/成员函数基于索引策略的访问机制 *********************************************************************/ #ifndef __UTILIB_FUN_MAP_H__ #define __UTILIB_FUN_MAP_H__ #include #include "functor.h" #include "is_mem_fun.h" namespace utilib { namespace _internal { template, class Allocator = std::allocator >, bool IsMemFun = false > class function_map_base; template class function_map_base : public std::map { typedef std::map base; public: typedef Fun * function_type; }; template class function_map_base : public std::map, Less, Allocator> { typedef std::map, Less, Allocator> base; public: typedef functor function_type; }; } // namespace _internal template, class Allocator = std::allocator > > class function_map : public _internal::function_map_base::result> { }; // class function_map } #endif