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-04-06 14:13:36 +0000
committerStijn Buys <ingar@osirion.org>2008-04-06 14:13:36 +0000
commit7b5a6b820d5acef36d402bd5a52d783ec68d33c7 (patch)
treea1cb65e071441277865ca5f4e315611cdd51c0e5 /src/core/func.h
parent25d2c764443723eb7a3dd5f8bf0b76586c1ff10b (diff)
mouse grabbing, Cvar and Func info
Diffstat (limited to 'src/core/func.h')
-rw-r--r--src/core/func.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/func.h b/src/core/func.h
index e34e32d..2c02599 100644
--- a/src/core/func.h
+++ b/src/core/func.h
@@ -30,7 +30,7 @@ public:
enum Flags {Game=1};
/// create a new function
- Func(char const * funcname, void *ptr, unsigned int funcflags = 0);
+ Func(char const * name, void *ptr, unsigned int flags = 0);
~Func();
@@ -42,8 +42,14 @@ public:
/// returns the name of the function
inline std::string const &name() const { return func_name; }
+ /// returns the info of the function
+ inline std::string const &info() { return func_info; }
+
/*----- mutators -------------------------------------------------- */
+ /// set the info string
+ void set_info(const char *);
+
/// execute the function if the Game flag is not set
void exec(std::string const &args);
@@ -53,10 +59,10 @@ public:
/* ---- Static functions for the Func registry -------------------- */
/// add a function to the registry
- static void add(const char *name, FuncPtr functionptr, unsigned int flags=0);
+ static Func *add(const char *name, FuncPtr functionptr, unsigned int flags=0);
/// add a game function to the registry and set the Game flag
- static void add(const char *name, GameFuncPtr functionptr, unsigned int flags=0);
+ static Func *add(const char *name, GameFuncPtr functionptr, unsigned int flags=0);
/// remove a function from the registry
static void remove(const char *name);
@@ -75,6 +81,7 @@ public:
private:
std::string func_name;
+ std::string func_info;
unsigned int func_flags;
void *func_ptr;
};