diff options
Diffstat (limited to 'src/core/func.h')
| -rw-r--r-- | src/core/func.h | 23 | 
1 files changed, 15 insertions, 8 deletions
| diff --git a/src/core/func.h b/src/core/func.h index 901490e..b3d446f 100644 --- a/src/core/func.h +++ b/src/core/func.h @@ -1,5 +1,5 @@  /* -   core/core.h +   core/funct.h     This file is part of the Osirion project and is distributed under      the terms of the GNU General Public License version 2   */ @@ -10,19 +10,26 @@  #include <sstream>  namespace core { -	/// function pointer type -	typedef void (* Func)(std::stringstream &args); -	/// register a function pointer -	void func_register(const char *functionname, Func functionptr); +/// function pointer type +typedef void (* Func)(std::stringstream &args); -	/// unregister a function pointer -	void func_unregister(std:: string functionname); +/// the function registry +namespace func  +{ +	/// add a function to the registry +	void add(const char *functionname, Func functionptr); + +	/// remove a function from the registry +	void remove(const char *functionname); +	void remove(const std::string &functionname);  	/// find a fuction pointer  	/** Returns 0 if the function pointer could not be found   	 */ -	Func func_find(std::string functionname); +	Func find(const std::string &functionname); +} +  }  #endif // __INCLUDED_CORE_FUNC_H__ | 
