
A2.2 Ox function summary 23
bool FOxGetDataMember(OxVALUE *pvClass, const char *sMember,
OxVALUE *rtn);
pvClass in: the object from which to get a data member, must be of type
OX
CLASS
sMember in: name of the data member
rtn out: receives the return value of the function call
Return value
TRUE if the function is called successfully, FALSE otherwise.
Description
Gets a data member from an object. The returned value is for reference only, and
should not be changed, and should only be used for temporary reference.
FOxLibAddFunction
bool FOxLibAddFunction(char *sFunc, OxFUNCP pFunc, bool fVarArg);
sFunc in: string describing function
pFunc in: pointer to C function to install
fVarArg in: TRUE: has variable argument list
Return value
TRUE if function installed successfully, FALSE otherwise.
Description
OxFUNCP is a pointer to a function declared as:
void OXCALL Func(OxVALUE *rtn, OxVALUE *pv, int cArg);
The syntax of sFunc is:
arg
types$function name\0
arg
types is a c (indicating a const argument) or a space, with one entry for each
declared argument.
This function links in C library functions statically, e.g. for part of the drawing
library:
FOxLibAddFunction("cccc$Draw", fnDraw, 0);
FOxLibAddFunction("ccccc$DrawT", fnDrawT, 0);
FOxLibAddFunction("ccc$DrawX", fnDrawX, 0);
FOxLibAddFunction("ccccc$DrawMatrix", fnDrawMatrix, 1);
FOxLibAddFunction("cccccc$DrawTMatrix", fnDrawTMatrix, 1);
FOxLibAddFunction("ccccc$DrawXMatrix", fnDrawXMatrix, 1);
This function is not required when using the extern specifier for external link-
ing, as used in most examples in this chapter.
FOxRun
bool FOxRun(int iMainIP, char *sFunc);
Commentaires sur ces manuels