/[svn]/linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/InstrumentScriptVMFunctions.h

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

revision 3255 by schoenebeck, Tue May 30 15:43:39 2017 UTC revision 3587 by schoenebeck, Sat Aug 31 12:08:49 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 19  namespace LinuxSampler { Line 19  namespace LinuxSampler {
19      class EventGroup;      class EventGroup;
20      class InstrumentScriptVM;      class InstrumentScriptVM;
21    
22      class InstrumentScriptVMFunction_play_note : public VMIntResultFunction {      class InstrumentScriptVMFunction_play_note FINAL : public VMIntResultFunction {
23      public:      public:
24          InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_play_note(InstrumentScriptVM* parent);
25          int minRequiredArgs() const { return 1; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
26          int maxAllowedArgs() const { return 4; }          bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
27          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          vmint minRequiredArgs() const OVERRIDE { return 1; }
28          ExprType_t argType(int iArg) const { return INT_EXPR; }          vmint maxAllowedArgs() const OVERRIDE { return 4; }
29          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
30            bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
31            bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
32            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
33      protected:      protected:
34          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
35      };      };
36    
37      class InstrumentScriptVMFunction_set_controller : public VMIntResultFunction {      class InstrumentScriptVMFunction_set_controller FINAL : public VMIntResultFunction {
38      public:      public:
39          InstrumentScriptVMFunction_set_controller(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_controller(InstrumentScriptVM* parent);
40          int minRequiredArgs() const { return 2; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
41          int maxAllowedArgs() const { return 2; }          bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
42          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          vmint minRequiredArgs() const OVERRIDE { return 2; }
43          ExprType_t argType(int iArg) const { return INT_EXPR; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
44          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
45            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
46      protected:      protected:
47          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
48      };      };
49    
50      class InstrumentScriptVMFunction_ignore_event : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_ignore_event FINAL : public VMEmptyResultFunction {
51      public:      public:
52          InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_ignore_event(InstrumentScriptVM* parent);
53          int minRequiredArgs() const { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
54          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
55          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
56          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
57      protected:      protected:
58          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
59      };      };
60    
61      class InstrumentScriptVMFunction_ignore_controller : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_ignore_controller FINAL : public VMEmptyResultFunction {
62      public:      public:
63          InstrumentScriptVMFunction_ignore_controller(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_ignore_controller(InstrumentScriptVM* parent);
64          int minRequiredArgs() const { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
65          int maxAllowedArgs() const { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
66          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
67          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
68      protected:      protected:
69          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
70      };      };
71    
72      class InstrumentScriptVMFunction_note_off : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_note_off FINAL : public VMEmptyResultFunction {
73      public:      public:
74          InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_note_off(InstrumentScriptVM* parent);
75          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
76          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
77          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
78          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
79      protected:      protected:
80          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
81      };      };
82    
83      class InstrumentScriptVMFunction_set_event_mark : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_set_event_mark FINAL : public VMEmptyResultFunction {
84      public:      public:
85          InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_event_mark(InstrumentScriptVM* parent);
86          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
87          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
88          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
89          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
90      protected:      protected:
91          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
92      };      };
93    
94      class InstrumentScriptVMFunction_delete_event_mark : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_delete_event_mark FINAL : public VMEmptyResultFunction {
95      public:      public:
96          InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_delete_event_mark(InstrumentScriptVM* parent);
97          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
98          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
99          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
100          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
101      protected:      protected:
102          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
103      };      };
104    
105      class InstrumentScriptVMFunction_by_marks : public VMFunction {      class InstrumentScriptVMFunction_by_marks FINAL : public VMFunction {
106      public:      public:
107          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);
108          int minRequiredArgs() const OVERRIDE { return 1; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
109          int maxAllowedArgs() const OVERRIDE { return 1; }          bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
110          bool acceptsArgType(int iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          vmint minRequiredArgs() const OVERRIDE { return 1; }
111          bool modifiesArg(int iArg) const OVERRIDE { return false; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
112          ExprType_t argType(int iArg) const OVERRIDE { return INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
113          ExprType_t returnType() OVERRIDE { return INT_ARR_EXPR; }          bool modifiesArg(vmint iArg) const OVERRIDE { return false; }
114            ExprType_t returnType(VMFnArgs* args) OVERRIDE { return INT_ARR_EXPR; }
115          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
116      protected:      protected:
117          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
# Line 120  namespace LinuxSampler { Line 120  namespace LinuxSampler {
120              StmtFlags_t flags;              StmtFlags_t flags;
121              EventGroup* eventGroup;              EventGroup* eventGroup;
122    
123              int arraySize() const OVERRIDE;              vmint arraySize() const OVERRIDE;
124              int evalIntElement(uint i) OVERRIDE;              vmint evalIntElement(vmuint i) OVERRIDE;
125              void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment              void assignIntElement(vmuint i, vmint value) OVERRIDE {} // ignore assignment
126                vmfloat unitFactorOfElement(vmuint i) const OVERRIDE { return VM_NO_FACTOR; }
127                void assignElementUnitFactor(vmuint i, vmfloat factor) OVERRIDE {} // ignore assignment
128              VMExpr* resultValue() OVERRIDE { return this; }              VMExpr* resultValue() OVERRIDE { return this; }
129              StmtFlags_t resultFlags() OVERRIDE { return flags; }              StmtFlags_t resultFlags() OVERRIDE { return flags; }
130              bool isConstExpr() const OVERRIDE { return false; }              bool isConstExpr() const OVERRIDE { return false; }
# Line 132  namespace LinuxSampler { Line 134  namespace LinuxSampler {
134          VMFnResult* successResult(EventGroup* eventGroup);          VMFnResult* successResult(EventGroup* eventGroup);
135      };      };
136    
137      class InstrumentScriptVMFunction_change_vol : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_vol FINAL : public VMEmptyResultFunction {
138      public:      public:
139          InstrumentScriptVMFunction_change_vol(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_vol(InstrumentScriptVM* parent);
140          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
141          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
142          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
143          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
144          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
145            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
146            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
147      protected:      protected:
148          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
149      };      };
150    
151      class InstrumentScriptVMFunction_change_tune : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_tune FINAL : public VMEmptyResultFunction {
152      public:      public:
153          InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_tune(InstrumentScriptVM* parent);
154          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
155          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
156          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
157          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
158          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
159            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
160      protected:      protected:
161          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
162      };      };
163    
164      class InstrumentScriptVMFunction_change_pan : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_pan FINAL : public VMEmptyResultFunction {
165      public:      public:
166          InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_pan(InstrumentScriptVM* parent);
167          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
168          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
169          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
170          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
171          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
172      protected:      protected:
173          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
174      };      };
175    
176      class InstrumentScriptVMFunction_change_cutoff : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_cutoff FINAL : public VMEmptyResultFunction {
177      public:      public:
178          InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_cutoff(InstrumentScriptVM* parent);
179          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
180          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
181          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
182          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
183          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
184            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
185            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
186      protected:      protected:
187          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
188      };      };
189    
190      class InstrumentScriptVMFunction_change_reso : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_reso FINAL : public VMEmptyResultFunction {
191      public:      public:
192          InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_reso(InstrumentScriptVM* parent);
193          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
194          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
195          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
196          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
197          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
198      protected:      protected:
199          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
200      };      };
201            
202      class InstrumentScriptVMFunction_change_attack : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_attack FINAL : public VMEmptyResultFunction {
203      public:      public:
204          InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);
205          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
206          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
207          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
208          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
209          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
210            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
211            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
212      protected:      protected:
213          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
214      };      };
215    
216      class InstrumentScriptVMFunction_change_decay : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_decay FINAL : public VMEmptyResultFunction {
217      public:      public:
218          InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);
219          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
220          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
221          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
222          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
223          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
224            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
225            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
226      protected:      protected:
227          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
228      };      };
229            
230      class InstrumentScriptVMFunction_change_release : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_release FINAL : public VMEmptyResultFunction {
231      public:      public:
232          InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);
233          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
234          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
235          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
236          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
237          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
238            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
239            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
240      protected:      protected:
241          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
242      };      };
243    
244      class VMChangeSynthParamFunction : public VMEmptyResultFunction {      class VMChangeSynthParamFunction : public VMEmptyResultFunction {
245      public:      public:
246          VMChangeSynthParamFunction(InstrumentScriptVM* parent) : m_vm(parent) {}          struct Opt_t {
247          int minRequiredArgs() const { return 2; }              InstrumentScriptVM* vm = NULL; ///< Parent object owning the built-in function implementation object.
248          int maxAllowedArgs() const { return 2; }              bool acceptFinal = false; ///< Whether built-in function allows 'final' operator for its 2nd function argument.
249          bool acceptsArgType(int iArg, ExprType_t type) const;              StdUnit_t unit = VM_NO_UNIT; ///< Whether built-in functions accepts a unit type for its 2nd function argument and if yes which one.
250          ExprType_t argType(int iArg) const { return INT_EXPR; }              bool acceptUnitPrefix = false; ///< Whether built-in function accepts metric unit prefix(es) for its 2nd function argument.
251                bool acceptReal = false; ///< Whether the built-in function accepts both int and real number as data type for its 2nd function argument (otherwise its int only if false).
252          template<float NoteBase::_Override::*T_noteParam, int T_synthParam,          };
253                   bool T_isNormalizedParam, int T_maxValue, int T_minValue>          VMChangeSynthParamFunction(const Opt_t& opt)
254                : m_vm(opt.vm), m_acceptReal(opt.acceptReal),
255                  m_acceptFinal(opt.acceptFinal),
256                  m_acceptUnitPrefix(opt.acceptUnitPrefix), m_unit(opt.unit) {}
257            vmint minRequiredArgs() const OVERRIDE { return 2; }
258            vmint maxAllowedArgs() const OVERRIDE { return 2; }
259            bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
260            bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
261            bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
262            bool acceptsArgFinal(vmint iArg) const OVERRIDE;
263    
264            template<class T_NoteParamType, T_NoteParamType NoteBase::_Override::*T_noteParam,
265                    vmint T_synthParam,
266                    vmint T_minValueNorm, vmint T_maxValueNorm, bool T_normalizeNorm,
267                    vmint T_minValueUnit, vmint T_maxValueUnit,
268                    MetricPrefix_t T_unitPrefix0, MetricPrefix_t ... T_unitPrefixN>
269          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);
270      protected:      protected:
271          InstrumentScriptVM* m_vm;          InstrumentScriptVM* const m_vm;
272            const bool m_acceptReal;
273            const bool m_acceptFinal;
274            const bool m_acceptUnitPrefix;
275            const StdUnit_t m_unit;
276        };
277    
278        class InstrumentScriptVMFunction_change_sustain FINAL : public VMChangeSynthParamFunction {
279        public:
280            InstrumentScriptVMFunction_change_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
281                .vm = parent,
282                .acceptFinal = true,
283                .unit = VM_BEL,
284                .acceptUnitPrefix = true,
285                .acceptReal = true,
286            }) {}
287            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
288        };
289    
290        class InstrumentScriptVMFunction_change_cutoff_attack FINAL : public VMChangeSynthParamFunction {
291        public:
292            InstrumentScriptVMFunction_change_cutoff_attack(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
293                .vm = parent,
294                .acceptFinal = true,
295                .unit = VM_SECOND,
296                .acceptUnitPrefix = true,
297                .acceptReal = true,
298            }) {}
299            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
300        };
301    
302        class InstrumentScriptVMFunction_change_cutoff_decay FINAL : public VMChangeSynthParamFunction {
303        public:
304            InstrumentScriptVMFunction_change_cutoff_decay(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
305                .vm = parent,
306                .acceptFinal = true,
307                .unit = VM_SECOND,
308                .acceptUnitPrefix = true,
309                .acceptReal = true,
310            }) {}
311            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
312        };
313    
314        class InstrumentScriptVMFunction_change_cutoff_sustain FINAL : public VMChangeSynthParamFunction {
315        public:
316            InstrumentScriptVMFunction_change_cutoff_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
317                .vm = parent,
318                .acceptFinal = true,
319                .unit = VM_BEL,
320                .acceptUnitPrefix = true,
321                .acceptReal = true,
322            }) {}
323            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
324        };
325    
326        class InstrumentScriptVMFunction_change_cutoff_release FINAL : public VMChangeSynthParamFunction {
327        public:
328            InstrumentScriptVMFunction_change_cutoff_release(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
329                .vm = parent,
330                .acceptFinal = true,
331                .unit = VM_SECOND,
332                .acceptUnitPrefix = true,
333                .acceptReal = true,
334            }) {}
335            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
336        };
337    
338        class InstrumentScriptVMFunction_change_amp_lfo_depth FINAL : public VMChangeSynthParamFunction {
339        public:
340            InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
341                .vm = parent,
342                .acceptFinal = true,
343                .unit = VM_NO_UNIT,
344                .acceptUnitPrefix = false,
345                .acceptReal = false,
346            }) {}
347            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
348        };
349    
350        class InstrumentScriptVMFunction_change_amp_lfo_freq FINAL : public VMChangeSynthParamFunction {
351        public:
352            InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
353                .vm = parent,
354                .acceptFinal = true,
355                .unit = VM_HERTZ,
356                .acceptUnitPrefix = true,
357                .acceptReal = true,
358            }) {}
359            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
360        };
361    
362        class InstrumentScriptVMFunction_change_cutoff_lfo_depth FINAL : public VMChangeSynthParamFunction {
363        public:
364            InstrumentScriptVMFunction_change_cutoff_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
365                .vm = parent,
366                .acceptFinal = true,
367                .unit = VM_NO_UNIT,
368                .acceptUnitPrefix = false,
369                .acceptReal = false,
370            }) {}
371            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
372      };      };
373    
374      class InstrumentScriptVMFunction_change_amp_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_lfo_freq FINAL : public VMChangeSynthParamFunction {
375      public:      public:
376          InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_cutoff_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
377          VMFnResult* exec(VMFnArgs* args);              .vm = parent,
378                .acceptFinal = true,
379                .unit = VM_HERTZ,
380                .acceptUnitPrefix = true,
381                .acceptReal = true,
382            }) {}
383            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
384      };      };
385    
386      class InstrumentScriptVMFunction_change_amp_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pitch_lfo_depth FINAL : public VMChangeSynthParamFunction {
387      public:      public:
388          InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
389          VMFnResult* exec(VMFnArgs* args);              .vm = parent,
390                .acceptFinal = true,
391                .unit = VM_NO_UNIT,
392                .acceptUnitPrefix = false,
393                .acceptReal = false,
394            }) {}
395            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
396      };      };
397    
398      class InstrumentScriptVMFunction_change_pitch_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pitch_lfo_freq FINAL : public VMChangeSynthParamFunction {
399      public:      public:
400          InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
401          VMFnResult* exec(VMFnArgs* args);              .vm = parent,
402                .acceptFinal = true,
403                .unit = VM_HERTZ,
404                .acceptUnitPrefix = true,
405                .acceptReal = true,
406            }) {}
407            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
408      };      };
409    
410      class InstrumentScriptVMFunction_change_pitch_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_vol_time FINAL : public VMChangeSynthParamFunction {
411      public:      public:
412          InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
413          VMFnResult* exec(VMFnArgs* args);              .vm = parent,
414                .acceptFinal = false,
415                .unit = VM_SECOND,
416                .acceptUnitPrefix = true,
417                .acceptReal = true,
418            }) {}
419            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
420      };      };
421    
422      class InstrumentScriptVMFunction_change_vol_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_tune_time FINAL : public VMChangeSynthParamFunction {
423      public:      public:
424          InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
425          VMFnResult* exec(VMFnArgs* args);              .vm = parent,
426                .acceptFinal = false,
427                .unit = VM_SECOND,
428                .acceptUnitPrefix = true,
429                .acceptReal = true,
430            }) {}
431            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
432      };      };
433    
434      class InstrumentScriptVMFunction_change_tune_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pan_time FINAL : public VMChangeSynthParamFunction {
435      public:      public:
436          InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent) {}          InstrumentScriptVMFunction_change_pan_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
437          VMFnResult* exec(VMFnArgs* args);              .vm = parent,
438                .acceptFinal = false,
439                .unit = VM_SECOND,
440                .acceptUnitPrefix = true,
441                .acceptReal = true,
442            }) {}
443            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
444      };      };
445    
446      class VMChangeFadeCurveFunction : public VMEmptyResultFunction {      class VMChangeFadeCurveFunction : public VMEmptyResultFunction {
447      public:      public:
448          VMChangeFadeCurveFunction(InstrumentScriptVM* parent) : m_vm(parent) {}          VMChangeFadeCurveFunction(InstrumentScriptVM* parent) : m_vm(parent) {}
449          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
450          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
451          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
         ExprType_t argType(int iArg) const { return INT_EXPR; }  
452    
453          template<fade_curve_t NoteBase::_Override::*T_noteParam, int T_synthParam>          template<fade_curve_t NoteBase::_Override::*T_noteParam, vmint T_synthParam>
454          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);
455      protected:      protected:
456          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
457      };      };
458    
459      class InstrumentScriptVMFunction_change_vol_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_vol_curve FINAL : public VMChangeFadeCurveFunction {
460      public:      public:
461          InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
462          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
463      };      };
464    
465      class InstrumentScriptVMFunction_change_tune_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_tune_curve FINAL : public VMChangeFadeCurveFunction {
466      public:      public:
467          InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
468          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
469      };      };
470    
471      class InstrumentScriptVMFunction_fade_in : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_pan_curve FINAL : public VMChangeFadeCurveFunction {
472        public:
473            InstrumentScriptVMFunction_change_pan_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
474            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
475        };
476    
477        class InstrumentScriptVMFunction_fade_in FINAL : public VMEmptyResultFunction {
478      public:      public:
479          InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent);
480          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
481          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
482          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
483          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
484          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
485            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
486      protected:      protected:
487          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
488      };      };
489    
490      class InstrumentScriptVMFunction_fade_out : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_fade_out FINAL : public VMEmptyResultFunction {
491      public:      public:
492          InstrumentScriptVMFunction_fade_out(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_fade_out(InstrumentScriptVM* parent);
493          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
494          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
495          bool acceptsArgType(int iArg, ExprType_t type) const;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
496          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
497          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
498            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
499      protected:      protected:
500          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
501      };      };
502    
503      class InstrumentScriptVMFunction_get_event_par : public VMIntResultFunction {      class InstrumentScriptVMFunction_get_event_par FINAL : public VMIntResultFunction {
504      public:      public:
505          InstrumentScriptVMFunction_get_event_par(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_get_event_par(InstrumentScriptVM* parent);
506          int minRequiredArgs() const { return 2; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
507          int maxAllowedArgs() const { return 2; }          bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
508          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          vmint minRequiredArgs() const OVERRIDE { return 2; }
509          ExprType_t argType(int iArg) const { return INT_EXPR; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
510          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
511            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
512      protected:      protected:
513          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
514      };      };
515    
516      class InstrumentScriptVMFunction_set_event_par : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_set_event_par FINAL : public VMEmptyResultFunction {
517      public:      public:
518          InstrumentScriptVMFunction_set_event_par(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_set_event_par(InstrumentScriptVM* parent);
519          int minRequiredArgs() const { return 3; }          vmint minRequiredArgs() const OVERRIDE { return 3; }
520          int maxAllowedArgs() const { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
521          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
522          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
523      protected:      protected:
524          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
525      };      };
526    
527      class InstrumentScriptVMFunction_change_note : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_note FINAL : public VMEmptyResultFunction {
528      public:      public:
529          InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent);
530          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
531          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
532          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
533          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
534      protected:      protected:
535          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
536      };      };
537    
538      class InstrumentScriptVMFunction_change_velo : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_velo FINAL : public VMEmptyResultFunction {
539      public:      public:
540          InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent);
541          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
542          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
543          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
544          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
         VMFnResult* exec(VMFnArgs* args);  
545      protected:      protected:
546          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
547      };      };
548    
549      class InstrumentScriptVMFunction_change_play_pos : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_play_pos FINAL : public VMEmptyResultFunction {
550      public:      public:
551          InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent);
552          int minRequiredArgs() const { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
553          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
554          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
555          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
556          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
557            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
558      protected:      protected:
559          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
560      };      };
561    
562      class InstrumentScriptVMFunction_event_status : public VMIntResultFunction {      class InstrumentScriptVMFunction_event_status FINAL : public VMIntResultFunction {
563      public:      public:
564          InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent);
565          int minRequiredArgs() const { return 1; }          StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
566          int maxAllowedArgs() const { return 1; }          bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
567          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          vmint minRequiredArgs() const OVERRIDE { return 1; }
568          ExprType_t argType(int iArg) const { return INT_EXPR; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
569          VMFnResult* exec(VMFnArgs* args);          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
570            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
571        protected:
572            InstrumentScriptVM* m_vm;
573        };
574    
575        class InstrumentScriptVMFunction_callback_status FINAL : public VMIntResultFunction {
576        public:
577            InstrumentScriptVMFunction_callback_status(InstrumentScriptVM* parent);
578            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
579            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
580            vmint minRequiredArgs() const OVERRIDE { return 1; }
581            vmint maxAllowedArgs() const OVERRIDE { return 1; }
582            bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
583            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
584      protected:      protected:
585          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
586      };      };
587    
588      // overrides core wait() implementation      // overrides core wait() implementation
589      class InstrumentScriptVMFunction_wait : public CoreVMFunction_wait {      class InstrumentScriptVMFunction_wait FINAL : public CoreVMFunction_wait {
590      public:      public:
591          InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent);
592          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
593      };      };
594    
595      class InstrumentScriptVMFunction_stop_wait : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_stop_wait FINAL : public VMEmptyResultFunction {
596      public:      public:
597          InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent);
598          int minRequiredArgs() const { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
599          int maxAllowedArgs() const { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
600          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
601          ExprType_t argType(int iArg) const { return INT_EXPR; }          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
602          VMFnResult* exec(VMFnArgs* args);      protected:
603            InstrumentScriptVM* m_vm;
604        };
605    
606        class InstrumentScriptVMFunction_abort FINAL : public VMEmptyResultFunction {
607        public:
608            InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent);
609            vmint minRequiredArgs() const OVERRIDE { return 1; }
610            vmint maxAllowedArgs() const OVERRIDE { return 1; }
611            bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; }
612            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
613        protected:
614            InstrumentScriptVM* m_vm;
615        };
616    
617        class InstrumentScriptVMFunction_fork FINAL : public VMIntResultFunction {
618        public:
619            InstrumentScriptVMFunction_fork(InstrumentScriptVM* parent);
620            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
621            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
622            vmint minRequiredArgs() const OVERRIDE { return 0; }
623            vmint maxAllowedArgs() const OVERRIDE { return 2; }
624            bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
625            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
626      protected:      protected:
627          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
628      };      };

Legend:
Removed from v.3255  
changed lines
  Added in v.3587

  ViewVC Help
Powered by ViewVC