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