/[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 3221 by schoenebeck, Fri May 26 18:30:42 2017 UTC revision 3557 by schoenebeck, Sun Aug 18 00:06:04 2019 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (c) 2014-2017 Christian Schoenebeck   * Copyright (c) 2014-2019 Christian Schoenebeck
3   *   *
4   * http://www.linuxsampler.org   * http://www.linuxsampler.org
5   *   *
# Line 173  namespace LinuxSampler { Line 173  namespace LinuxSampler {
173          VMFunction* functionByName(const String& name) OVERRIDE;          VMFunction* functionByName(const String& name) OVERRIDE;
174    
175          /**          /**
176             * Whether the passed built-in function is disabled and should thus be
177             * ignored by the parser at the passed parser context (parser state
178             * where the built-in function call occurs).
179             *
180             * @param fn - built-in function to be checked
181             * @param ctx - parser context at the position where the built-in
182             *              function call is located within the script
183             */
184            bool isFunctionDisabled(VMFunction* fn, VMParserContext* ctx) OVERRIDE;
185    
186            /**
187           * Returns all built-in integer script variables. This method returns a           * Returns all built-in integer script variables. This method returns a
188           * STL map, where the map's key is the variable name and the map's value           * STL map, where the map's key is the variable name and the map's value
189           * is the native pointer to the actual built-in variable.           * is the native pointer to the actual built-in variable.
# Line 180  namespace LinuxSampler { Line 191  namespace LinuxSampler {
191           * This method is re-implemented by deriving classes to add more use           * This method is re-implemented by deriving classes to add more use
192           * case specific built-in variables.           * case specific built-in variables.
193           */           */
194          std::map<String,VMIntRelPtr*> builtInIntVariables() OVERRIDE;          std::map<String,VMIntPtr*> builtInIntVariables() OVERRIDE;
195    
196          /**          /**
197           * Returns all built-in (8 bit) integer array script variables. This           * Returns all built-in (8 bit) integer array script variables. This
# Line 216  namespace LinuxSampler { Line 227  namespace LinuxSampler {
227           * DECLARE_VMINT_READONLY() to define the variable for read-only           * DECLARE_VMINT_READONLY() to define the variable for read-only
228           * access by scripts.           * access by scripts.
229           */           */
230          std::map<String,int> builtInConstIntVariables() OVERRIDE;          std::map<String,vmint> builtInConstIntVariables() OVERRIDE;
231    
232          /**          /**
233           * Returns all built-in dynamic variables. This method returns a STL           * Returns all built-in dynamic variables. This method returns a STL
# Line 256  namespace LinuxSampler { Line 267  namespace LinuxSampler {
267           */           */
268          bool isAutoSuspendEnabled() const;          bool isAutoSuspendEnabled() const;
269    
270            /**
271             * By default (i.e. in production use) the built-in exit() function
272             * prohibits any arguments to be passed to its function by scripts. So
273             * by default, scripts trying to pass any arguments to the built-in
274             * exit() function will yield in a parser error.
275             *
276             * By calling this method the built-in exit() function will optionally
277             * accept one argument to be passed to its function call by scripts. The
278             * value of that function argument will become available by calling
279             * VMExecContext::exitResult() after execution of the script.
280             *
281             * @see VMExecContext::exitResult()
282             */
283            void setExitResultEnabled(bool b = true);
284    
285            /**
286             * Returns @c true if the built-in exit() function optionally accepts
287             * a function argument by scripts.
288             *
289             * @see setExitResultEnabled()
290             */
291            bool isExitResultEnabled() const;
292    
293          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)
294          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)
295          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 264  namespace LinuxSampler { Line 298  namespace LinuxSampler {
298          VMEventHandler* m_eventHandler;          VMEventHandler* m_eventHandler;
299          ParserContext* m_parserContext;          ParserContext* m_parserContext;
300          bool m_autoSuspend;          bool m_autoSuspend;
301            bool m_acceptExitRes;
302          class CoreVMFunction_message* m_fnMessage;          class CoreVMFunction_message* m_fnMessage;
303          class CoreVMFunction_exit* m_fnExit;          class CoreVMFunction_exit* m_fnExit;
304          class CoreVMFunction_wait* m_fnWait;          class CoreVMFunction_wait* m_fnWait;

Legend:
Removed from v.3221  
changed lines
  Added in v.3557

  ViewVC Help
Powered by ViewVC