1 |
/* |
/* |
2 |
* Copyright (c) 2014-2016 Christian Schoenebeck |
* Copyright (c) 2014-2017 Christian Schoenebeck |
3 |
* |
* |
4 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
5 |
* |
* |
173 |
VMFunction* functionByName(const String& name) OVERRIDE; |
VMFunction* functionByName(const String& name) OVERRIDE; |
174 |
|
|
175 |
/** |
/** |
176 |
|
* Whether the passed built-in function is disabled and should thus be |
177 |
|
* ignored by the parser at the passed parser context (parser state |
178 |
|
* where the built-in function call occurs). |
179 |
|
* |
180 |
|
* @param fn - built-in function to be checked |
181 |
|
* @param ctx - parser context at the position where the built-in |
182 |
|
* function call is located within the script |
183 |
|
*/ |
184 |
|
bool isFunctionDisabled(VMFunction* fn, VMParserContext* ctx) OVERRIDE; |
185 |
|
|
186 |
|
/** |
187 |
* Returns all built-in integer script variables. This method returns a |
* Returns all built-in integer script variables. This method returns a |
188 |
* STL map, where the map's key is the variable name and the map's value |
* STL map, where the map's key is the variable name and the map's value |
189 |
* is the native pointer to the actual built-in variable. |
* is the native pointer to the actual built-in variable. |
241 |
*/ |
*/ |
242 |
std::map<String,VMDynVar*> builtInDynamicVariables() OVERRIDE; |
std::map<String,VMDynVar*> builtInDynamicVariables() OVERRIDE; |
243 |
|
|
244 |
|
/** |
245 |
|
* Enables or disables automatic suspension of scripts by the VM. |
246 |
|
* If automatic suspension is enabled then scripts are monitored |
247 |
|
* regarding their execution time and in case they are execution |
248 |
|
* for too long, then they are automatically suspended by the VM for |
249 |
|
* a certain amount of time in order to avoid any RT instablity |
250 |
|
* issues caused by bugs in the script, i.e. endless while() loops |
251 |
|
* or very large scripts. |
252 |
|
* |
253 |
|
* Automatic suspension is enabled by default due to the aimed |
254 |
|
* real-time context of this virtual machine. |
255 |
|
* |
256 |
|
* @param b - true: enable auto suspension [default], |
257 |
|
* false: disable auto suspension |
258 |
|
*/ |
259 |
|
void setAutoSuspendEnabled(bool b = true); |
260 |
|
|
261 |
|
/** |
262 |
|
* Returns true in case automatic suspension of scripts by the VM is |
263 |
|
* enabled. See setAutoSuspendEnabled() for details. |
264 |
|
* |
265 |
|
* Automatic suspension is enabled by default due to the aimed |
266 |
|
* real-time context of this virtual machine. |
267 |
|
*/ |
268 |
|
bool isAutoSuspendEnabled() const; |
269 |
|
|
270 |
VMEventHandler* currentVMEventHandler(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
VMEventHandler* currentVMEventHandler(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
271 |
VMParserContext* currentVMParserContext(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
VMParserContext* currentVMParserContext(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
272 |
VMExecContext* currentVMExecContext(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
VMExecContext* currentVMExecContext(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
274 |
protected: |
protected: |
275 |
VMEventHandler* m_eventHandler; |
VMEventHandler* m_eventHandler; |
276 |
ParserContext* m_parserContext; |
ParserContext* m_parserContext; |
277 |
|
bool m_autoSuspend; |
278 |
class CoreVMFunction_message* m_fnMessage; |
class CoreVMFunction_message* m_fnMessage; |
279 |
class CoreVMFunction_exit* m_fnExit; |
class CoreVMFunction_exit* m_fnExit; |
280 |
class CoreVMFunction_wait* m_fnWait; |
class CoreVMFunction_wait* m_fnWait; |
283 |
class CoreVMFunction_num_elements* m_fnNumElements; |
class CoreVMFunction_num_elements* m_fnNumElements; |
284 |
class CoreVMFunction_inc* m_fnInc; |
class CoreVMFunction_inc* m_fnInc; |
285 |
class CoreVMFunction_dec* m_fnDec; |
class CoreVMFunction_dec* m_fnDec; |
286 |
|
class CoreVMFunction_in_range* m_fnInRange; |
287 |
|
class CoreVMFunction_sh_left* m_fnShLeft; |
288 |
|
class CoreVMFunction_sh_right* m_fnShRight; |
289 |
|
class CoreVMFunction_min* m_fnMin; |
290 |
|
class CoreVMFunction_max* m_fnMax; |
291 |
|
class CoreVMFunction_array_equal* m_fnArrayEqual; |
292 |
|
class CoreVMFunction_search* m_fnSearch; |
293 |
|
class CoreVMFunction_sort* m_fnSort; |
294 |
class CoreVMDynVar_NKSP_REAL_TIMER* m_varRealTimer; |
class CoreVMDynVar_NKSP_REAL_TIMER* m_varRealTimer; |
295 |
class CoreVMDynVar_NKSP_PERF_TIMER* m_varPerfTimer; |
class CoreVMDynVar_NKSP_PERF_TIMER* m_varPerfTimer; |
296 |
}; |
}; |