173 |
class VMIntExpr; |
class VMIntExpr; |
174 |
class VMRealExpr; |
class VMRealExpr; |
175 |
class VMStringExpr; |
class VMStringExpr; |
176 |
class VMScalarNumberExpr; |
class VMNumberExpr; |
177 |
class VMArrayExpr; |
class VMArrayExpr; |
178 |
class VMIntArrayExpr; |
class VMIntArrayExpr; |
179 |
class VMRealArrayExpr; |
class VMRealArrayExpr; |
318 |
* return NULL! Same applies if this expression is actually a real |
* return NULL! Same applies if this expression is actually a real |
319 |
* number expression: asInt() would return NULL in that case as well. |
* number expression: asInt() would return NULL in that case as well. |
320 |
* |
* |
321 |
* @see exprType(), asReal(), asScalarNumberExpr() |
* @see exprType(), asReal(), asNumber() |
322 |
*/ |
*/ |
323 |
VMIntExpr* asInt() const; |
VMIntExpr* asInt() const; |
324 |
|
|
334 |
* simply return NULL! Same applies if this expression is actually an |
* simply return NULL! Same applies if this expression is actually an |
335 |
* integer expression: asReal() would return NULL in that case as well. |
* integer expression: asReal() would return NULL in that case as well. |
336 |
* |
* |
337 |
* @see exprType(), asInt(), asScalarNumberExpr() |
* @see exprType(), asInt(), asNumber() |
338 |
*/ |
*/ |
339 |
VMRealExpr* asReal() const; |
VMRealExpr* asReal() const; |
340 |
|
|
342 |
* In case this expression is a scalar number expression, that is either |
* In case this expression is a scalar number expression, that is either |
343 |
* an integer (scalar) expression or a real number (floating point |
* an integer (scalar) expression or a real number (floating point |
344 |
* scalar) expression, then this method returns a casted pointer to that |
* scalar) expression, then this method returns a casted pointer to that |
345 |
* VMScalarNumberExpr base class object. It returns NULL if this |
* VMNumberExpr base class object. It returns NULL if this |
346 |
* expression is neither an integer (scalar), nor a real number (scalar) |
* expression is neither an integer (scalar), nor a real number (scalar) |
347 |
* expression. |
* expression. |
348 |
* |
* |
356 |
* |
* |
357 |
* @see exprType(), asInt(), asReal() |
* @see exprType(), asInt(), asReal() |
358 |
*/ |
*/ |
359 |
VMScalarNumberExpr* asScalarNumberExpr() const; |
VMNumberExpr* asNumber() const; |
360 |
|
|
361 |
/** |
/** |
362 |
* In case this expression is a string expression, then this method |
* In case this expression is a string expression, then this method |
473 |
* This is the abstract base class for integer (scalar) expressions and |
* This is the abstract base class for integer (scalar) expressions and |
474 |
* real number (floating point scalar) expressions of scripts. |
* real number (floating point scalar) expressions of scripts. |
475 |
*/ |
*/ |
476 |
class VMScalarNumberExpr : virtual public VMExpr, virtual public VMUnit { |
class VMNumberExpr : virtual public VMExpr, virtual public VMUnit { |
477 |
public: |
public: |
478 |
/** |
/** |
479 |
* Returns @c true if the value of this expression should be applied |
* Returns @c true if the value of this expression should be applied |
529 |
* abstract method evalInt() to return the actual integer result value of |
* abstract method evalInt() to return the actual integer result value of |
530 |
* the expression. |
* the expression. |
531 |
*/ |
*/ |
532 |
class VMIntExpr : virtual public VMScalarNumberExpr { |
class VMIntExpr : virtual public VMNumberExpr { |
533 |
public: |
public: |
534 |
/** |
/** |
535 |
* Returns the result of this expression as integer (scalar) value. |
* Returns the result of this expression as integer (scalar) value. |
567 |
* implement the abstract method evalReal() to return the actual floating |
* implement the abstract method evalReal() to return the actual floating |
568 |
* point result value of the expression. |
* point result value of the expression. |
569 |
*/ |
*/ |
570 |
class VMRealExpr : virtual public VMScalarNumberExpr { |
class VMRealExpr : virtual public VMNumberExpr { |
571 |
public: |
public: |
572 |
/** |
/** |
573 |
* Returns the result of this expression as real number (floating point |
* Returns the result of this expression as real number (floating point |
852 |
* |
* |
853 |
* @param args - function arguments going to be passed for executing |
* @param args - function arguments going to be passed for executing |
854 |
* this built-in function later on |
* this built-in function later on |
855 |
* @see VMScalarNumberExpr::isFinal() for details about 'final' values |
* @see VMNumberExpr::isFinal() for details about 'final' values |
856 |
*/ |
*/ |
857 |
virtual bool returnsFinal(VMFnArgs* args) = 0; |
virtual bool returnsFinal(VMFnArgs* args) = 0; |
858 |
|
|
964 |
* @return true if a "final" value would be accepted for the respective |
* @return true if a "final" value would be accepted for the respective |
965 |
* function argument by the function |
* function argument by the function |
966 |
* |
* |
967 |
* @see VMScalarNumberExpr::isFinal(), returnsFinal() |
* @see VMNumberExpr::isFinal(), returnsFinal() |
968 |
*/ |
*/ |
969 |
virtual bool acceptsArgFinal(vmint iArg) const; |
virtual bool acceptsArgFinal(vmint iArg) const; |
970 |
|
|
1736 |
* Returns @c true in case the passed data type is some scalar number type |
* Returns @c true in case the passed data type is some scalar number type |
1737 |
* (i.e. not an array and not a string). |
* (i.e. not an array and not a string). |
1738 |
*/ |
*/ |
1739 |
inline bool isScalarNumber(const ExprType_t& type) { |
inline bool isNumber(const ExprType_t& type) { |
1740 |
return type == INT_EXPR || type == REAL_EXPR; |
return type == INT_EXPR || type == REAL_EXPR; |
1741 |
} |
} |
1742 |
|
|