AURobotServers  4
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
UVarPool Class Reference

#include <uvarpool.h>

Inheritance diagram for UVarPool:
Inheritance graph

Public Member Functions

int addMethod (UVarMethodImplement *implementor, const char *formalName, const char *paramTypes, const char *comment)
 
int addMethodV (UVarMethodImplement *implementor, const char *formalName, const char *paramTypes, const char *comment)
 
int addStruct (const char *name, UVarPool *varStruct)
 
int addStructLink (const char *name, UVarPool *toVarStruct)
 Add a link to another place in the var tree but do not change anything in the linked structure. More...
 
UVarPooladdStructLocal (const char *name, const char *note, bool copy)
 
UVariableaddVar (const char *name, const double initialValue, const char *type, const char *comment)
 
UVariableaddVar (const char *name, const double initialValue, UVariable::varType type, const char *comment, const char *attValue=NULL)
 
UVariableaddVar (const char *name, const UVariable *source, const char *comment)
 
UVariableaddVar (const char *name, const char *comment)
 
UVariableaddVarA (const char *name, const char *attValue, const char *type, const char *comment)
 
bool callGlobal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 Call a method in the root var pool. It may be in this structure or in any sub-structure that the 'name' indicate. More...
 
bool callGlobalV (const char *name, const char *paramOrder, UVariable **params, UDataBase **returnStruct, int *returnStructCnt)
 Call a method from the root var pool scope It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More...
 
