diff options
Diffstat (limited to 'src/core/func.cc')
-rw-r--r-- | src/core/func.cc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/core/func.cc b/src/core/func.cc new file mode 100644 index 0000000..6ffc20e --- /dev/null +++ b/src/core/func.cc @@ -0,0 +1,32 @@ +/* + 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 <map> + +namespace core { + +namespace func { + + std::map<std::string, Func> functionmap; + + void add(const char * functionname, Func functionptr) + { + functionmap[std::string(functionname)] = functionptr; + } + + void remove(std:: string functionname) + { + functionmap.erase(std::string(functionname)); + } + + Func find(std::string functionname) + { + return functionmap[functionname]; + } +} + +} |