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.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/core/func.h (limited to 'src/core/func.h') diff --git a/src/core/func.h b/src/core/func.h new file mode 100644 index 0000000..9d9f352 --- /dev/null +++ b/src/core/func.h @@ -0,0 +1,30 @@ +/* + core/core.h + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 +*/ + +#ifndef __INCLUDED_CORE_FUNC_H__ +#define __INCLUDED_CORE_FUNC_H__ + +#include + +namespace core { + +/// engine functions registry +namespace func { + typedef void (* Func)(std::stringstream &args); + + /// register a function pointer + void add(const char *functionname, Func functionptr); + + /// unregister a function pointer + void remove(std:: string functionname); + + /// find a fuction + Func find(std::string functionname); +} + +} + +#endif // __INCLUDED_CORE_FUNC_H__ -- cgit v1.2.3