From b4973888aeaea2dde6058bc06c3f6631349e7f3c Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 3 Feb 2008 01:43:03 +0000 Subject: command buffer handling engine function parsing buffered client console --- src/core/func.cc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/core/func.cc (limited to 'src/core/func.cc') 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 + +namespace core { + +namespace func { + + std::map 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]; + } +} + +} -- cgit v1.2.3