/[svn]/linuxsampler/trunk/src/scriptvm/CoreVMFunctions.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/CoreVMFunctions.h

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

revision 2969 by schoenebeck, Mon Jul 18 09:42:28 2016 UTC revision 2970 by schoenebeck, Thu Jul 21 16:22:55 2016 UTC
# Line 238  public: Line 238  public:
238      VMFnResult* exec(VMFnArgs* args);      VMFnResult* exec(VMFnArgs* args);
239  };  };
240    
241    /**
242     * Implements the built-in min() script function.
243     */
244    class CoreVMFunction_min : public VMIntResultFunction {
245    public:
246        int minRequiredArgs() const { return 2; }
247        int maxAllowedArgs() const { return 2; }
248        bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; }
249        ExprType_t argType(int iArg) const { return INT_EXPR; }
250        VMFnResult* exec(VMFnArgs* args);
251    };
252    
253    /**
254     * Implements the built-in max() script function.
255     */
256    class CoreVMFunction_max : public VMIntResultFunction {
257    public:
258        int minRequiredArgs() const { return 2; }
259        int maxAllowedArgs() const { return 2; }
260        bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; }
261        ExprType_t argType(int iArg) const { return INT_EXPR; }
262        VMFnResult* exec(VMFnArgs* args);
263    };
264    
265  } // namespace LinuxSampler  } // namespace LinuxSampler
266    
267  #endif // LS_COREVMFUNCTIONS_H  #endif // LS_COREVMFUNCTIONS_H

Legend:
Removed from v.2969  
changed lines
  Added in v.2970

  ViewVC Help
Powered by ViewVC