173 |
* value. The actual return type is determined at parse time once after |
* value. The actual return type is determined at parse time once after |
174 |
* potential arguments were associated with the respective function call. |
* potential arguments were associated with the respective function call. |
175 |
*/ |
*/ |
176 |
class VMScalarNumberResultFunction : public VMFunction { |
class VMNumberResultFunction : public VMFunction { |
177 |
protected: |
protected: |
178 |
virtual ~VMScalarNumberResultFunction() {} |
virtual ~VMNumberResultFunction() {} |
179 |
VMFnResult* errorResult(vmint i); |
VMFnResult* errorResult(vmint i); |
180 |
VMFnResult* errorResult(vmfloat f); |
VMFnResult* errorResult(vmfloat f); |
181 |
VMFnResult* successResult(vmint i); |
VMFnResult* successResult(vmint i); |
244 |
/** |
/** |
245 |
* Implements the built-in abs() script function. |
* Implements the built-in abs() script function. |
246 |
*/ |
*/ |
247 |
class CoreVMFunction_abs FINAL : public VMScalarNumberResultFunction { |
class CoreVMFunction_abs FINAL : public VMNumberResultFunction { |
248 |
public: |
public: |
249 |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
250 |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
262 |
/** |
/** |
263 |
* Implements the built-in random() script function. |
* Implements the built-in random() script function. |
264 |
*/ |
*/ |
265 |
class CoreVMFunction_random FINAL : public VMScalarNumberResultFunction { |
class CoreVMFunction_random FINAL : public VMNumberResultFunction { |
266 |
using Super = VMScalarNumberResultFunction; // just an alias for the super class |
using Super = VMNumberResultFunction; // just an alias for the super class |
267 |
public: |
public: |
268 |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
269 |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
389 |
/** |
/** |
390 |
* Implements the built-in min() script function. |
* Implements the built-in min() script function. |
391 |
*/ |
*/ |
392 |
class CoreVMFunction_min FINAL : public VMScalarNumberResultFunction { |
class CoreVMFunction_min FINAL : public VMNumberResultFunction { |
393 |
using Super = VMScalarNumberResultFunction; // just an alias for the super class |
using Super = VMNumberResultFunction; // just an alias for the super class |
394 |
public: |
public: |
395 |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
396 |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
410 |
/** |
/** |
411 |
* Implements the built-in max() script function. |
* Implements the built-in max() script function. |
412 |
*/ |
*/ |
413 |
class CoreVMFunction_max FINAL : public VMScalarNumberResultFunction { |
class CoreVMFunction_max FINAL : public VMNumberResultFunction { |
414 |
using Super = VMScalarNumberResultFunction; // just an alias for the super class |
using Super = VMNumberResultFunction; // just an alias for the super class |
415 |
public: |
public: |
416 |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
ExprType_t returnType(VMFnArgs* args) OVERRIDE; |
417 |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE; |