/* core/func.cc This file is part of the Osirion project and is distributed under the terms of the GNU General Public License version 2 */ #include "core/func.h" #include #include namespace core { namespace func { std::map registry; void add(const char * functionname, Func functionptr) { registry[std::string(functionname)] = functionptr; } void remove(const char *functionname) { registry.erase(std::string(functionname)); } void remove(const std::string &functionname) { registry.erase(functionname); } Func find(const std::string &functionname) { return registry[functionname]; } } // namespace func } // namespace core