AURobotServers
4
|
#include <urule.h>
Public Member Functions | |
UMisItem::ResultValue | evaluateCondition (UVarCalc *calc) |
evaluate the condition of the control statement. More... | |
virtual ResultValue | execute (UVarCalc *calc, int repeat) |
const char * | getCondition () |
virtual const char * | getDataType () |
virtual bool | setLine (const int lineNum, const char *value, UVarCalc *calc) |
UMisControl () | |
virtual | ~UMisControl () |
Public Member Functions inherited from UMisCall | |
const char * | getName () |
int | getNameCnt () |
const char * | getNameCopy (char *dest, const int destCnt) |
const char * | getParameters () |
bool | isA (const char *thisName) |
UMisCall () | |
virtual | ~UMisCall () |
Public Member Functions inherited from UMisLineItem | |
const char * | getLine () |
virtual const char * | print (const char *preStr, char *buf, const int bufCnt) |
UMisLineItem () | |
virtual | ~UMisLineItem () |
Public Member Functions inherited from UMisItem | |
const char * | findStopChar (const char *source, char stop) |
int | getLineNumber () |
bool | isA (const char *matchType) |
void | setLineNumber (const int line) |
UMisItem () | |
virtual | ~UMisItem () |
Public Member Functions inherited from UDataBase | |
bool | isA (const char *typeString) |
virtual bool | isAlsoA (const char *typeString) |
virtual void | snprint (const char *preString, char *buff, const int buffCnt) |
UDataBase () | |
virtual | ~UDataBase () |
Protected Attributes | |
const char * | strCond |
Protected Attributes inherited from UMisCall | |
const char * | name |
int | nameCnt |
const char * | parameters |
Protected Attributes inherited from UMisLineItem | |
char * | line |
Protected Attributes inherited from UMisItem | |
int | lineNumber |
Additional Inherited Members | |
Public Types inherited from UMisItem | |
enum | ResultValue { RV_EMPTY, RV_OK, RV_OK_FALSE, RV_OK_AGAIN, RV_SYNTAX_ERROR, RV_FAILED, RV_IF_TRUE, RV_IF_FALSE } |
Static Public Member Functions inherited from UMisItem | |
static bool | isRem (const char *r) |
Public Attributes inherited from UMisItem | |
UMisItem * | next |
Protected Member Functions inherited from UMisItem | |
int | symbolLength (const char *exp) |
Class that holds a control statement, that is a call that is called repeatingly until a continue condition is fullfilled
UMisControl::UMisControl | ( | ) |
Constructor
|
virtual |
Constructor DEstructor
UMisItem::ResultValue UMisControl::evaluateCondition | ( | UVarCalc * | calc | ) |
evaluate the condition of the control statement.
calc | is the calculateor - and scope for variables and methods |
References UVarCalc::evaluateV(), UVarCalc::getErrorTxt(), UVariable::getValued(), UMisItem::isRem(), UMisItem::lineNumber, roundi(), UMisItem::RV_OK, UMisItem::RV_OK_FALSE, and UMisItem::RV_SYNTAX_ERROR.
Referenced by UMisRuleState::runControl().
|
virtual |
execute item.
calc | is the calculateor - and scope for variables and methods |
repeat | is the repeat call sequence 0 for first >0 for subsequent and -1 for last call result of executing this line normal is RV_OK if control line is finished, or |
Reimplemented from UMisItem.
References UVarPool::callLocalV(), UVarPool::callScopeV(), UVarCalc::evaluateParametersV(), UVarCalc::getErrorTxt(), UVariable::getValued(), UMisItem::lineNumber, MAX_ERROR_SIZE, MAX_STRUCT_NAMES, MAX_VAR_NAME_SIZE, roundi(), UMisItem::RV_FAILED, UMisItem::RV_OK, UMisItem::RV_OK_AGAIN, UMisItem::RV_OK_FALSE, UMisItem::RV_SYNTAX_ERROR, and UVariable::setValued().
|
inline |
Get explicit condition
Referenced by UMisRuleState::runControl().
|
inlinevirtual |
Get (end) type of this structure
Reimplemented from UMisCall.
|
virtual |
Set the command line
Reimplemented from UMisCall.
References UMisItem::findStopChar(), and UMisCall::setLine().
|
protected |
explicit condition statement