/[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 2885 by schoenebeck, Fri Apr 22 15:37:45 2016 UTC revision 2948 by schoenebeck, Fri Jul 15 15:29:04 2016 UTC
# Line 20  namespace LinuxSampler { Line 20  namespace LinuxSampler {
20    
21      class ParserContext;      class ParserContext;
22      class ExecContext;      class ExecContext;
     class CoreVMFunction_message;  
     class CoreVMFunction_exit;  
     class CoreVMFunction_wait;  
     class CoreVMFunction_abs;  
     class CoreVMFunction_random;  
     class CoreVMFunction_num_elements;  
23    
24      /** @brief Core virtual machine for real-time instrument scripts.      /** @brief Core virtual machine for real-time instrument scripts.
25       *       *
# Line 72  namespace LinuxSampler { Line 66  namespace LinuxSampler {
66           * parser errors, you may pass the VMParserContext object to method           * parser errors, you may pass the VMParserContext object to method
67           * exec() for actually executing the script.           * exec() for actually executing the script.
68           *           *
69             * It is your responsibility to free the returned VMParserContext
70             * object once you don't need it anymore.
71             *
72           * @param s - entire source code of the script to be loaded           * @param s - entire source code of the script to be loaded
73           * @returns parsed representation of the script           * @returns parsed representation of the script
74           */           */
# Line 197  namespace LinuxSampler { Line 194  namespace LinuxSampler {
194          std::map<String,VMInt8Array*> builtInIntArrayVariables() OVERRIDE;          std::map<String,VMInt8Array*> builtInIntArrayVariables() OVERRIDE;
195    
196          /**          /**
197           * Returns all built-in constant integer script variables, which can           * Returns all built-in constant integer script variables, which are
198           * only be read, but not be altered by scripts. This method returns a           * constant and their final data is already available at parser time
199           * STL map, where the map's key is the variable name and the map's value           * and won't change during runtime. Providing your built-in constants
200           * is the native pointer to the actual built-in constant variable.           * this way may lead to performance benefits compared to using other
201             * ways of providing built-in variables, because the script parser
202             * can perform optimizations when the script is refering to such
203             * constants.
204             *
205             * This type of built-in variable can only be read, but not be altered
206             * by scripts. This method returns a STL map, where the map's key is
207             * the variable name and the map's value is the final constant data.
208           *           *
209           * This method is re-implemented by deriving classes to add more use           * This method is re-implemented by deriving classes to add more use
210           * case specific built-in constant integers.           * case specific built-in constant integers.
211           *           *
212           * @b Note: the term "constant" is a bit misleading here, since           * @b Note: In case your built-in variable should be read-only but its
213           * built-in constant integer variables may indeed change, i.e. for           * value is not already available at parser time (i.e. because its
214           * built-in constant integers which i.e. reflect some kind of status of           * value may change at runtime), then you should add it to
215           * the sampler. So rather see them as "read only" variables, not as           * builtInIntVariables() instead and use the macro
216           * being actually consistent in time.           * DECLARE_VMINT_READONLY() to define the variable for read-only
217             * access by scripts.
218           */           */
219          std::map<String,int> builtInConstIntVariables() OVERRIDE;          std::map<String,int> builtInConstIntVariables() OVERRIDE;
220    
221            /**
222             * Returns all built-in dynamic variables. This method returns a STL
223             * map, where the map's key is the dynamic variable's name and the
224             * map's value is the pointer to the actual object implementing the
225             * behavior which is actually generating the content of the dynamic
226             * variable.
227             *
228             * This method is re-implemented by deriving classes to add more use
229             * case specific built-in dynamic variables.
230             */
231            std::map<String,VMDynVar*> builtInDynamicVariables() OVERRIDE;
232    
233          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)
234          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)
235          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)
# Line 220  namespace LinuxSampler { Line 237  namespace LinuxSampler {
237      protected:      protected:
238          VMEventHandler* m_eventHandler;          VMEventHandler* m_eventHandler;
239          ParserContext* m_parserContext;          ParserContext* m_parserContext;
240          CoreVMFunction_message* m_fnMessage;          class CoreVMFunction_message* m_fnMessage;
241          CoreVMFunction_exit* m_fnExit;          class CoreVMFunction_exit* m_fnExit;
242          CoreVMFunction_wait* m_fnWait;          class CoreVMFunction_wait* m_fnWait;
243          CoreVMFunction_abs* m_fnAbs;          class CoreVMFunction_abs* m_fnAbs;
244          CoreVMFunction_random* m_fnRandom;          class CoreVMFunction_random* m_fnRandom;
245          CoreVMFunction_num_elements* m_fnNumElements;          class CoreVMFunction_num_elements* m_fnNumElements;
246            class CoreVMFunction_inc* m_fnInc;
247            class CoreVMFunction_dec* m_fnDec;
248            class CoreVMDynVar_NKSP_REAL_TIMER* m_varRealTimer;
249            class CoreVMDynVar_NKSP_PERF_TIMER* m_varPerfTimer;
250      };      };
251    
252  } // namespace LinuxSampler  } // namespace LinuxSampler

Legend:
Removed from v.2885  
changed lines
  Added in v.2948

  ViewVC Help
Powered by ViewVC