AURobotServers
4
|
#include <uvarmethod.h>
Public Member Functions | |
void | deleteMethod () |
bool | methodCall (const double *paramDouble, char **paramStr, double *returnValue, UDataBase **returnStruct=NULL, int *returnStructCnt=NULL) |
bool | methodCallV (UVariable *params[], UDataBase **returnStruct, int *returnStructCnt) |
void | setMethod (UVarMethodImplement *implementor, const char *formalName, const char *paramsList, const char *comment) |
void | setMethodV (UVarMethodImplement *implementor, const char *formalName, const char *paramsList, const char *comment) |
UVarMethod () | |
bool | valid () |
Public Attributes | |
const char * | description |
UVarMethodImplement * | implementedBy |
char | name [MAX_VAR_NAME_SIZE+1] |
char | paramOrder [MAX_PARAM_COUNT+1] |
A variable for the calculator
UVarMethod::UVarMethod | ( | ) |
Constructor
void UVarMethod::deleteMethod | ( | ) |
Mark this method as deleted (zero length name)
Referenced by UVarPool::deleteMethod(), and UVarPool::deleteMethods().
bool UVarMethod::methodCall | ( | const double * | paramDouble, |
char ** | paramStr, | ||
double * | returnValue, | ||
UDataBase ** | returnStruct = NULL , |
||
int * | returnStructCnt = NULL |
||
) |
Call the specified method. May return struct values in the 'returnStruct' pointer list (when the pointer list is not NULL), and in this case the 'returnStructCnt' is set to the maximum number of pointers available and should be modified to the number of valid pointers returned. The method should return true if the method exist (with this parameter list)
Referenced by UVarPool::callLocal().
bool UVarMethod::methodCallV | ( | UVariable * | params[], |
UDataBase ** | returnStruct, | ||
int * | returnStructCnt | ||
) |
Call a method using UVariable parameters and result
References UVariable::getValueBuffer(), MAX_PARAM_COUNT, and UVariable::setValued().
Referenced by UVarPool::callLocalV().
void UVarMethod::setMethod | ( | UVarMethodImplement * | implementor, |
const char * | formalName, | ||
const char * | paramsList, | ||
const char * | comment | ||
) |
Add new method call - using double array and string array parameters
implementor | a pointer to the resource with an implementor |
formalName | name of the function |
paramsList | is a string with the parameter types e.g. "dds" for two double typed and a string. |
comment | a constant (static) string, where the method cam find some help or description |
References MAX_PARAM_COUNT, and MAX_VAR_NAME_SIZE.
Referenced by UVarPool::addMethod().
void UVarMethod::setMethodV | ( | UVarMethodImplement * | implementor, |
const char * | formalName, | ||
const char * | paramsList, | ||
const char * | comment | ||
) |
Add new method call - using UVariable parameters
implementor | a pointer to the resource with an implementor |
formalName | name of the function |
paramsList | is a string with the parameter types e.g. "dds" for two double typed and a string. |
comment | a constant (static) string, where the method cam find some help or description |
References MAX_PARAM_COUNT, and MAX_VAR_NAME_SIZE.
Referenced by UVarPool::addMethodV().
|
inline |
const char* UVarMethod::description |
Description of the function
Referenced by UFunctionVarPool::sendVarList(), and UQtgui::setStruct().
UVarMethodImplement* UVarMethod::implementedBy |
Pointer to a class that evaluates the var-pool function
Referenced by UVarPool::deleteMethods().
char UVarMethod::name[MAX_VAR_NAME_SIZE+1] |
Name of variable
Referenced by UVarPool::getLocalMethod(), UVarPool::getLocalMethodIdx(), UFunctionVarPool::sendVarList(), and UQStandardItem::UQStandardItem().
char UVarMethod::paramOrder[MAX_PARAM_COUNT+1] |
Number and type of parameters, e.g. 'sdd' for one string then 2 times double
Referenced by UVarPool::getLocalMethod(), UVarPool::getLocalMethodIdx(), UFunctionVarPool::sendVarList(), and UQtgui::setStruct().