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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2728 by schoenebeck, Tue Mar 31 17:51:10 2015 UTC revision 2729 by schoenebeck, Tue Mar 31 17:56:21 2015 UTC
# Line 40  namespace LinuxSampler { Line 40  namespace LinuxSampler {
40       * - 1. Create an instance of this ScriptVM class (or of one of its deriving       * - 1. Create an instance of this ScriptVM class (or of one of its deriving
41       *      classes).       *      classes).
42       * - 2. Load a script by passing its source code to method loadScript(),       * - 2. Load a script by passing its source code to method loadScript(),
43       *      which will return the parsed represenation of the script.       *      which will return the parsed representation of the script.
44       * - 3. Create a VM execution context by calling createExecContext().       * - 3. Create a VM execution context by calling createExecContext().
45       * - 4. Execute the script by calling method exec().       * - 4. Execute the script by calling method exec().
46       *       *
# Line 61  namespace LinuxSampler { Line 61  namespace LinuxSampler {
61    
62          /**          /**
63           * Loads a script given by its source code (passed as argument @a s to           * Loads a script given by its source code (passed as argument @a s to
64           * this method) and returns the parsed represenation of that script.           * this method) and returns the parsed representation of that script.
65           * After calling this method you must check the returned VMParserContext           * After calling this method you must check the returned VMParserContext
66           * object whether there had been any parser errors. If there were no           * object whether there had been any parser errors. If there were no
67           * parser errors, you may pass the VMParserContext object to method           * parser errors, you may pass the VMParserContext object to method
68           * exec() for actually executing the script.           * exec() for actually executing the script.
69           *           *
70           * @param s - entire source code of the script to be loaded           * @param s - entire source code of the script to be loaded
71           * @returns parsed represenation of the script           * @returns parsed representation of the script
72           */           */
73          VMParserContext* loadScript(const String& s);          VMParserContext* loadScript(const String& s);
74    
# Line 78  namespace LinuxSampler { Line 78  namespace LinuxSampler {
78           *           *
79           * @param is - input stream from which the entire source code of the           * @param is - input stream from which the entire source code of the
80           *             script is to be read and loaded from           *             script is to be read and loaded from
81           * @returns parsed represenation of the script           * @returns parsed representation of the script
82           */           */
83          VMParserContext* loadScript(std::istream* is);          VMParserContext* loadScript(std::istream* is);
84    
# Line 87  namespace LinuxSampler { Line 87  namespace LinuxSampler {
87           * argument @a context, to stdout. This method is for debugging purposes           * argument @a context, to stdout. This method is for debugging purposes
88           * only.           * only.
89           *           *
90           * @param context - parsed represenation of the script           * @param context - parsed representation of the script
91           * @see loadScript()           * @see loadScript()
92           */           */
93          void dumpParsedScript(VMParserContext* context);          void dumpParsedScript(VMParserContext* context);
# Line 99  namespace LinuxSampler { Line 99  namespace LinuxSampler {
99           * context differs for every script. So you must (re)create the           * context differs for every script. So you must (re)create the
100           * execution context for each script being loaded.           * execution context for each script being loaded.
101           *           *
102           * @param parserContext - parsed represenation of the script           * @param parserContext - parsed representation of the script
103           * @see loadScript()           * @see loadScript()
104           */           */
105          VMExecContext* createExecContext(VMParserContext* parserContext);          VMExecContext* createExecContext(VMParserContext* parserContext);
# Line 119  namespace LinuxSampler { Line 119  namespace LinuxSampler {
119           * wait() function). You must check the return value of this method to           * wait() function). You must check the return value of this method to
120           * find out which case applies.           * find out which case applies.
121           *           *
122           * @param parserContext - parsed represenation of the script (see loadScript())           * @param parserContext - parsed representation of the script (see loadScript())
123           * @param execContext - VM execution context (see createExecContext())           * @param execContext - VM execution context (see createExecContext())
124           * @param handler - precise event handler (i.e. "on note ... end on"           * @param handler - precise event handler (i.e. "on note ... end on"
125           *                  code block) to be executed           *                  code block) to be executed

Legend:
Removed from v.2728  
changed lines
  Added in v.2729

  ViewVC Help
Powered by ViewVC