diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-03 01:43:03 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-03 01:43:03 +0000 |
commit | b4973888aeaea2dde6058bc06c3f6631349e7f3c (patch) | |
tree | 010de10692b330d7634ad3090fb94d14c101f484 /src/core/func.cc | |
parent | 67f8a7a783e550cab8e6a77d997b31815ee8cd7e (diff) |
command buffer handling
engine function parsing
buffered client console
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]; + } +} + +} |