/[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 2942 by schoenebeck, Wed Jul 13 15:51:06 2016 UTC revision 2945 by schoenebeck, Thu Jul 14 00:22:26 2016 UTC
# Line 104  public: Line 104  public:
104  };  };
105  typedef Ref<Args,Node> ArgsRef;  typedef Ref<Args,Node> ArgsRef;
106    
107  class Variable : virtual public Expression {  class Variable : virtual public VMVariable, virtual public Expression {
108  public:  public:
109      virtual bool isConstExpr() const { return bConst; }      bool isConstExpr() const OVERRIDE { return bConst; }
110      virtual bool isAssignable() const { return !bConst; }      bool isAssignable() const OVERRIDE { return !bConst; }
111      virtual void assign(Expression* expr) = 0;      virtual void assign(Expression* expr) = 0;
112        void assignExpr(VMExpr* expr) OVERRIDE { Expression* e = dynamic_cast<Expression*>(expr); if (e) assign(e); }
113  protected:  protected:
114      Variable(ParserContext* ctx, int _memPos, bool _bConst)      Variable(ParserContext* ctx, int _memPos, bool _bConst)
115          : context(ctx), memPos(_memPos), bConst(_bConst) {}          : context(ctx), memPos(_memPos), bConst(_bConst) {}
# Line 330  public: Line 331  public:
331      bool isConstExpr() const OVERRIDE { return dynVar->isConstExpr(); }      bool isConstExpr() const OVERRIDE { return dynVar->isConstExpr(); }
332      bool isAssignable() const OVERRIDE { return dynVar->isAssignable(); }      bool isAssignable() const OVERRIDE { return dynVar->isAssignable(); }
333      bool isPolyphonic() const OVERRIDE { return false; }      bool isPolyphonic() const OVERRIDE { return false; }
334      void assign(Expression* expr) OVERRIDE { dynVar->assign(expr); }      void assign(Expression* expr) OVERRIDE { dynVar->assignExpr(expr); }
335      int evalInt() OVERRIDE;      int evalInt() OVERRIDE;
336      String evalStr() OVERRIDE;      String evalStr() OVERRIDE;
337      String evalCastToStr() OVERRIDE;      String evalCastToStr() OVERRIDE;

Legend:
Removed from v.2942  
changed lines
  Added in v.2945

  ViewVC Help
Powered by ViewVC