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

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

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

revision 2951 by schoenebeck, Fri Jul 15 20:07:47 2016 UTC revision 3060 by schoenebeck, Fri Dec 16 14:05:20 2016 UTC
# Line 63  public: Line 63  public:
63  };  };
64  typedef Ref<IntExpr,Node> IntExprRef;  typedef Ref<IntExpr,Node> IntExprRef;
65    
66    /*class IntArrayExpr : virtual public VMIntArrayExpr, virtual public Expression {
67    public:
68        ExprType_t exprType() const { return INT_ARR_EXPR; }
69        String evalCastToStr();
70    };
71    typedef Ref<IntArrayExpr,Node> IntArrayExprRef;*/
72    
73  class StringExpr : virtual public VMStringExpr, virtual public Expression {  class StringExpr : virtual public VMStringExpr, virtual public Expression {
74  public:  public:
75      ExprType_t exprType() const { return STRING_EXPR; }      ExprType_t exprType() const { return STRING_EXPR; }
# Line 98  public: Line 105  public:
105      std::vector<ExpressionRef> args;      std::vector<ExpressionRef> args;
106      void add(ExpressionRef arg) { args.push_back(arg); }      void add(ExpressionRef arg) { args.push_back(arg); }
107      void dump(int level = 0);      void dump(int level = 0);
108      int argsCount() const { return args.size(); }      int argsCount() const { return (int) args.size(); }
109      VMExpr* arg(int i) { return (i >= 0 && i < argsCount()) ? &*args.at(i) : NULL; }      VMExpr* arg(int i) { return (i >= 0 && i < argsCount()) ? &*args.at(i) : NULL; }
110      bool isPolyphonic() const;      bool isPolyphonic() const;
111  };  };
# Line 151  class BuiltInIntVariable : public IntVar Line 158  class BuiltInIntVariable : public IntVar
158  public:  public:
159      BuiltInIntVariable(const String& name, VMIntRelPtr* ptr);      BuiltInIntVariable(const String& name, VMIntRelPtr* ptr);
160      bool isAssignable() const OVERRIDE { return !ptr->readonly; }      bool isAssignable() const OVERRIDE { return !ptr->readonly; }
161      void assign(Expression* expr);      void assign(Expression* expr) OVERRIDE;
162      int evalInt();      int evalInt() OVERRIDE;
163      void dump(int level = 0);      void dump(int level = 0) OVERRIDE;
164  };  };
165  typedef Ref<BuiltInIntVariable,Node> BuiltInIntVariableRef;  typedef Ref<BuiltInIntVariable,Node> BuiltInIntVariableRef;
166    
# Line 347  class FunctionCall : virtual public Leaf Line 354  class FunctionCall : virtual public Leaf
354  public:  public:
355      FunctionCall(const char* function, ArgsRef args, VMFunction* fn) :      FunctionCall(const char* function, ArgsRef args, VMFunction* fn) :
356          functionName(function), args(args), fn(fn) { }          functionName(function), args(args), fn(fn) { }
357      void dump(int level = 0);      void dump(int level = 0) OVERRIDE;
358      StmtFlags_t exec();      StmtFlags_t exec() OVERRIDE;
359      int evalInt();      int evalInt() OVERRIDE;
360      String evalStr();      VMIntArrayExpr* asIntArray() const OVERRIDE;
361      bool isConstExpr() const { return false; }      String evalStr() OVERRIDE;
362      ExprType_t exprType() const;      bool isConstExpr() const OVERRIDE { return false; }
363      String evalCastToStr();      ExprType_t exprType() const OVERRIDE;
364      bool isPolyphonic() const { return args->isPolyphonic(); }      String evalCastToStr() OVERRIDE;
365        bool isPolyphonic() const OVERRIDE { return args->isPolyphonic(); }
366  protected:  protected:
367      VMFnResult* execVMFn();      VMFnResult* execVMFn();
368  };  };
# Line 414  public: Line 422  public:
422      int evalInt() { return 0; }      int evalInt() { return 0; }
423      EventHandler* eventHandlerByName(const String& name) const;      EventHandler* eventHandlerByName(const String& name) const;
424      EventHandler* eventHandler(uint index) const;      EventHandler* eventHandler(uint index) const;
425      inline uint size() const { return args.size(); }      inline uint size() const { return (int) args.size(); }
426      bool isPolyphonic() const;      bool isPolyphonic() const;
427  };  };
428  typedef Ref<EventHandlers,Node> EventHandlersRef;  typedef Ref<EventHandlers,Node> EventHandlersRef;

Legend:
Removed from v.2951  
changed lines
  Added in v.3060

  ViewVC Help
Powered by ViewVC