bool callLocal (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 Call a method in this var pool. It may be in this structure or in any sub-structure that the 'name' indicate. More...
 
bool callLocalV (const char *name, const char *paramOrder, UVariable *params[], UDataBase **returnStruct, int *returnStructCnt)
 Call a method in this var pool (using UVariable parameters). It may be in this structure or in any sub-structure that the 'name' indicate. More...
 
bool callScope (const char *name, const char *paramOrder, char **strings, const double *doubles, double *value, UDataBase **returnStruct, int *returnStructCnt)
 Call a method in this scope, i.e. try if it fits a call in any of the parent var pools. It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More...
 
bool callScopeV (const char *name, const char *paramOrder, UVariable **params, UDataBase **returnStruct, int *returnStructCnt)
 Call a method in this scope - using UVariable parameters, i.e. try if it fits a call in any of the parent var pools. It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate. More...
 
bool createVarSpace (const int varCnt, const int structCnt, const int methCnt, const char *note, bool copy)
 
void deleteAll ()
 
void deleteMethod (const char *name, const char *paramStr)
 
void deleteMethods (UVarMethodImplement *owner)
 
void deleteStruct (const char *name)
 
const char * getDescription ()
 
const char * getFullPreName (char *name, const int MNL)
 
const char * getFullPreName ()
 
bool getGlobalString (const char *name, const char **value)
 
bool getGlobalValue (const char *name, double *value)
 
bool getGlobalValue (const char *name, bool *value)
 
bool getGlobalValue (const char *name, UTime *value)
 
UVariablegetGlobalVariable (const char *name, int *element=NULL)
 get pointer to variable object NB! the returned pointer may be ilegal if module that owns the variable is unloaded so it must be used only while executing one command in main server core thread, if needed in a thread - like the sequencer, then get the value only - getValue(). More...
 
UVarMethodgetLocalMethod (const char *name, const char *paramList)
 
UVarPoolgetLocalMethod (const char *name, const char *paramList, UVarMethod **method)
 
UVarMethodgetLocalMethod (const int index)
 
int getLocalMethodIdx (const char *name, const char *paramList)
 Get index of this method in this var pool. More...
 
double getLocalValue (int idx, int element=0)
 
bool getLocalValue (const char *name, double *value)
 
bool getLocalValue (const char *name, bool *value)
 
bool getLocalValue (const char *name, UTime *value)
 
UPosition getLocalValue3D (int idx)
 
UPosRot getLocalValue6D (int idx)
 
bool getLocalValueBool (int idx)
 
int getLocalValueInt (int idx)
 
UPose getLocalValuePose (int idx)
 
URotation getLocalValueRot (int idx)
 
UTime getLocalValueTime (int idx)
 
UVariablegetLocalVar (int index)
 
UVariablegetLocalVariable (const char *name, int *element)
 get pointer to variable object in this variable tree More...
 
int getLocalVarIndex (const char *name, int *element)
 
ULogFilegetLogVar ()
 
ULockgetLogVarLock ()
 
int getMethodCnt ()
 
int getMethodMax ()
 
UVarPoolgetParentVarPool ()
 
UVarPoolgetParentVarPoolScope ()
 
const char * getPreName ()
 
UVarPoolgetRootVarPool ()
 
bool getScopeValue (const char *name, double *value)
 
UVarPoolgetStruct (const char *name)
 
UVarPoolgetStruct (const int idx)
 
int getStructCnt ()
 
UVarPoolgetStructDeep (const char *fullName, char *varName, const int varNameCnt)
 
UVarPoolgetStructDeep (const char *fullName, const bool mayAdd, char *varName, const int varNameCnt)
 
int getStructIdx (const char *name)
 
int getStructMax ()
 
const char * getVarDescription (int idx)
 
int getVarMax ()
 
char * getVarName (int index)
 
UVariable ** getVars ()
 
int getVarsCnt ()
 
bool isLogfileOpen ()
 
bool isVarPoolVerbose ()
 
void listVars (const char *preStr, char *buff, const int buffCnt, bool andStructs)
 
void setDescription (const char *note, bool copy)
 
bool setGlobalVar (const char *name, const double value, bool mayAdd)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar (const int index, const double value, const int element)
 
bool setLocalVar (const int index, UVariable *value)
 
bool setLocalVar (const char *name, const double value, bool mayAdd, UVariable::varType vartyp, const char *attValue=NULL)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar (const char *name, const char *value, bool mayAdd, const char *vartyp, UTime *updTime=NULL, bool *added=NULL)
 Assigns a value to a variable. The variable may be a part of a structure. More...
 
bool setLocalVar3D (int idx, UPosition *value)
 
bool setLocalVar6D (int idx, UPosRot *value)
 
bool setLocalVarAdd (const int index, const double value, const int element)
 
bool setLocalVarPose (int idx, UPose *value)
 
bool setLocalVarRot (int idx, URotation *value)
 
void setLogfile (ULogFile *fileHandle, ULock *fileLock)
 
void setParentVarPool (UVarPool *parent)
 
void setParentVarPoolScope (UVarPool *parent)
 
bool setPreName (const char *name)
 
bool setScopeVar (const char *name, const double value, bool mayAdd)
 
bool setScopeVar (const char *name, const UVariable *source, bool mayAdd)
 
void setVerbose (bool value)
 
 UVarPool ()
 
virtual ~UVarPool ()
 
- Public Member Functions inherited from ULock
bool lock ()
 
void lockInit ()
 
void post ()
 
bool tryLock ()
 
bool tryWait ()
 
 ULock ()
 
void unlock ()
 
bool wait ()
 
 ~ULock ()
 
- Public Member Functions inherited from UServerPush
int addPushCommand (UServerInMsg *msg)
 
virtual void callGotNewDataWithObject ()
 
bool doPushCall (UServerPushElement *pe, const char *value)
 
void flushClientCmds (int clientIdx)
 
UServerPushImplementgetImplementor ()
 
int getPushCmdCnt (int *cmdCnt, int *callCnt)
 
UServerPushQueuegetPushQueue ()
 
bool gotCmdExe ()
 
void gotNewData (void *pData)
 
bool isUpdated (int lastCnt, int *newCnt)
 
bool needNewData ()
 
void print (const char *preString)
 
void print (const char *preString, char *buff, int buffCnt)
 
void servicePendingPushCmds ()
 
void setCmdExe (UServerPushImplement *executor)
 
void setImplementor (UServerPushImplement *executor)
 
bool setResource (UResBase *resource, bool remove)
 
bool setUpdated (const char *value)
 Add watch object if needed. An image or other object is updated. set object as updated, with an extra qualifier, that may be used as a parameter in a push call. this push list is then added to the to the push list examined by the server thread. when server thread reach this push list it will call to get a possible associated data structure by a call to needNewData() whish is expected to call gotNewData(void * data_structure) - but now in the server thread. More...
 
 UServerPush ()
 
virtual ~UServerPush ()
 

Protected Member Functions

bool createFunctionStack (const int maxCount)
 
bool createVarPoolStack (const int maxCount)
 
bool createVarStack (const int maxCount)
 
virtual bool evaluateSystemFunction (const char *name, const double pars[], int parsCnt, double *value, bool syntaxCheck)
 

Protected Attributes

const char * description
 
ULogFilelogVar
 
ULocklogVarLock
 
UVarPool ** varPools
 
bool * varPoolsLocal
 
bool verbose
 

Private Attributes

char * descriptionCopy
 
UVarMethodmeths
 
int methsCnt
 
int methsMaxCnt
 
UVarPoolparentVarPool
 
UVarPoolparentVarPoolScope
 
char preName [MAX_VAR_NAME_SIZE]
 
char preNameFull [MAX_VAR_NAME_SIZE *MAX_STRUCT_NAMES]
 
int varPoolsCnt
 
int varPoolsMaxCnt
 
UVariable ** vars
 
int varsCnt
 
int varsMaxCnt
 

Detailed Description

This structure holds access to variables and functions. Variables can be either in this class or in a list of pointers to other instances of this class. In the end the value should be evaluated to a double. The lock is to protect pointers and values during access an var-space search. The Push class is to enable command execution on variable update.

Author
Christian jca@o.nosp@m.erst.nosp@m.ed.dt.nosp@m.u.dk

Constructor & Destructor Documentation

UVarPool::UVarPool ( )
UVarPool::~UVarPool ( )
virtual

Destructor

References deleteAll(), descriptionCopy, meths, varPools, varPoolsLocal, and vars.

Member Function Documentation

int UVarPool::addMethod ( UVarMethodImplement implementor,
const char *  formalName,
const char *  paramTypes,
const char *  comment 
)

Add a method to this local var pool, and implemented by this implementor. the function uses double array and string array to hold parameters (deprecated)

Parameters
implementoris a pointer to a class that has a UVarMethodImplement ansestor
nameof method to add - may be in a sub-structure using a '.' notation
paramTypesis a string with the parameter types (string (s) or double (d).
commentis intended as an online help description
Returns
an index to the method

References addMethod(), createFunctionStack(), getLocalMethod(), getStructDeep(), MAX_VAR_NAME_SIZE, meths, methsCnt, methsMaxCnt, and UVarMethod::setMethod().

Referenced by UResVarPool::addMethod(), addMethod(), UResCamIf::createBaseVar(), UResLaserIf::createBaseVar(), UResLaserIfRoad::createBaseVar(), UMisRuleState::createBaseVar(), and getMethodMax().

int UVarPool::addMethodV ( UVarMethodImplement implementor,
const char *  formalName,
const char *  paramTypes,
const char *  comment 
)

Add a method to this local var pool, and implemented by this implementor. The method is of the type that acceps parameters of the UVariable type.

Parameters
implementoris a pointer to a class that has a UVarMethodImplement ansestor
nameof method to add - may be in a sub-structure using a '.' notation
paramTypesis a string with the parameter types (string (s) or double (d).
commentis intended as an online help description
Returns
an index to the method

References addMethodV(), createFunctionStack(), getLocalMethod(), getStructDeep(), MAX_VAR_NAME_SIZE, meths, methsCnt, methsMaxCnt, and UVarMethod::setMethodV().

Referenced by UResRuleState::addMathMethods(), UResVarPool::addMethodV(), addMethodV(), UMisRuleState::createBaseVar(), UResRuleState::createBaseVar(), and getMethodMax().

int UVarPool::addStruct ( const char *  name,
UVarPool varStruct 
)
int UVarPool::addStructLink ( const char *  name,
UVarPool toVarStruct 
)

Add a link to another place in the var tree but do not change anything in the linked structure.

Parameters
namenew name to call the structure
toVarStructpointer to the existing var structure
Returns
the index to the link

References createVarPoolStack(), getStruct(), maxi(), UServerPush::setUpdated(), varPools, varPoolsCnt, varPoolsLocal, and varPoolsMaxCnt.

UVarPool * UVarPool::addStructLocal ( const char *  name,
const char *  note,
bool  copy 
)

Add a new local (empty) structure. A description may be added to this variable structure (including methods)

Parameters
nameis the new name of the struct.
noteis a description of the structure
copy- set to true if description is not available as static value - then pace for a copy of the string is allocated on heap.
Returns
a pointer to the new structure or NULL if no space

References createVarPoolStack(), createVarSpace(), getStruct(), maxi(), setParentVarPool(), setPreName(), UServerPush::setUpdated(), UVarPool(), varPools, varPoolsCnt, varPoolsLocal, and varPoolsMaxCnt.

Referenced by UNamedBoxes::addBox(), UResRuleState::addMathMethods(), UResVarPool::addStruct(), UResCamIfGmk::createBaseVar(), getMethodMax(), getStructDeep(), UResCamIfCam::gotNewData(), and UFunctionCamGmk::handleGmkGetCommand().

UVariable * UVarPool::addVar ( const char *  name,
const double  initialValue,
const char *  type,
const char *  comment 
)
UVariable * UVarPool::addVar ( const char *  name,
const double  initialValue,
UVariable::varType  type,
const char *  comment,
const char *  attValue = NULL 
)

Add a symbol to to the symbol stack (if not there already). The comment is intended as an online help for this variable.

Parameters
nameis the new name to be added
initialValueis the (initial) value to be assigned to the variable
typeis the data type - enumerated
commentis a pointer to a static instance of a string describing the variable
attValueis a string representation of the value(s), if NULL, then value is in initialValue the new variable (may be an existing with the same name)
Returns
NULL if failed

References addVar(), UVariable::isDouble(), UVariable::isString(), UVariable::setType(), UVariable::setValued(), and UVariable::setValues().

UVariable * UVarPool::addVar ( const char *  name,
const UVariable source,
const char *  comment 
)

Add a symbol to to the symbol stack (if not there already). The comment is the online help for this variable.

Parameters
nameis the new name to be added
sourceis the variable to be used as source
commentis a pointer to a static instance of a string describing the variable the new variable (or an existing with the same name).
Returns
NULL if failed

References addVar(), createVarStack(), UVariable::description, getLocalVariable(), getStructDeep(), MAX_VAR_NAME_SIZE, UVariable::setName(), UVariable::setParent(), UVariable::setValue(), vars, varsCnt, and varsMaxCnt.

UVariable* UVarPool::addVar ( const char *  name,
const char *  comment 
)

Add a symbol to to the symbol stack (if not there already). No value nor variable type is set. The comment is the online help for this variable.

Parameters
nameis the new name to be added, if name has a '.' then a structure is created
commentis a pointer to a static instance of a string describing the variable the variable with name and comment set, returns NULL is not created
UVariable * UVarPool::addVarA ( const char *  name,
const char *  attValue,
const char *  type,
const char *  comment 
)

Add an array (double array or string) symbol to the symbol stack. The comment is the online help for this variable.

Parameters
nameis the new name to be added
attValueis a string representation of the value(s)
typeis a character version of the data type
commentis a pointer to a static instance of a string describing the variable the new variable (may be an existing with the same name).
Returns
NULL if failed

References addVar(), UVariable::b, UVariable::d, UVariable::none, UVariable::s, and UVariable::typeFromChar().

Referenced by UResVarPool::addVar(), UKeepItem::createBaseVar(), UResAvoid::createBaseVar(), UFakeDevice::createBaseVars(), ULaserDevice::createBaseVars(), UNamedBox::createGlobalVariables(), UImgPush::createLocalVariables(), UCamRad::createVars(), UCamMounted::createVars(), UCamDevBase::createVars(), UFunctionVarPool::handleVarValues(), setLocalVar(), UCmdExe::sysModuleCmd(), and UCamDevGuppy::~UCamDevGuppy().

bool UVarPool::callGlobal ( const char *  name,
const char *  paramOrder,
char **  strings,
const double *  doubles,
double *  value,
UDataBase **  returnStruct,
int *  returnStructCnt 
)

Call a method in the root var pool. It may be in this structure or in any sub-structure that the 'name' indicate.

Parameters
nameis the name of the method, it may adress a sub structure, e.g. aa.bbbb
paramOrderthe specific parameter order as a string, e.g "sdd" for three parameters the first 's' for string and the two last 'd's for double.
stringsis an array of string pointers. as many of these string pointrs as there is 's' in the stringOrder should be valis and contain the string type parameters.
doublesis an array of doubles of at least the size of the number of 'd' in the paramOrder string.
valueis where the direct return value are placed. It may be a value or a flag (true/false) of the success of the function. This pointer may be NULL.
returnStructis an array of pointers to a datatype compatible with the UDataBase base type. This array pointer may be NULL.
returnStructCntis a pointer to the number of entries in the returnStruct array. When the function returns this number will be modified to the actual number of values returned.
Returns
true if the method exist.

References callScope(), and getRootVarPool().

Referenced by UResVarPool::callGlobal(), UServerPushQueue::doPushCall(), getParentVarPoolScope(), and UKeepItem::monitorTest().

bool UVarPool::callGlobalV ( const char *  name,
const char *  paramOrder,
UVariable **  params,
UDataBase **  returnStruct,
int *  returnStructCnt 
)

Call a method from the root var pool scope It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate.

Parameters
nameis the name of the method, it may adress a sub structure, e.g. aa.bbbb
paramOrderthe specific parameter order as a string, e.g "sdd" for three parameters the first 's' for string and the two last 'd's for double.
paramsis an array of UVariable pointers. with the actual parameters
returnStructis an array of pointers to a datatype compatible with the UDataBase base type. This array pointer may be NULL.
returnStructCntis a pointer to the number of entries in the returnStruct array. When the function returns this number will be modified to the actual number of values returned.
Returns
true if the method exist.

References callScopeV(), and getRootVarPool().

Referenced by getParentVarPoolScope().

bool UVarPool::callLocal ( const char *  name,
const char *  paramOrder,
char **  strings,
const double *  doubles,
double *  value,
UDataBase **  returnStruct,
int *  returnStructCnt 
)

Call a method in this var pool. It may be in this structure or in any sub-structure that the 'name' indicate.

Parameters
nameis the name of the method, it may adress a sub structure, e.g. aa.bbbb
paramOrderthe specific parameter order as a string, e.g "sdd" for three parameters the first 's' for string and the two last 'd's for double.
stringsis an array of string pointers. as many of these string pointrs as there is 's' in the stringOrder should be valis and contain the string type parameters.
doublesis an array of doubles of at least the size of the number of 'd' in the paramOrder string.
valueis where the direct return value are placed. It may be a value or a flag (true/false) of the success of the function. This pointer may be NULL.
returnStructis an array of pointers to a datatype compatible with the UDataBase base type. This array pointer may be NULL.
returnStructCntis a pointer to the number of entries in the returnStruct array. When the function returns this number will be modified to the actual number of values returned.
Returns
true if the method exist.

References getLocalMethod(), and UVarMethod::methodCall().

Referenced by UResVarPool::callLocal(), callScope(), getParentVarPoolScope(), and UVarCalc::getValueAnyD().

bool UVarPool::callLocalV ( const char *  name,
const char *  paramOrder,
UVariable params[],
UDataBase **  returnStruct,
int *  returnStructCnt 
)

Call a method in this var pool (using UVariable parameters). It may be in this structure or in any sub-structure that the 'name' indicate.

Parameters
nameis the name of the method, it may adress a sub structure, e.g. aa.bbbb
paramOrderthe specific parameter order as a string, e.g "sdd" for three parameters the first 's' for string and the two last 'd's for double.
paramsis an array of UVariable pointers - same number as paramOrder string length.
returnStructis an array of pointers to a datatype compatible with the UDataBase base type. This array pointer may be NULL. If NULL, then no return value is returned. Should be at least one element to get a result, first return struccture should be a UVariable, the rest could be data.
returnStructCntis a pointer to the number of entries in the returnStruct array. When the function returns this number will be modified to the actual number of values returned.
Returns
true if the method exist.

References getLocalMethod(), and UVarMethod::methodCallV().

Referenced by callScopeV(), UMisControl::execute(), getParentVarPoolScope(), and UVarCalc::getValueAnyV().

bool UVarPool::callScope ( const char *  name,
const char *  paramOrder,
char **  strings,
const double *  doubles,
double *  value,
UDataBase **  returnStruct,
int *  returnStructCnt 
)

Call a method in this scope, i.e. try if it fits a call in any of the parent var pools. It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate.

Parameters
nameis the name of the method, it may adress a sub structure, e.g. aa.bbbb
paramOrderthe specific parameter order as a string, e.g "sdd" for three parameters the first 's' for string and the two last 'd's for double.
stringsis an array of string pointers. as many of these string pointrs as there is 's' in the stringOrder should be valis and contain the string type parameters.
doublesis an array of doubles of at least the size of the number of 'd' in the paramOrder string.
valueis where the direct return value are placed. It may be a value or a flag (true/false) of the success of the function. This pointer may be NULL.
returnStructis an array of pointers to a datatype compatible with the UDataBase base type. This array pointer may be NULL.
returnStructCntis a pointer to the number of entries in the returnStruct array. When the function returns this number will be modified to the actual number of values returned.
Returns
true if the method exist.

References callLocal(), getParentVarPoolScope(), and getStruct().

Referenced by callGlobal(), and getParentVarPoolScope().

bool UVarPool::callScopeV ( const char *  name,
const char *  paramOrder,
UVariable **  params,
UDataBase **  returnStruct,
int *  returnStructCnt 
)

Call a method in this scope - using UVariable parameters, i.e. try if it fits a call in any of the parent var pools. It may be in the structure direct (no '.') or in any sub-structure that the 'name.subname' indicate.

Parameters
nameis the name of the method, it may adress a sub structure, e.g. aa.bbbb
paramOrderthe specific parameter order as a string, e.g "sdd" for three parameters the first 's' for string and the two last 'd's for double.
paramsis an array of UVariable pointers. with the actual parameters
returnStructis an array of pointers to a datatype compatible with the UDataBase base type. This array pointer may be NULL.
returnStructCntis a pointer to the number of entries in the returnStruct array. When the function returns this number will be modified to the actual number of values returned.
Returns
true if the method exist.

References callLocalV(), getParentVarPoolScope(), and getStruct().

Referenced by UResVarPool::callGlobalV(), callGlobalV(), UMisControl::execute(), getParentVarPoolScope(), UMisRuleState::initCall(), and UMisRuleState::runRuleCommands().

bool UVarPool::createFunctionStack ( const int  maxCount)
protected

Create the stack of references to functions that can be called to evaluate double variables. Returns true if space is allocated for 'maxCount' functions

References ULock::lock(), meths, methsCnt, methsMaxCnt, and ULock::unlock().

Referenced by addMethod(), addMethodV(), createVarSpace(), and getLogVarLock().

bool UVarPool::createVarPoolStack ( const int  maxCount)
protected

Create the stack of references to other var-pools, that from this var-pool is seen as structures, as objects with variables and functions (and possibly other structures). Creates the maximum number of variables ever to be stored in this variable pool.

References ULock::lock(), ULock::unlock(), varPools, varPoolsCnt, varPoolsLocal, and varPoolsMaxCnt.

Referenced by addStruct(), addStructLink(), addStructLocal(), createVarSpace(), and getLogVarLock().

bool UVarPool::createVarSpace ( const int  varCnt,
const int  structCnt,
const int  methCnt,
const char *  note,
bool  copy 
)

Create variable space for simple variables, structures and methods. A descriptive note may be added.

Parameters
varCntis number of variables there should be allocated space fore (initially)
structCntis number of structures there should be allocated space fore initially.
methCntis number of methods there should be allocated space fore initially.
noteis a textual description of this structure.
copymake copy of description, this should be set to true, if note is a local variable in the calling function. A local copy of the note string is then allocated. If note is a static string, then copy should be false. true if reqired space were created, otherwise false.

References createFunctionStack(), createVarPoolStack(), createVarStack(), and setDescription().

Referenced by addStructLocal(), UResVarPool::createVarSpace(), getMethodMax(), and UMisRuleState::setRule().

bool UVarPool::createVarStack ( const int  maxCount)
protected

Create the stack of local variables. Creates the maximum number of variables ever to be stored in this variable pool.

References ULock::lock(), ULock::unlock(), vars, varsCnt, and varsMaxCnt.

Referenced by addVar(), createVarSpace(), and getLogVarLock().

void UVarPool::deleteAll ( )

Delete all variables, sub-structures and methods in this var pool

References methsCnt, varPools, varPoolsCnt, varPoolsLocal, vars, and varsCnt.

Referenced by deleteStruct(), and ~UVarPool().

void UVarPool::deleteMethod ( const char *  name,
const char *  paramStr 
)

Delete the method with this name and parameter list

References UVarMethod::deleteMethod(), getLocalMethodIdx(), meths, and methsCnt.

void UVarPool::deleteMethods ( UVarMethodImplement owner)

Delete all methods in this structure will be called if a resource that owns the variable structure is unloaded

References UVarMethod::deleteMethod(), deleteMethods(), UVarMethod::implementedBy, meths, methsCnt, varPools, and varPoolsCnt.

Referenced by deleteMethods().

void UVarPool::deleteStruct ( const char *  name)
bool UVarPool::evaluateSystemFunction ( const char *  name,
const double  pars[],
int  parsCnt,
double *  value,
bool  syntaxCheck 
)
protectedvirtual

Evaluate system specific functions - that need to know position of planner etc. The called function name is in 'name' the parameters in 'pars' and if the function returns a value it must be put in 'value'

Referenced by getLogVarLock().

const char* UVarPool::getDescription ( )
inline
const char * UVarPool::getFullPreName ( char *  name,
const int  MNL 
)
const char* UVarPool::getFullPreName ( )
inline

Return already compiled full prename

References preNameFull, setLocalVar(), and setLocalVarAdd().

Referenced by getPreName(), UMisRuleState::runLine(), UMisRuleState::runLines(), and setParentVarPool().

bool UVarPool::getGlobalString ( const char *  name,
const char **  value 
)

Get global variable (string) value.

Parameters
nameis the global name of the variable, this may have an index, i.e. core.servername[2], the returned string pointer then points to the third character in the servername.
valueshould be the adress of a const char pointer.
Returns
true if the variable exist and is a string variable.

References getGlobalVariable(), UVariable::getString(), and UVariable::isString().

Referenced by UResVarPool::getGlobalString(), and setLocalVarPose().

bool UVarPool::getGlobalValue ( const char *  name,
double *  value 
)

Get value for the variable with this name Returns true if variable is found, and in this case the value in 'value' (if not NULL)

References getGlobalVariable(), and UVariable::getValued().

Referenced by UResVarPool::getGlobalValue(), getGlobalValue(), and setLocalVarPose().

bool UVarPool::getGlobalValue ( const char *  name,
bool *  value 
)

Get a boolean value for the variable with this name in the global variable tree Returns true if variable is found, and in this case the value in 'value'

References getGlobalValue().

bool UVarPool::getGlobalValue ( const char *  name,
UTime value 
)

Get a time value for the variable with this name in the global variable tree Returns true if variable is found, and in this case returns time in 'value'

References getGlobalValue(), and UTime::setTime().

UVariable * UVarPool::getGlobalVariable ( const char *  name,
int *  element = NULL 
)

get pointer to variable object NB! the returned pointer may be ilegal if module that owns the variable is unloaded so it must be used only while executing one command in main server core thread, if needed in a thread - like the sequencer, then get the value only - getValue().

Parameters
nameis the name of the variable, may include structure name
elementis set to the array element specified in name, or 0 if not array. e.g. set to 3 in name is "imu.rot[3]". Element is set to -1, if name ends with '.sizeof'
Returns
NULL if variable is not found, otherwise a pointer to the variable object

References getLocalVar(), getLocalVarIndex(), getRootVarPool(), getStructDeep(), and MAX_VAR_NAME_SIZE.

Referenced by UFuncTracking::FirstImage(), getGlobalString(), getGlobalValue(), getLogVarLock(), UFunctionVarPool::handleVar(), and UFuncTracking::TrackObjects().

UVarMethod * UVarPool::getLocalMethod ( const char *  name,
const char *  paramList 
)

Get pointer to method in this varPool under this name. returns NULL if not found.

References meths, methsCnt, UVarMethod::name, and UVarMethod::paramOrder.

Referenced by addMethod(), addMethodV(), callLocal(), callLocalV(), getLocalMethod(), UFunctionVarPool::sendVarList(), setGlobalVar(), and UQtgui::setStruct().

UVarPool * UVarPool::getLocalMethod ( const char *  name,
const char *  paramList,
UVarMethod **  method 
)

Get pointer to a method of this name, the method may be in a substructure. If a '.' notation is used, the relevant structure is found first. returns NULL if not found.

References getLocalMethod(), getStructDeep(), and MAX_VAR_NAME_SIZE.

UVarMethod * UVarPool::getLocalMethod ( const int  index)

Get pointer to method with this index. Returns NULL if index is out of range.

References meths, and methsCnt.

int UVarPool::getLocalMethodIdx ( const char *  name,
const char *  paramList 
)

Get index of this method in this var pool.

Parameters
nameis then name (no structs allowed) of the method
paramListstring with type specification of parameters d=double, s=string, c=class
Returns
-1 if not found, else the index [0..] to method

References meths, methsCnt, UVarMethod::name, and UVarMethod::paramOrder.

Referenced by deleteMethod(), and setGlobalVar().

double UVarPool::getLocalValue ( int  idx,
int  element = 0 
)

Get value for this symbol.

Parameters
idxis the index to the variable in this var-pool
elementis the array index, if this is an array, default is first element
Returns
value if the element as double

References UVariable::getValued(), vars, and varsCnt.

Referenced by UResVarPool::getLocalValue(), getLocalValue(), getScopeValue(), UVarCalc::getValueAnyD(), UFunctionDrivePos::handleDrivePos(), setGlobalVar(), setLocalVarPose(), and UResRoadDrive::setTarget().

bool UVarPool::getLocalValue ( const char *  name,
double *  value 
)

Get value when the specified name is relative to the local variable pool.

Parameters
nameis the variable name, e.g. aaa.bbb.c
valueis where the value is retuirned. 'value' may be NULL. if variable do not exist, then nothing is changed.
Returns
true if the value exist.

References UVariable::getElementCnt(), getLocalVariable(), and UVariable::getValued().

bool UVarPool::getLocalValue ( const char *  name,
bool *  value 
)

Get a boolean value for the variable with this name in the local (this) variable tree Returns true if variable is found, and in this case the value in 'value'

References getLocalValue().

bool UVarPool::getLocalValue ( const char *  name,
UTime value 
)

Get a time value for the variable with this name in the local (this) variable tree Returns true if variable is found, and in this case returns time in 'value'

References getLocalValue(), and UTime::setTime().

UPosition UVarPool::getLocalValue3D ( int  idx)

Get 3D position from this variables, assuming variable is an array with at least 3 elements

Parameters
idxis the index of the first variable, assuming the order x,y,z
Returns
result in a UPosition structure

References UVariable::get3D(), and getLocalVar().

Referenced by UResVarPool::getLocalValue3D(), and setGlobalVar().

UPosRot UVarPool::getLocalValue6D ( int  idx)

Get 6D position from 6 variables, starting with this index.

Parameters
idxis the index of the first of 6 variables, assuming the order x,y,z,Omage,Phi,Kappa.
Returns
values in a UPosRot structure

References UVariable::get6D(), and getLocalVar().

Referenced by UResVarPool::getLocalValue6D(), and setLocalVarPose().

bool UVarPool::getLocalValueBool ( int  idx)

Get a boolean value

References UVariable::getValued(), vars, and varsCnt.

Referenced by UResVarPool::getLocalValueBool(), and setGlobalVar().

int UVarPool::getLocalValueInt ( int  idx)

Get local value and return as integer.

References roundi(), vars, and varsCnt.

Referenced by UTermEmulator::addIfButtons(), and setGlobalVar().

UPose UVarPool::getLocalValuePose ( int  idx)

Get 3D position to this variable as an array with 3 elements.

Parameters
idxis the index of the first variable, assuming the order x,y,h
valuea pose with x,y,h
Returns
true if space can be allocated

References getLocalVar(), and UVariable::getPose().

Referenced by setLocalVarPose().

URotation UVarPool::getLocalValueRot ( int  idx)

Get 3D rotation from this variables, assuming variable is an array with at least 3 elements.

Parameters
idxis the index of the first variable, assuming the order x,y,z
Returns
result in a UPosition structure

References getLocalVar(), and UVariable::getRot().

Referenced by setGlobalVar().

UTime UVarPool::getLocalValueTime ( int  idx)

Get the value as time

References UTime::clear(), UTime::setTime(), vars, and varsCnt.

Referenced by UResVarPool::getLocalValueTime(), and setGlobalVar().

UVariable* UVarPool::getLocalVar ( int  index)
inline
UVariable * UVarPool::getLocalVariable ( const char *  name,
int *  element 
)

get pointer to variable object in this variable tree

Parameters
nameis the name of the variable, may include structure name (e.g. aaa.bbb.c)
elementis set to the array element indicated by name (0 if no index specified)
Returns
NULL if variable is not found, otherwise a pointer to the variable object

References getLocalVariable(), getLocalVarIndex(), getStructDeep(), MAX_STRUCT_NAMES, MAX_VAR_NAME_SIZE, mini(), and vars.

Referenced by UTermEmulator::addIfButtons(), addVar(), getLocalValue(), getLocalVariable(), UVarCalc::getValueAnyV(), UVarCalc::getVariableAny(), UVarCalc::getVariableRefAny(), UResIfVar::handleVar(), UFunctionVarPool::handleVarValues(), isLogfileOpen(), setLocalVar(), and setScopeVar().

int UVarPool::getLocalVarIndex ( const char *  name,
int *  element 
)

Get index for variable of this name

Parameters
namename of variable in this var-pool, may have array index
elementif not NULL, then attary element index is returend here (0 is returned, if no index is specified).
Returns
integer index if found, or -1 if not found in this var-pool.

References MAX_VAR_NAME_SIZE, mini(), UVariable::splitNameIndex(), vars, and varsCnt.

Referenced by UTermEmulator::addIfButtons(), getGlobalVariable(), getLocalVariable(), getStructDeep(), UFunctionVarPool::handleVarValues(), setGlobalVar(), setLocalVar(), and UCmdExe::sysModuleCmd().

ULogFile* UVarPool::getLogVar ( )
inline

Get the pointer to the logfile if theis varpool structure needs logging

Returns
pointer to logfile class, is NULL if no log is started (or intended)

References logVar.

Referenced by UVariable::setUpdated().

ULock* UVarPool::getLogVarLock ( )
inline

Get the file lock to the log-file

Returns
a poinmter to the lock

References createFunctionStack(), createVarPoolStack(), createVarStack(), evaluateSystemFunction(), getGlobalVariable(), and logVarLock.

Referenced by UVariable::setUpdated().

int UVarPool::getMethodCnt ( )
inline
int UVarPool::getMethodMax ( )
inline
UVarPool* UVarPool::getParentVarPool ( )
inline

Get parent var pool

References parentVarPool.

Referenced by getRootVarPool(), UMisRuleState::setRule(), and UQtgui::updVarEvent().

UVarPool* UVarPool::getParentVarPoolScope ( )
inline
const char* UVarPool::getPreName ( )
inline
UVarPool * UVarPool::getRootVarPool ( )
bool UVarPool::getScopeValue ( const char *  name,
double *  value 
)

Get a variable value in this var-pool or in any of the parent var-pools (in scope path) or in the math structure.

Parameters
nameis the name of the variable, and may include '.' notation for sub-variables
valueis where the value is to be returned
Returns
true if the variable were found.

References getLocalValue(), getParentVarPoolScope(), getRootVarPool(), and getStruct().

Referenced by isLogfileOpen().

UVarPool * UVarPool::getStruct ( const char *  name)
UVarPool * UVarPool::getStruct ( const int  idx)

Get pointer to varPool structure with this index. returns NULL if not found.

References varPools, and varPoolsCnt.

int UVarPool::getStructCnt ( )
inline
UVarPool * UVarPool::getStructDeep ( const char *  fullName,
char *  varName,
const int  varNameCnt 
)

Get a pointer to the structure thet (possibly) holds this variable or function. The full name may hold iteration through several structures, and the function will return the deepest level. I.e. road.leftSide.polyline should return a pointer to the 'leftSide' structure and the name 'polyline' in the varName string buffer. Returns a pointer to the relevant structure, and the remaining name in varName. Returns NULL if the structure is not found.

Referenced by addMethod(), addMethodV(), addVar(), UResIfVar::createBaseVar(), getGlobalVariable(), getLocalMethod(), getLocalVariable(), getMethodMax(), UFunctionVarPool::handleVar(), UResIfVar::handleVar(), UFunctionVarPool::handleVarPush(), UFunctionVarPool::handleVarValues(), UVarCalc::isDefined(), UResVarPool::isLogFileOpen(), UResVarPool::logFileStart(), UNavPaint::paintVarAdd(), UNavView::paintVarAdd(), and setLocalVar().

UVarPool * UVarPool::getStructDeep ( const char *  fullName,
const bool  mayAdd,
char *  varName,
const int  varNameCnt 
)

Get a pointer to the structure that (possibly) holds this variable or function. The full name may hold iteration through several structures, and the function will return the deepest level. I.e. road.leftSide.polyline should return a pointer to the 'leftSide' structure and the name 'polyline' in the varName string buffer. Returns a pointer to the relevant structure, and the remaining name in varName. Returns NULL if the structure is not found and mayAdd==false. Creates a new (empty) structure if mayAdd==true and the structure is not found.

References addStructLocal(), getLocalVarIndex(), getStruct(), MAX_STRUCT_NAMES, and MAX_VAR_NAME_SIZE.

int UVarPool::getStructIdx ( const char *  name)

Get index for a structure for faster access and enumeration. Returns -1 if no such variable.

References varPools, and varPoolsCnt.

Referenced by setGlobalVar().

int UVarPool::getStructMax ( )
inline

Get maximum number of structures (pointers to other UVarPool objects) - empty or used.

References varPoolsMaxCnt.

Referenced by UFunctionIf::handleIf(), UResVarPool::print(), and UResIfVar::snprint().

const char * UVarPool::getVarDescription ( int  idx)

Get description for local variable with this index

References UVariable::description, vars, and varsCnt.

Referenced by getMethodMax(), UResVarPool::getVarDescription(), and UFunctionVarPool::sendVarList().

int UVarPool::getVarMax ( )
inline

Get maximum number of variables and constants - used or unused.

References varsMaxCnt.

Referenced by UFunctionIf::handleIf(), UResVarPool::print(), and UResIfVar::snprint().

char * UVarPool::getVarName ( int  index)

Get value for the variable or function call with this name Returns true if found, and value in 'value' (if not NULL). If not a variable, then a function return is tested, and the function parameters start at *params, this variable should be returned at end of parameters. Get name of variable with this name

References UVariable::name, vars, and varsCnt.

Referenced by setLocalVarPose().

UVariable** UVarPool::getVars ( )
inline

Get pointer to first value in variable array. 'getVarsCnt()' returns size of array (the used part).

References vars.

Referenced by listVars(), and UNavPaint::paintVarDataText().

int UVarPool::getVarsCnt ( )
inline
bool UVarPool::isLogfileOpen ( )
inline

Test if this structure is open for data change logging

References getLocalVariable(), getScopeValue(), listVars(), logVar, and setScopeVar().

Referenced by UFunctionVarPool::handleVar(), and UResVarPool::isLogFileOpen().

bool UVarPool::isVarPoolVerbose ( )
inline

Set verbose flag

References verbose.

Referenced by UResVarPool::print().

void UVarPool::listVars ( const char *  preStr,
char *  buff,
const int  buffCnt,
bool  andStructs 
)

List variable in this structure into this buffer. One variable on each line, preceded by the preString.

Parameters
preStringis to go in front of all variable lines
buffis the buffer for the result
buffCntis the length of the buffer
andStructslists also any sub-structures variables - if true

References UTime::getDateString(), UTime::getDecSec(), getPreName(), getStruct(), getStructCnt(), UTime::getTimeAsString(), getVars(), getVarsCnt(), listVars(), UTime::now(), and UTime::setTime().

Referenced by UMisRuleState::getStateStr(), isLogfileOpen(), and listVars().

void UVarPool::setDescription ( const char *  note,
bool  copy 
)

Set the description note

Parameters
copymakes a copy of note, else the note pointer is used as is (i.e. pointes to a static string).

References description, and descriptionCopy.

Referenced by UResBin::createBaseVar(), createVarSpace(), getDescription(), UResVarPool::setDescription(), and UResRuleState::UResRuleState().

bool UVarPool::setGlobalVar ( const char *  name,
const double  value,
bool  mayAdd 
)
inline

Assigns a value to a variable. The variable may be a part of a structure.

Parameters
nameis the name of the variable and may be a substructure, e.g. aa.bb.cc.d
valueis the double value that should be assigned to the variable.
mayAddIf 'mayAdd' is true, then the variable is added if not found. And if the structure (any of the sspecified structures) is missing, then this is added too.
Returns
true if modified or added.

References UVariable::d, getLocalMethod(), getLocalMethodIdx(), getLocalValue(), getLocalValue3D(), getLocalValueBool(), getLocalValueInt(), getLocalValueRot(), getLocalValueTime(), getLocalVarIndex(), getRootVarPool(), getStruct(), getStructIdx(), setLocalVar(), setLocalVar3D(), and setLocalVarRot().

Referenced by UResVarPool::setGlobalVar().

bool UVarPool::setLocalVar ( const int  index,
const double  value,
const int  element 
)

Assigns a value to a variable

Parameters
indexis the index of the variable in the local var-pool
valueis the value to be assigned
elementis the array index of the variable
Returns
true if set.

References UVariable::getValued(), UVariable::name, UServerPush::setUpdated(), UVariable::setValued(), vars, and varsCnt.

Referenced by UResCamIf::connectionChange(), UResLaserIf::connectionChange(), UResSmrIf::connectionChange(), getFullPreName(), UResIfVar::handleOther(), UResIfVar::handleVar(), setGlobalVar(), setLocalVar(), UResVarPool::setLocalVar(), setScopeVar(), UResRoadDrive::setTarget(), and UServerPort::updateVars().

bool UVarPool::setLocalVar ( const int  index,
UVariable value 
)

Assigns a value to a variable

Parameters
indexis the index of the variable in the local var-pool
valueis the variable with the value to be assigned
Returns
true if set.

References UVariable::copy(), UVariable::name, UServerPush::setUpdated(), vars, and varsCnt.

bool UVarPool::setLocalVar ( const char *  name,
const double  value,
bool  mayAdd,
UVariable::varType  vartyp,
const char *  attValue = NULL 
)

Assigns a value to a variable. The variable may be a part of a structure.

Parameters
nameis the name of the variable and may be a substructure, e.g. aa.bb.cc.d
valueis the double value that should be assigned to the variable (when attValue==NULL).
mayAddIf 'mayAdd' is true, then the variable is added if not found. And if the structure (any of the sspecified structures) is missing, then this is added too.
varTypthe variable type.
attValuealternative source of values - set to NULL if no values
Returns
true if modified or added.

References addVar(), getLocalVarIndex(), getStructDeep(), MAX_VAR_NAME_SIZE, and setLocalVar().

bool UVarPool::setLocalVar ( const char *  name,
const char *  value,
bool  mayAdd,
const char *  vartyp,
UTime updTime = NULL,
bool *  added = NULL 
)

Assigns a value to a variable. The variable may be a part of a structure.

Parameters
nameis the name of the variable and may be a substructure and optionally have an index, e.g. aa.bb.cc.d[3]
valueis a string with values to be added, starting with index indicated by name.
mayAddIf 'mayAdd' is true, then the variable is added if not found. And if the structure (any of the sspecified structures) is missing, then this is added too.
varTypthe variable type described as a string.
updTimeis an optional update time (mostly relevant for time series variables)
addedis set to true if a new variable is added (and added is not NULL)
Returns
true is added

References addVarA(), getLocalVariable(), getStructDeep(), UVarLog::hasHist(), UVariable::isString(), UVariable::makeTimeSeries(), MAX_VAR_NAME_SIZE, UVariable::setValued(), UVariable::setValues(), and UTime::valid.

bool UVarPool::setLocalVar3D ( int  idx,
UPosition value 
)

Set 3D position to 3 to this variable as an array with 3 elements

Parameters
idxis the index of the variable, assuming the order x,y,z
valuea position with x,y,z
Returns
true if space can be allocated

References getLocalVar(), UVariable::name, UVariable::set3D(), and UServerPush::setUpdated().

Referenced by setGlobalVar(), UResVarPool::setLocalVar3D(), and setLocalVarPose().

bool UVarPool::setLocalVar6D ( int  idx,
UPosRot value 
)

Set 6D position to 6 consecutive variables starting with this index.

Parameters
idxis the index of the first of 6 variables, assuming the order x,y,z,Omage,Phi,Kappa.
valuethe 6D value (x,y,z,o,p,k)
Returns
true if there is 6 values with an index above idx (no name check)

References getLocalVar(), UVariable::name, UVariable::set6D(), and UServerPush::setUpdated().

Referenced by UResVarPool::setLocalVar6D(), and setLocalVarPose().

bool UVarPool::setLocalVarAdd ( const int  index,
const double  value,
const int  element 
)

Add a value to a local variable

References UVariable::add(), UVariable::name, UServerPush::setUpdated(), vars, and varsCnt.

Referenced by getFullPreName(), and UResVarPool::setLocalVarAdd().

bool UVarPool::setLocalVarPose ( int  idx,
UPose value 
)
inline

Set 3D position to this variable as an array with 3 elements.

Parameters
idxis the index of the first variable, assuming the order x,y,h
valuea pose with x,y,h
Returns
true if space can be allocated

References getGlobalString(), getGlobalValue(), getLocalValue(), getLocalValue6D(), getLocalValuePose(), getVarName(), UPose::h, setLocalVar3D(), setLocalVar6D(), UPose::x, and UPose::y.

bool UVarPool::setLocalVarRot ( int  idx,
URotation value 
)

Set 3D rotation to this variable as an array with 3 elements.

Parameters
idxis the index of the variable, assuming the order x,y,z
valuea rotation with rotation of axis x,y,z as Omega, Phi, Kappa
Returns
true if space can be allocated

References getLocalVar(), UVariable::name, UVariable::setRot(), and UServerPush::setUpdated().

Referenced by setGlobalVar().

void UVarPool::setLogfile ( ULogFile fileHandle,
ULock fileLock 
)

Set logfile for this structure. The logfile is a pointer to a ULogFile structure. An additional logfile lock is provided too.

References ULogFile::isOpen(), ULock::lock(), logVar, logVarLock, preNameFull, UVariable::saveToLog(), ULock::unlock(), vars, and varsCnt.

Referenced by getDescription(), and UResVarPool::logFileStart().

void UVarPool::setParentVarPool ( UVarPool parent)
void UVarPool::setParentVarPoolScope ( UVarPool parent)

Set parent var pool to be used when following variable scope in calculations

References parentVarPoolScope.

Referenced by getMethodMax().

bool UVarPool::setPreName ( const char *  name)

Set the pre-name that (often) is placed in front of variables to indicate that the value belongs to this structure.

References MAX_VAR_NAME_SIZE, and preName.

Referenced by addStruct(), addStructLocal(), and UMisRuleState::setRule().

bool UVarPool::setScopeVar ( const char *  name,
const double  value,
bool  mayAdd 
)

Set a variable in the scope to a value Scope is in this var-pool or any parent var-pool.

Parameters
nameis the name of the variable - possibly with '.' notation.
valueis the value to assign to the variable.
mayAddif true the variable will be added to the local var-pool is not found in scope
Returns
true if set.

References UVariable::d, getParentVarPoolScope(), and setLocalVar().

Referenced by UMisAssign::execute(), and isLogfileOpen().

bool UVarPool::setScopeVar ( const char *  name,
const UVariable source,
bool  mayAdd 
)

Set a variable in the scope to the value of source Scope is in this var-pool or any parent var-pool.

Parameters
nameis the name of the variable - possibly with '.' notation.
sourceis the value to assign to the variable.
mayAddif true the variable will be added to the local var-pool is not found in scope
Returns
true if set.

References addVar(), getLocalVariable(), getParentVarPoolScope(), and UVariable::setValue().

void UVarPool::setVerbose ( bool  value)
inline

Set verbose flag

References verbose.

Referenced by UFunctionIf::handleIf(), and UFunctionLaserIfScan::handleLaserIf().

Member Data Documentation

const char* UVarPool::description
protected

Description for this structure (used when displaying global variables)

Referenced by getDescription(), and setDescription().

char* UVarPool::descriptionCopy
private

copy of description - if not literal

Referenced by setDescription(), UVarPool(), and ~UVarPool().

ULogFile* UVarPool::logVar
protected

Logfile for variable updates

Referenced by getLogVar(), isLogfileOpen(), setLogfile(), and UVarPool().

ULock* UVarPool::logVarLock
protected

Resource lock on logfile

Referenced by getLogVarLock(), and setLogfile().

UVarMethod* UVarPool::meths
private
int UVarPool::methsCnt
private
int UVarPool::methsMaxCnt
private

Maximum number of available function calls

Referenced by addMethod(), addMethodV(), createFunctionStack(), getMethodMax(), and UVarPool().

UVarPool* UVarPool::parentVarPool
private
UVarPool* UVarPool::parentVarPoolScope
private

Parent var pool when evaluating variables

Referenced by getParentVarPoolScope(), setParentVarPoolScope(), and UVarPool().

char UVarPool::preName[MAX_VAR_NAME_SIZE]
private

Variable pre-name, as in pre-name.variable

Referenced by getFullPreName(), getPreName(), setPreName(), and UVarPool().

char UVarPool::preNameFull[MAX_VAR_NAME_SIZE *MAX_STRUCT_NAMES]
private

Variable pre-name, as in pre-name.variable

Referenced by getFullPreName(), setLogfile(), setParentVarPool(), and UVarPool().

UVarPool** UVarPool::varPools
protected

Stack of structures with other variables subordinate to this structure.

Referenced by addStruct(), addStructLink(), addStructLocal(), createVarPoolStack(), deleteAll(), deleteMethods(), deleteStruct(), getStruct(), getStructIdx(), UVarPool(), and ~UVarPool().

int UVarPool::varPoolsCnt
private
bool* UVarPool::varPoolsLocal
protected

array of boolean to indicate if the var pool is created locally.

Referenced by addStruct(), addStructLink(), addStructLocal(), createVarPoolStack(), deleteAll(), deleteStruct(), UVarPool(), and ~UVarPool().

int UVarPool::varPoolsMaxCnt
private

Space available for subordinat varPool structures.

Referenced by addStruct(), addStructLink(), addStructLocal(), createVarPoolStack(), getStructMax(), and UVarPool().

UVariable** UVarPool::vars
private
int UVarPool::varsCnt
private
int UVarPool::varsMaxCnt
private

Maximum number of variables

Referenced by addVar(), createVarStack(), getVarMax(), and UVarPool().

bool UVarPool::verbose
protected

Print more to console if verbose is true

Referenced by isVarPoolVerbose(), setVerbose(), and UResKeep::UResKeepInit().


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