/[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 3577 by schoenebeck, Wed Aug 28 15:23:23 2019 UTC revision 3588 by schoenebeck, Sun Sep 1 16:06:48 2019 UTC
# 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            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
27            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
28          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
29          vmint maxAllowedArgs() const OVERRIDE { return 4; }          vmint maxAllowedArgs() const OVERRIDE { return 4; }
30          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
31          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          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;          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            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
44            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
45          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
46          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
47          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
48          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
57          vmint maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
58          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
59          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
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          vmint minRequiredArgs() const OVERRIDE { return 0; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
68          vmint maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
69          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
70          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
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          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
80          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
81          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
82          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
83                           std::function<void(String)> wrn) OVERRIDE;
84          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
94          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
95          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
96          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
97                           std::function<void(String)> wrn) OVERRIDE;
98          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
108          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
109          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
110          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
111                           std::function<void(String)> wrn) OVERRIDE;
112          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
122            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
123          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
124          vmint maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
125          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
126          bool modifiesArg(vmint iArg) const OVERRIDE { return false; }          bool modifiesArg(vmint iArg) const OVERRIDE { return false; }
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
127          ExprType_t returnType(VMFnArgs* args) OVERRIDE { return INT_ARR_EXPR; }          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 123  namespace LinuxSampler { Line 138  namespace LinuxSampler {
138              vmint arraySize() const OVERRIDE;              vmint arraySize() const OVERRIDE;
139              vmint evalIntElement(vmuint i) OVERRIDE;              vmint evalIntElement(vmuint i) OVERRIDE;
140              void assignIntElement(vmuint i, vmint 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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 141  namespace LinuxSampler { Line 158  namespace LinuxSampler {
158          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
159          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
160          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
161          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 155  namespace LinuxSampler { Line 171  namespace LinuxSampler {
171          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
172          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
173          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
174          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
183          vmint maxAllowedArgs() const OVERRIDE { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
184          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
185          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
186          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 183  namespace LinuxSampler { Line 198  namespace LinuxSampler {
198          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
199          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
200          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
201          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
202                           std::function<void(String)> wrn) OVERRIDE;
203          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
212          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
213          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
214          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
215          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 211  namespace LinuxSampler { Line 227  namespace LinuxSampler {
227          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
228          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
229          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
230          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
231                           std::function<void(String)> wrn) OVERRIDE;
232          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 226  namespace LinuxSampler { Line 244  namespace LinuxSampler {
244          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
245          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
246          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
247          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
248                           std::function<void(String)> wrn) OVERRIDE;
249          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 241  namespace LinuxSampler { Line 261  namespace LinuxSampler {
261          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
262          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
263          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
264          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          void checkArgs(VMFnArgs* args, std::function<void(String)> err,
265                           std::function<void(String)> wrn) OVERRIDE;
266          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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, bool acceptFinal, StdUnit_t unit, bool acceptUnitPrefix)          struct Opt_t {
275              : m_vm(parent), m_acceptFinal(acceptFinal), m_acceptUnitPrefix(acceptUnitPrefix), m_unit(unit) {}              InstrumentScriptVM* vm = NULL; ///< Parent object owning the built-in function implementation object.
276                bool acceptFinal = false; ///< Whether built-in function allows 'final' operator for its 2nd function argument.
277                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                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            };
281            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; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
286          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
287          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
288          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
289          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
290          bool acceptsArgFinal(vmint iArg) const OVERRIDE;          bool acceptsArgFinal(vmint iArg) const OVERRIDE;
291          ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }          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,          template<class T_NoteParamType, T_NoteParamType NoteBase::_Override::*T_noteParam,
295                  vmint T_synthParam,                  vmint T_synthParam,
# Line 266  namespace LinuxSampler { Line 298  namespace LinuxSampler {
298                  MetricPrefix_t T_unitPrefix0, MetricPrefix_t ... T_unitPrefixN>                  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;          const bool m_acceptFinal;
304          const bool m_acceptUnitPrefix;          const bool m_acceptUnitPrefix;
305          const StdUnit_t m_unit;          const StdUnit_t m_unit;
306      };      };
307    
308      class InstrumentScriptVMFunction_change_sustain : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_sustain FINAL : public VMChangeSynthParamFunction {
309      public:      public:
310          InstrumentScriptVMFunction_change_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_BEL,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
318      };      };
319    
320      class InstrumentScriptVMFunction_change_cutoff_attack : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_attack FINAL : public VMChangeSynthParamFunction {
321      public:      public:
322          InstrumentScriptVMFunction_change_cutoff_attack(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
330      };      };
331    
332      class InstrumentScriptVMFunction_change_cutoff_decay : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_decay FINAL : public VMChangeSynthParamFunction {
333      public:      public:
334          InstrumentScriptVMFunction_change_cutoff_decay(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
342      };      };
343    
344      class InstrumentScriptVMFunction_change_cutoff_sustain : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_sustain FINAL : public VMChangeSynthParamFunction {
345      public:      public:
346          InstrumentScriptVMFunction_change_cutoff_sustain(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_BEL,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
354      };      };
355    
356      class InstrumentScriptVMFunction_change_cutoff_release : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_release FINAL : public VMChangeSynthParamFunction {
357      public:      public:
358          InstrumentScriptVMFunction_change_cutoff_release(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_SECOND,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
366      };      };
367    
368      class InstrumentScriptVMFunction_change_amp_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_amp_lfo_depth FINAL : public VMChangeSynthParamFunction {
369      public:      public:
370          InstrumentScriptVMFunction_change_amp_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
378      };      };
379    
380      class InstrumentScriptVMFunction_change_amp_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_amp_lfo_freq FINAL : public VMChangeSynthParamFunction {
381      public:      public:
382          InstrumentScriptVMFunction_change_amp_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
390      };      };
391    
392      class InstrumentScriptVMFunction_change_cutoff_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_lfo_depth FINAL : public VMChangeSynthParamFunction {
393      public:      public:
394          InstrumentScriptVMFunction_change_cutoff_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
402      };      };
403    
404      class InstrumentScriptVMFunction_change_cutoff_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_cutoff_lfo_freq FINAL : public VMChangeSynthParamFunction {
405      public:      public:
406          InstrumentScriptVMFunction_change_cutoff_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
414      };      };
415    
416      class InstrumentScriptVMFunction_change_pitch_lfo_depth : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pitch_lfo_depth FINAL : public VMChangeSynthParamFunction {
417      public:      public:
418          InstrumentScriptVMFunction_change_pitch_lfo_depth(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_NO_UNIT,false) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
426      };      };
427    
428      class InstrumentScriptVMFunction_change_pitch_lfo_freq : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pitch_lfo_freq FINAL : public VMChangeSynthParamFunction {
429      public:      public:
430          InstrumentScriptVMFunction_change_pitch_lfo_freq(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,true,VM_HERTZ,true) {}          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;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
438      };      };
439    
440      class InstrumentScriptVMFunction_change_vol_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_vol_time FINAL : public VMChangeSynthParamFunction {
441      public:      public:
442          InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {}          InstrumentScriptVMFunction_change_vol_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
443                .vm = parent,
444                .acceptFinal = false,
445                .unit = VM_SECOND,
446                .acceptUnitPrefix = true,
447                .acceptReal = true,
448            }) {}
449          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
450      };      };
451    
452      class InstrumentScriptVMFunction_change_tune_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_tune_time FINAL : public VMChangeSynthParamFunction {
453      public:      public:
454          InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {}          InstrumentScriptVMFunction_change_tune_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
455                .vm = parent,
456                .acceptFinal = false,
457                .unit = VM_SECOND,
458                .acceptUnitPrefix = true,
459                .acceptReal = true,
460            }) {}
461          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
462      };      };
463    
464      class InstrumentScriptVMFunction_change_pan_time : public VMChangeSynthParamFunction {      class InstrumentScriptVMFunction_change_pan_time FINAL : public VMChangeSynthParamFunction {
465      public:      public:
466          InstrumentScriptVMFunction_change_pan_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction(parent,false,VM_SECOND,true) {}          InstrumentScriptVMFunction_change_pan_time(InstrumentScriptVM* parent) : VMChangeSynthParamFunction({
467                .vm = parent,
468                .acceptFinal = false,
469                .unit = VM_SECOND,
470                .acceptUnitPrefix = true,
471                .acceptReal = true,
472            }) {}
473          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
474      };      };
475    
# Line 362  namespace LinuxSampler { Line 479  namespace LinuxSampler {
479          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
480          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
481          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
482    
483          template<fade_curve_t NoteBase::_Override::*T_noteParam, vmint T_synthParam>          template<fade_curve_t NoteBase::_Override::*T_noteParam, vmint T_synthParam>
484          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);          VMFnResult* execTemplate(VMFnArgs* args, const char* functionName);
# Line 370  namespace LinuxSampler { Line 486  namespace LinuxSampler {
486          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
487      };      };
488    
489      class InstrumentScriptVMFunction_change_vol_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_vol_curve FINAL : public VMChangeFadeCurveFunction {
490      public:      public:
491          InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_vol_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
492          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
493      };      };
494    
495      class InstrumentScriptVMFunction_change_tune_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_tune_curve FINAL : public VMChangeFadeCurveFunction {
496      public:      public:
497          InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_tune_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
498          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
499      };      };
500    
501      class InstrumentScriptVMFunction_change_pan_curve : public VMChangeFadeCurveFunction {      class InstrumentScriptVMFunction_change_pan_curve FINAL : public VMChangeFadeCurveFunction {
502      public:      public:
503          InstrumentScriptVMFunction_change_pan_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}          InstrumentScriptVMFunction_change_pan_curve(InstrumentScriptVM* parent) : VMChangeFadeCurveFunction(parent) {}
504          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
505      };      };
506    
507      class InstrumentScriptVMFunction_fade_in : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_fade_in FINAL : public VMEmptyResultFunction {
508      public:      public:
509          InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_fade_in(InstrumentScriptVM* parent);
510          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 396  namespace LinuxSampler { Line 512  namespace LinuxSampler {
512          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
513          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
514          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
515          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
# Line 410  namespace LinuxSampler { Line 525  namespace LinuxSampler {
525          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
526          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
527          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
528          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
537            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
538          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
539          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
540          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
541          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 3; }          vmint minRequiredArgs() const OVERRIDE { return 3; }
550          vmint maxAllowedArgs() const OVERRIDE { return 3; }          vmint maxAllowedArgs() const OVERRIDE { return 3; }
551          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
552          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
553      protected:      protected:
554          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
555      };      };
556    
557      class InstrumentScriptVMFunction_change_note : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_note FINAL : public VMEmptyResultFunction {
558      public:      public:
559          InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_note(InstrumentScriptVM* parent);
560          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
561          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
562          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
563          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
564      protected:      protected:
565          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
566      };      };
567    
568      class InstrumentScriptVMFunction_change_velo : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_velo FINAL : public VMEmptyResultFunction {
569      public:      public:
570          InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_velo(InstrumentScriptVM* parent);
571          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
572          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
573          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
574          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
575      protected:      protected:
576          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
577      };      };
578    
579      class InstrumentScriptVMFunction_change_play_pos : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_change_play_pos FINAL : public VMEmptyResultFunction {
580      public:      public:
581          InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_change_play_pos(InstrumentScriptVM* parent);
582          vmint minRequiredArgs() const OVERRIDE { return 2; }          vmint minRequiredArgs() const OVERRIDE { return 2; }
583          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
584          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE;
585          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitType(vmint iArg, StdUnit_t type) const OVERRIDE;
586          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;          bool acceptsArgUnitPrefix(vmint iArg, StdUnit_t type) const OVERRIDE;
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
587          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
588      protected:      protected:
589          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
590      };      };
591    
592      class InstrumentScriptVMFunction_event_status : public VMIntResultFunction {      class InstrumentScriptVMFunction_event_status FINAL : public VMIntResultFunction {
593      public:      public:
594          InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_event_status(InstrumentScriptVM* parent);
595            StdUnit_t returnUnitType(VMFnArgs* args) OVERRIDE { return VM_NO_UNIT; }
596            bool returnsFinal(VMFnArgs* args) OVERRIDE { return false; }
597          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
598          vmint maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
599          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
600          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
601      protected:      protected:
602          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
603      };      };
604    
605      class InstrumentScriptVMFunction_callback_status : public VMIntResultFunction {      class InstrumentScriptVMFunction_callback_status FINAL : public VMIntResultFunction {
606      public:      public:
607          InstrumentScriptVMFunction_callback_status(InstrumentScriptVM* parent);          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; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
611          vmint maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
612          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
613          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          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) OVERRIDE;          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          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
629          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
630          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
631          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
632      protected:      protected:
633          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
634      };      };
635    
636      class InstrumentScriptVMFunction_abort : public VMEmptyResultFunction {      class InstrumentScriptVMFunction_abort FINAL : public VMEmptyResultFunction {
637      public:      public:
638          InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_abort(InstrumentScriptVM* parent);
639          vmint minRequiredArgs() const OVERRIDE { return 1; }          vmint minRequiredArgs() const OVERRIDE { return 1; }
640          vmint maxAllowedArgs() const OVERRIDE { return 1; }          vmint maxAllowedArgs() const OVERRIDE { return 1; }
641          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; }          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR; }
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
642          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
643      protected:      protected:
644          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
645      };      };
646    
647      class InstrumentScriptVMFunction_fork : public VMIntResultFunction {      class InstrumentScriptVMFunction_fork FINAL : public VMIntResultFunction {
648      public:      public:
649          InstrumentScriptVMFunction_fork(InstrumentScriptVM* parent);          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; }          vmint minRequiredArgs() const OVERRIDE { return 0; }
653          vmint maxAllowedArgs() const OVERRIDE { return 2; }          vmint maxAllowedArgs() const OVERRIDE { return 2; }
654          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}          bool acceptsArgType(vmint iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
         ExprType_t argType(vmint iArg) const OVERRIDE { return INT_EXPR; }  
655          VMFnResult* exec(VMFnArgs* args) OVERRIDE;          VMFnResult* exec(VMFnArgs* args) OVERRIDE;
656      protected:      protected:
657          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;

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

  ViewVC Help
Powered by ViewVC