1 |
/* |
/* |
2 |
* Copyright (c) 2014 - 2015 Christian Schoenebeck |
* Copyright (c) 2014 - 2016 Christian Schoenebeck |
3 |
* |
* |
4 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
5 |
* |
* |
89 |
return max; |
return max; |
90 |
} |
} |
91 |
|
|
92 |
ScriptVM::ScriptVM() : m_parserContext(NULL), fnWait(this) { |
ScriptVM::ScriptVM() : m_eventHandler(NULL), m_parserContext(NULL), fnWait(this) { |
93 |
} |
} |
94 |
|
|
95 |
ScriptVM::~ScriptVM() { |
ScriptVM::~ScriptVM() { |
186 |
return std::map<String,int>(); |
return std::map<String,int>(); |
187 |
} |
} |
188 |
|
|
189 |
|
VMEventHandler* ScriptVM::currentVMEventHandler() { |
190 |
|
return m_eventHandler; |
191 |
|
} |
192 |
|
|
193 |
VMParserContext* ScriptVM::currentVMParserContext() { |
VMParserContext* ScriptVM::currentVMParserContext() { |
194 |
return m_parserContext; |
return m_parserContext; |
195 |
} |
} |
216 |
} |
} |
217 |
EventHandler* h = dynamic_cast<EventHandler*>(handler); |
EventHandler* h = dynamic_cast<EventHandler*>(handler); |
218 |
if (!h) return VM_EXEC_NOT_RUNNING; |
if (!h) return VM_EXEC_NOT_RUNNING; |
219 |
|
m_eventHandler = handler; |
220 |
|
|
221 |
m_parserContext->execContext = ctx; |
m_parserContext->execContext = ctx; |
222 |
|
|
312 |
ctx->reset(); |
ctx->reset(); |
313 |
} |
} |
314 |
|
|
315 |
|
m_eventHandler = NULL; |
316 |
m_parserContext->execContext = NULL; |
m_parserContext->execContext = NULL; |
317 |
m_parserContext = NULL; |
m_parserContext = NULL; |
318 |
return ctx->status; |
return ctx->status; |