376 |
}; |
}; |
377 |
|
|
378 |
/** |
/** |
379 |
|
* Implements the built-in msb() script function. |
380 |
|
*/ |
381 |
|
class CoreVMFunction_msb FINAL : public VMIntResultFunction { |
382 |
|
public: |
383 |
|
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; } |
384 |
|
bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; } |
385 |
|
vmint minRequiredArgs() const OVERRIDE { return 1; } |
386 |
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
387 |
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } |
388 |
|
bool acceptsArgFinal(vmint iArg) const OVERRIDE { return false; } |
389 |
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
390 |
|
}; |
391 |
|
|
392 |
|
/** |
393 |
|
* Implements the built-in lsb() script function. |
394 |
|
*/ |
395 |
|
class CoreVMFunction_lsb FINAL : public VMIntResultFunction { |
396 |
|
public: |
397 |
|
StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; } |
398 |
|
bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; } |
399 |
|
vmint minRequiredArgs() const OVERRIDE { return 1; } |
400 |
|
vmint maxAllowedArgs() const OVERRIDE { return 1; } |
401 |
|
bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; } |
402 |
|
bool acceptsArgFinal(vmint iArg) const OVERRIDE { return false; } |
403 |
|
VMFnResult* exec(VMFnArgs* args) OVERRIDE; |
404 |
|
}; |
405 |
|
|
406 |
|
/** |
407 |
* Implements the built-in min() script function. |
* Implements the built-in min() script function. |
408 |
*/ |
*/ |
409 |
class CoreVMFunction_min FINAL : public VMNumberResultFunction { |
class CoreVMFunction_min FINAL : public VMNumberResultFunction { |