/[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 3583 by schoenebeck, Fri Aug 30 12:39:18 2019 UTC revision 3584 by schoenebeck, Fri Aug 30 13:33:32 2019 UTC
# Line 515  namespace LinuxSampler { Line 515  namespace LinuxSampler {
515    
516          /**          /**
517           * Calling this method evaluates the expression and returns the value           * Calling this method evaluates the expression and returns the value
518             * of the expression as integer and thus behaves similar to the previous
519             * method, however this overridden method automatically takes unit
520             * prefixes into account and returns a converted value corresponding to
521             * the given unit @a prefix expected by the caller.
522             *
523             * Example: Assume this expression was an integer expression '12kHz'
524             * then calling this method as @c evalCastInt(VM_MILLI) would return
525             * the value @c 12000000.
526             *
527             * @param prefix - measuring unit prefix expected for result by caller
528             */
529            vmint evalCastInt(MetricPrefix_t prefix);
530    
531            /**
532             * This method behaves like the previous method, just that it takes a
533             * measuring unit prefix with two elements (e.g. "milli cents" for
534             * tuning).
535             *
536             * @param prefix1 - 1st measuring unit prefix element expected by caller
537             * @param prefix2 - 2nd measuring unit prefix element expected by caller
538             */
539            vmint evalCastInt(MetricPrefix_t prefix1, MetricPrefix_t prefix2);
540    
541            /**
542             * Calling this method evaluates the expression and returns the value
543           * of the expression as real number. If this scalar number expression is           * of the expression as real number. If this scalar number expression is
544           * an integer expression then this method automatically casts the value           * an integer expression then this method automatically casts the value
545           * from integer to real number.           * from integer to real number.
546           */           */
547          vmfloat evalCastReal();          vmfloat evalCastReal();
548    
549            /**
550             * Calling this method evaluates the expression and returns the value
551             * of the expression as real number and thus behaves similar to the
552             * previous method, however this overridden method automatically takes
553             * unit prefixes into account and returns a converted value
554             * corresponding to the given unit @a prefix expected by the caller.
555             *
556             * Example: Assume this expression was an integer expression '8ms' then
557             * calling this method as @c evalCastReal(VM_NO_PREFIX) would return the
558             * value @c 0.008.
559             *
560             * @param prefix - measuring unit prefix expected for result by caller
561             */
562            vmfloat evalCastReal(MetricPrefix_t prefix);
563    
564            /**
565             * This method behaves like the previous method, just that it takes a
566             * measuring unit prefix with two elements (e.g. "milli cents" for
567             * tuning).
568             *
569             * @param prefix1 - 1st measuring unit prefix element expected by caller
570             * @param prefix2 - 2nd measuring unit prefix element expected by caller
571             */
572            vmfloat evalCastReal(MetricPrefix_t prefix1, MetricPrefix_t prefix2);
573      };      };
574    
575      /** @brief Virtual machine integer expression      /** @brief Virtual machine integer expression

Legend:
Removed from v.3583  
changed lines
  Added in v.3584

  ViewVC Help
Powered by ViewVC