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

Legend:
Removed from v.3212  
changed lines
  Added in v.3588

  ViewVC Help
Powered by ViewVC