/[svn]/linuxsampler/trunk/src/scriptvm/ScriptVM.h
ViewVC logotype

Annotation of /linuxsampler/trunk/src/scriptvm/ScriptVM.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2581 - (hide annotations) (download) (as text)
Fri May 30 12:48:05 2014 UTC (9 years, 10 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 1362 byte(s)
* (WIP) Implemented parser and VM for upcoming new real-time instrument
  script support. It needs yet to be integrated into the sampler's
  sampler engines. You can toy around for now with the command line tool
  "ls_instr_script" and i.e. examples showing the core language features
  under src/scriptvm/examples/.
* Bumped version (1.0.0.svn41).

1 schoenebeck 2581 /*
2     * Copyright (c) 2014 Christian Schoenebeck
3     *
4     * http://www.linuxsampler.org
5     *
6     * This file is part of LinuxSampler and released under the same terms.
7     * See README file for details.
8     */
9    
10     #ifndef LS_SCRIPTVM_H
11     #define LS_SCRIPTVM_H
12    
13     #include <iostream>
14     #include <vector>
15    
16     #include "../common/global.h"
17     #include "common.h"
18     #include "CoreVMFunctions.h"
19    
20     namespace LinuxSampler {
21    
22     class ParserContext;
23    
24     class ScriptVM : public VMFunctionProvider {
25     public:
26     ScriptVM();
27     virtual ~ScriptVM();
28     void loadScript(const String& s);
29     void loadScript(std::istream* is);
30     std::vector<ParserIssue> issues() const;
31     std::vector<ParserIssue> errors() const;
32     std::vector<ParserIssue> warnings() const;
33     void dumpParsedScript();
34     VMExecContext* createExecContext();
35     VMEventHandler* eventHandler(uint index);
36     VMEventHandler* eventHandlerByName(const String& name);
37     VMExecStatus_t exec(VMEventHandler* handler, VMExecContext* execContex);
38     VMExecContext* currentVMExecContext();
39     VMFunction* functionByName(const String& name);
40     protected:
41     ParserContext* m_context;
42     CoreVMFunction_message fnMessage;
43     CoreVMFunction_exit fnExit;
44     CoreVMFunction_wait fnWait;
45     };
46    
47     } // namespace LinuxSampler
48    
49     #endif // LS_INSTRUMENTSCRIPTVM_H

  ViewVC Help
Powered by ViewVC