Dynamic Plugins - CVARREG (class)

CVARREG acts as a registry. It allows Hackman to register variables with CVARREG. This allows the variables to be passed to the plugins. In order to keep track of the variables, a string is "binded" to that variable. This string, then allows the programmer to reference the desired variable with the string that it was binded to. Here is an example: CVARREG contains the following functions:

Function Explanation
GetLong(LPSTR) Receives: the binded string of a long, returns the value of the long.
GetInt(LPSTR) Receives: the binded string of an integer, returns the value of the integer.
GetString(LPSTR) Receives: the binded string of a string, returns the string.
GetDbl(LPSTR) Receives: the binded string of a double, returns the value of the double.
GetFunc(LPSTR) Receives: the binded string of a function, returns a pointer to the function.
BindLong(long,LPSTR) Receives a long and a bind string. Binds the string to the long.
BindInt(int,LPSTR) Receives a int and a bind string. Binds the string to the int.
BindString(int,LPSTR) Receives a string and a bind string. Binds the string to the string.
BindFunc(int,LPSTR) Receives a function and a bind string. Binds the string to the function.

Example:

int		cursorposition;
int		a;
CVARBINDS	myCvar;

myCvar.BindInt(cursorposition,"HM_CURSORPOSITION");
//binds cursorposition a=myCvar.GetInt("HM_CURSORPOSITION");
//gets the value of cursorposition, by referencing the binded string.

Back.