/[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 2935 by schoenebeck, Sun Jul 10 14:24:13 2016 UTC revision 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC
# Line 105  namespace LinuxSampler { Line 105  namespace LinuxSampler {
105      class InstrumentScriptVMFunction_by_marks : public VMFunction {      class InstrumentScriptVMFunction_by_marks : public VMFunction {
106      public:      public:
107          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);          InstrumentScriptVMFunction_by_marks(InstrumentScriptVM* parent);
108          int minRequiredArgs() const { return 1; }          int minRequiredArgs() const OVERRIDE { return 1; }
109          int maxAllowedArgs() const { return 1; }          int maxAllowedArgs() const OVERRIDE { return 1; }
110          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(int iArg, ExprType_t type) const OVERRIDE { return type == INT_EXPR;}
111          ExprType_t argType(int iArg) const { return INT_EXPR; }          bool modifiesArg(int iArg) const OVERRIDE { return false; }
112          ExprType_t returnType() { return INT_ARR_EXPR; }          ExprType_t argType(int iArg) const OVERRIDE { return INT_EXPR; }
113          VMFnResult* exec(VMFnArgs* args);          ExprType_t returnType() OVERRIDE { return INT_ARR_EXPR; }
114            VMFnResult* exec(VMFnArgs* args) OVERRIDE;
115      protected:      protected:
116          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
117          class Result : public VMFnResult, public VMIntArrayExpr {          class Result : public VMFnResult, public VMIntArrayExpr {
# Line 122  namespace LinuxSampler { Line 123  namespace LinuxSampler {
123              int evalIntElement(uint i) OVERRIDE;              int evalIntElement(uint i) OVERRIDE;
124              void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment              void assignIntElement(uint i, int value) OVERRIDE {} // ignore assignment
125              VMExpr* resultValue() OVERRIDE { return this; }              VMExpr* resultValue() OVERRIDE { return this; }
126              StmtFlags_t resultFlags() { return flags; }              StmtFlags_t resultFlags() OVERRIDE { return flags; }
127                bool isConstExpr() const OVERRIDE { return false; }
128          } m_result;          } m_result;
129    
130          VMFnResult* errorResult();          VMFnResult* errorResult();
# Line 188  namespace LinuxSampler { Line 190  namespace LinuxSampler {
190      protected:      protected:
191          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
192      };      };
193        
194        class InstrumentScriptVMFunction_change_attack : public VMEmptyResultFunction {
195        public:
196            InstrumentScriptVMFunction_change_attack(InstrumentScriptVM* parent);
197            int minRequiredArgs() const { return 2; }
198            int maxAllowedArgs() const { return 2; }
199            bool acceptsArgType(int iArg, ExprType_t type) const;
200            ExprType_t argType(int iArg) const { return INT_EXPR; }
201            VMFnResult* exec(VMFnArgs* args);
202        protected:
203            InstrumentScriptVM* m_vm;
204        };
205    
206        class InstrumentScriptVMFunction_change_decay : public VMEmptyResultFunction {
207        public:
208            InstrumentScriptVMFunction_change_decay(InstrumentScriptVM* parent);
209            int minRequiredArgs() const { return 2; }
210            int maxAllowedArgs() const { return 2; }
211            bool acceptsArgType(int iArg, ExprType_t type) const;
212            ExprType_t argType(int iArg) const { return INT_EXPR; }
213            VMFnResult* exec(VMFnArgs* args);
214        protected:
215            InstrumentScriptVM* m_vm;
216        };
217        
218        class InstrumentScriptVMFunction_change_release : public VMEmptyResultFunction {
219        public:
220            InstrumentScriptVMFunction_change_release(InstrumentScriptVM* parent);
221            int minRequiredArgs() const { return 2; }
222            int maxAllowedArgs() const { return 2; }
223            bool acceptsArgType(int iArg, ExprType_t type) const;
224            ExprType_t argType(int iArg) const { return INT_EXPR; }
225            VMFnResult* exec(VMFnArgs* args);
226        protected:
227            InstrumentScriptVM* m_vm;
228        };
229    
230      class InstrumentScriptVMFunction_event_status : public VMIntResultFunction {      class InstrumentScriptVMFunction_event_status : public VMIntResultFunction {
231      public:      public:
# Line 197  namespace LinuxSampler { Line 235  namespace LinuxSampler {
235          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}          bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
236          ExprType_t argType(int iArg) const { return INT_EXPR; }          ExprType_t argType(int iArg) const { return INT_EXPR; }
237          VMFnResult* exec(VMFnArgs* args);          VMFnResult* exec(VMFnArgs* args);
238        protected:
239            InstrumentScriptVM* m_vm;
240        };
241    
242        // overrides core wait() implementation
243        class InstrumentScriptVMFunction_wait : public CoreVMFunction_wait {
244        public:
245            InstrumentScriptVMFunction_wait(InstrumentScriptVM* parent);
246            VMFnResult* exec(VMFnArgs* args);
247        };
248    
249        class InstrumentScriptVMFunction_stop_wait : public VMEmptyResultFunction {
250        public:
251            InstrumentScriptVMFunction_stop_wait(InstrumentScriptVM* parent);
252            int minRequiredArgs() const { return 1; }
253            int maxAllowedArgs() const { return 2; }
254            bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR;}
255            ExprType_t argType(int iArg) const { return INT_EXPR; }
256            VMFnResult* exec(VMFnArgs* args);
257      protected:      protected:
258          InstrumentScriptVM* m_vm;          InstrumentScriptVM* m_vm;
259      };      };

Legend:
Removed from v.2935  
changed lines
  Added in v.3054

  ViewVC Help
Powered by ViewVC