Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-04 18:42:05 +0000
committerStijn Buys <ingar@osirion.org>2008-02-04 18:42:05 +0000
commit151a2ac2434f4b4c23c107d9c21e4a18dd1a3c68 (patch)
tree18154b52b44327de28d82ff187f25c8369ddc5d9 /src/core/func.h
parent09fb43f3d36847977ac202c10c5a11f34af03a43 (diff)
converted client:: singleton classes to namespaces
Diffstat (limited to 'src/core/func.h')
-rw-r--r--src/core/func.h23
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__