20 |
namespace LinuxSampler { |
namespace LinuxSampler { |
21 |
|
|
22 |
class ParserContext; |
class ParserContext; |
23 |
|
class ExecContext; |
24 |
|
|
25 |
class ScriptVM : public VMFunctionProvider { |
class ScriptVM : public VMFunctionProvider { |
26 |
public: |
public: |
27 |
ScriptVM(); |
ScriptVM(); |
28 |
virtual ~ScriptVM(); |
virtual ~ScriptVM(); |
29 |
void loadScript(const String& s); |
VMParserContext* loadScript(const String& s); |
30 |
void loadScript(std::istream* is); |
VMParserContext* loadScript(std::istream* is); |
31 |
std::vector<ParserIssue> issues() const; |
void dumpParsedScript(VMParserContext* context); |
32 |
std::vector<ParserIssue> errors() const; |
VMExecContext* createExecContext(VMParserContext* parserContext); |
33 |
std::vector<ParserIssue> warnings() const; |
VMExecStatus_t exec(VMParserContext* parserContext, VMExecContext* execContex, VMEventHandler* handler); |
|
void dumpParsedScript(); |
|
|
VMExecContext* createExecContext(); |
|
|
VMEventHandler* eventHandler(uint index); |
|
|
VMEventHandler* eventHandlerByName(const String& name); |
|
|
VMExecStatus_t exec(VMEventHandler* handler, VMExecContext* execContex); |
|
|
VMExecContext* currentVMExecContext(); |
|
34 |
VMFunction* functionByName(const String& name); |
VMFunction* functionByName(const String& name); |
35 |
|
|
36 |
|
VMParserContext* currentVMParserContext(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
37 |
|
VMExecContext* currentVMExecContext(); //TODO: should be protected (only usable during exec() calls, intended only for VMFunctions) |
38 |
protected: |
protected: |
39 |
ParserContext* m_context; |
|
40 |
|
ParserContext* m_parserContext; |
41 |
CoreVMFunction_message fnMessage; |
CoreVMFunction_message fnMessage; |
42 |
CoreVMFunction_exit fnExit; |
CoreVMFunction_exit fnExit; |
43 |
CoreVMFunction_wait fnWait; |
CoreVMFunction_wait fnWait; |