1 |
/* |
/* |
2 |
* Copyright (c) 2014-2016 Christian Schoenebeck |
* Copyright (c) 2014-2019 Christian Schoenebeck |
3 |
* |
* |
4 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
5 |
* |
* |
133 |
*/ |
*/ |
134 |
class CoreVMFunction_exit : public VMEmptyResultFunction { |
class CoreVMFunction_exit : public VMEmptyResultFunction { |
135 |
public: |
public: |
136 |
int minRequiredArgs() const { return 0; } |
CoreVMFunction_exit(ScriptVM* vm) : vm(vm) {} |
137 |
int maxAllowedArgs() const { return 0; } |
int minRequiredArgs() const OVERRIDE { return 0; } |
138 |
bool acceptsArgType(int iArg, ExprType_t type) const { return false; } |
int maxAllowedArgs() const OVERRIDE; |
139 |
ExprType_t argType(int iArg) const { return INT_EXPR; /*whatever*/ } |
bool acceptsArgType(int iArg, ExprType_t type) const OVERRIDE; |
140 |
|
ExprType_t argType(int iArg) const OVERRIDE { return INT_EXPR; } |
141 |
VMFnResult* exec(VMFnArgs* args); |
VMFnResult* exec(VMFnArgs* args); |
142 |
|
protected: |
143 |
|
ScriptVM* vm; |
144 |
}; |
}; |
145 |
|
|
146 |
/** |
/** |
280 |
VMFnResult* exec(VMFnArgs* args); |
VMFnResult* exec(VMFnArgs* args); |
281 |
}; |
}; |
282 |
|
|
283 |
|
/** |
284 |
|
* Implements the built-in array_equal() script function. |
285 |
|
*/ |
286 |
|
class CoreVMFunction_array_equal : public VMIntResultFunction { |
287 |
|
public: |
288 |
|
int minRequiredArgs() const { return 2; } |
289 |
|
int maxAllowedArgs() const { return 2; } |
290 |
|
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_ARR_EXPR; } |
291 |
|
ExprType_t argType(int iArg) const { return INT_ARR_EXPR; } |
292 |
|
VMFnResult* exec(VMFnArgs* args); |
293 |
|
}; |
294 |
|
|
295 |
|
/** |
296 |
|
* Implements the built-in search() script function. |
297 |
|
*/ |
298 |
|
class CoreVMFunction_search : public VMIntResultFunction { |
299 |
|
public: |
300 |
|
int minRequiredArgs() const { return 2; } |
301 |
|
int maxAllowedArgs() const { return 2; } |
302 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
303 |
|
ExprType_t argType(int iArg) const; |
304 |
|
VMFnResult* exec(VMFnArgs* args); |
305 |
|
}; |
306 |
|
|
307 |
|
/** |
308 |
|
* Implements the built-in sort() script function. |
309 |
|
*/ |
310 |
|
class CoreVMFunction_sort : public VMEmptyResultFunction { |
311 |
|
public: |
312 |
|
int minRequiredArgs() const { return 1; } |
313 |
|
int maxAllowedArgs() const { return 2; } |
314 |
|
bool acceptsArgType(int iArg, ExprType_t type) const; |
315 |
|
ExprType_t argType(int iArg) const; |
316 |
|
bool modifiesArg(int iArg) const { return iArg == 0; } |
317 |
|
VMFnResult* exec(VMFnArgs* args); |
318 |
|
}; |
319 |
|
|
320 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |
321 |
|
|
322 |
#endif // LS_COREVMFUNCTIONS_H |
#endif // LS_COREVMFUNCTIONS_H |