/[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 3582 by schoenebeck, Fri Aug 30 12:23:40 2019 UTC revision 3583 by schoenebeck, Fri Aug 30 12:39:18 2019 UTC
# Line 1704  namespace LinuxSampler { Line 1704  namespace LinuxSampler {
1704      }      }
1705    
1706      /**      /**
      * Convenience function used for retrieving the data type of a script  
      * variable name being passed to this function.  
      *  
      * @param name - some script variable name (e.g. "$foo")  
      * @return variable's data type (e.g. INT_EXPR for example above)  
      */  
     inline ExprType_t exprTypeOfVarName(const String& name) {  
         if (name.empty()) return (ExprType_t) -1;  
         const char prefix = name[0];  
         switch (prefix) {  
             case '$': return INT_EXPR;  
             case '%': return INT_ARR_EXPR;  
             case '~': return REAL_EXPR;  
             case '?': return REAL_ARR_EXPR;  
             case '@': return STRING_EXPR;  
             case '!': return STRING_ARR_EXPR;  
         }  
         return (ExprType_t) -1;  
     }  
   
     /**  
1707       * Returns @c true in case the passed data type is some array data type.       * Returns @c true in case the passed data type is some array data type.
1708       */       */
1709      inline bool isArray(const ExprType_t& type) {      inline bool isArray(const ExprType_t& type) {

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

  ViewVC Help
Powered by ViewVC