AURobotServers  4
Public Member Functions | Public Attributes | List of all members
UVarMethod Class Reference

#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
 
UVarMethodImplementimplementedBy
 
char name [MAX_VAR_NAME_SIZE+1]
 
char paramOrder [MAX_PARAM_COUNT+1]
 

Detailed Description

A variable for the calculator

Constructor & Destructor Documentation

UVarMethod::UVarMethod ( )

Constructor

Member Function Documentation

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

Parameters
implementora pointer to the resource with an implementor
formalNamename of the function
paramsListis a string with the parameter types e.g. "dds" for two double typed and a string.
commenta 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

Parameters
implementora pointer to the resource with an implementor
formalNamename of the function
paramsListis a string with the parameter types e.g. "dds" for two double typed and a string.
commenta 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().

bool UVarMethod::valid ( )
inline

Is the method valid.

Returns
true if valid

Referenced by UFunctionVarPool::sendVarList().

Member Data Documentation

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]
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().


The documentation for this class was generated from the following files: