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

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

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

revision 3581 by schoenebeck, Fri Aug 30 11:40:25 2019 UTC revision 3582 by schoenebeck, Fri Aug 30 12:23:40 2019 UTC
# Line 173  namespace LinuxSampler { Line 173  namespace LinuxSampler {
173      class VMIntExpr;      class VMIntExpr;
174      class VMRealExpr;      class VMRealExpr;
175      class VMStringExpr;      class VMStringExpr;
176      class VMScalarNumberExpr;      class VMNumberExpr;
177      class VMArrayExpr;      class VMArrayExpr;
178      class VMIntArrayExpr;      class VMIntArrayExpr;
179      class VMRealArrayExpr;      class VMRealArrayExpr;
# Line 318  namespace LinuxSampler { Line 318  namespace LinuxSampler {
318           * return NULL! Same applies if this expression is actually a real           * return NULL! Same applies if this expression is actually a real
319           * number expression: asInt() would return NULL in that case as well.           * number expression: asInt() would return NULL in that case as well.
320           *           *
321           * @see exprType(), asReal(), asScalarNumberExpr()           * @see exprType(), asReal(), asNumber()
322           */           */
323          VMIntExpr* asInt() const;          VMIntExpr* asInt() const;
324    
# Line 334  namespace LinuxSampler { Line 334  namespace LinuxSampler {
334           * simply return NULL! Same applies if this expression is actually an           * simply return NULL! Same applies if this expression is actually an
335           * integer expression: asReal() would return NULL in that case as well.           * integer expression: asReal() would return NULL in that case as well.
336           *           *
337           * @see exprType(), asInt(), asScalarNumberExpr()           * @see exprType(), asInt(), asNumber()
338           */           */
339          VMRealExpr* asReal() const;          VMRealExpr* asReal() const;
340    
# Line 342  namespace LinuxSampler { Line 342  namespace LinuxSampler {
342           * In case this expression is a scalar number expression, that is either           * In case this expression is a scalar number expression, that is either
343           * an integer (scalar) expression or a real number (floating point           * an integer (scalar) expression or a real number (floating point
344           * scalar) expression, then this method returns a casted pointer to that           * scalar) expression, then this method returns a casted pointer to that
345           * VMScalarNumberExpr base class object. It returns NULL if this           * VMNumberExpr base class object. It returns NULL if this
346           * expression is neither an integer (scalar), nor a real number (scalar)           * expression is neither an integer (scalar), nor a real number (scalar)
347           * expression.           * expression.
348           *           *
# Line 356  namespace LinuxSampler { Line 356  namespace LinuxSampler {
356           *           *
357           * @see exprType(), asInt(), asReal()           * @see exprType(), asInt(), asReal()
358           */           */
359          VMScalarNumberExpr* asScalarNumberExpr() const;          VMNumberExpr* asNumber() const;
360    
361          /**          /**
362           * In case this expression is a string expression, then this method           * In case this expression is a string expression, then this method
# Line 473  namespace LinuxSampler { Line 473  namespace LinuxSampler {
473       * This is the abstract base class for integer (scalar) expressions and       * This is the abstract base class for integer (scalar) expressions and
474       * real number (floating point scalar) expressions of scripts.       * real number (floating point scalar) expressions of scripts.
475       */       */
476      class VMScalarNumberExpr : virtual public VMExpr, virtual public VMUnit {      class VMNumberExpr : virtual public VMExpr, virtual public VMUnit {
477      public:      public:
478          /**          /**
479           * Returns @c true if the value of this expression should be applied           * Returns @c true if the value of this expression should be applied
# Line 529  namespace LinuxSampler { Line 529  namespace LinuxSampler {
529       * abstract method evalInt() to return the actual integer result value of       * abstract method evalInt() to return the actual integer result value of
530       * the expression.       * the expression.
531       */       */
532      class VMIntExpr : virtual public VMScalarNumberExpr {      class VMIntExpr : virtual public VMNumberExpr {
533      public:      public:
534          /**          /**
535           * Returns the result of this expression as integer (scalar) value.           * Returns the result of this expression as integer (scalar) value.
# Line 567  namespace LinuxSampler { Line 567  namespace LinuxSampler {
567       * implement the abstract method evalReal() to return the actual floating       * implement the abstract method evalReal() to return the actual floating
568       * point result value of the expression.       * point result value of the expression.
569       */       */
570      class VMRealExpr : virtual public VMScalarNumberExpr {      class VMRealExpr : virtual public VMNumberExpr {
571      public:      public:
572          /**          /**
573           * Returns the result of this expression as real number (floating point           * Returns the result of this expression as real number (floating point
# Line 852  namespace LinuxSampler { Line 852  namespace LinuxSampler {
852           *           *
853           * @param args - function arguments going to be passed for executing           * @param args - function arguments going to be passed for executing
854           *               this built-in function later on           *               this built-in function later on
855           * @see VMScalarNumberExpr::isFinal() for details about 'final' values           * @see VMNumberExpr::isFinal() for details about 'final' values
856           */           */
857          virtual bool returnsFinal(VMFnArgs* args) = 0;          virtual bool returnsFinal(VMFnArgs* args) = 0;
858    
# Line 964  namespace LinuxSampler { Line 964  namespace LinuxSampler {
964           * @return true if a "final" value would be accepted for the respective           * @return true if a "final" value would be accepted for the respective
965           *         function argument by the function           *         function argument by the function
966           *           *
967           * @see VMScalarNumberExpr::isFinal(), returnsFinal()           * @see VMNumberExpr::isFinal(), returnsFinal()
968           */           */
969          virtual bool acceptsArgFinal(vmint iArg) const;          virtual bool acceptsArgFinal(vmint iArg) const;
970    
# Line 1736  namespace LinuxSampler { Line 1736  namespace LinuxSampler {
1736       * Returns @c true in case the passed data type is some scalar number type       * Returns @c true in case the passed data type is some scalar number type
1737       * (i.e. not an array and not a string).       * (i.e. not an array and not a string).
1738       */       */
1739      inline bool isScalarNumber(const ExprType_t& type) {      inline bool isNumber(const ExprType_t& type) {
1740          return type == INT_EXPR || type == REAL_EXPR;          return type == INT_EXPR || type == REAL_EXPR;
1741      }      }
1742    

Legend:
Removed from v.3581  
changed lines
  Added in v.3582

  ViewVC Help
Powered by ViewVC