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

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

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

revision 3034 by schoenebeck, Mon Oct 31 00:05:00 2016 UTC revision 3054 by schoenebeck, Thu Dec 15 12:47:45 2016 UTC
# Line 1  Line 1 
1  /*  /*
2   * Copyright (c) 2014-2015 Christian Schoenebeck   * Copyright (c) 2014-2016 Christian Schoenebeck
3   *   *
4   * http://www.linuxsampler.org   * http://www.linuxsampler.org
5   *   *
# Line 29  public: Line 29  public:
29      StmtFlags_t flags; ///< general completion status (i.e. success or failure) of the function call      StmtFlags_t flags; ///< general completion status (i.e. success or failure) of the function call
30    
31      VMEmptyResult() : flags(STMT_SUCCESS) {}      VMEmptyResult() : flags(STMT_SUCCESS) {}
32      ExprType_t exprType() const { return EMPTY_EXPR; }      ExprType_t exprType() const OVERRIDE { return EMPTY_EXPR; }
33      VMExpr* resultValue() { return this; }      VMExpr* resultValue() OVERRIDE { return this; }
34      StmtFlags_t resultFlags() { return flags; }      StmtFlags_t resultFlags() OVERRIDE { return flags; }
35      bool isConstExpr() const OVERRIDE { return false; }      bool isConstExpr() const OVERRIDE { return false; }
36  };  };
37    
# Line 45  public: Line 45  public:
45      int value; ///< result value of the function call      int value; ///< result value of the function call
46    
47      VMIntResult() : flags(STMT_SUCCESS) {}      VMIntResult() : flags(STMT_SUCCESS) {}
48      int evalInt() { return value; }      int evalInt() OVERRIDE { return value; }
49      VMExpr* resultValue() { return this; }      VMExpr* resultValue() OVERRIDE { return this; }
50      StmtFlags_t resultFlags() { return flags; }      StmtFlags_t resultFlags() OVERRIDE { return flags; }
51      bool isConstExpr() const OVERRIDE { return false; }      bool isConstExpr() const OVERRIDE { return false; }
52  };  };
53    
# Line 61  public: Line 61  public:
61      String value; ///< result value of the function call      String value; ///< result value of the function call
62    
63      VMStringResult() : flags(STMT_SUCCESS) {}      VMStringResult() : flags(STMT_SUCCESS) {}
64      String evalStr() { return value; }      String evalStr() OVERRIDE { return value; }
65      VMExpr* resultValue() { return this; }      VMExpr* resultValue() OVERRIDE { return this; }
66      StmtFlags_t resultFlags() { return flags; }      StmtFlags_t resultFlags() OVERRIDE { return flags; }
67      bool isConstExpr() const OVERRIDE { return false; }      bool isConstExpr() const OVERRIDE { return false; }
68  };  };
69    
# Line 74  public: Line 74  public:
74  class VMEmptyResultFunction : public VMFunction {  class VMEmptyResultFunction : public VMFunction {
75  protected:  protected:
76      virtual ~VMEmptyResultFunction() {}      virtual ~VMEmptyResultFunction() {}
77      ExprType_t returnType() { return EMPTY_EXPR; }      ExprType_t returnType() OVERRIDE { return EMPTY_EXPR; }
78      VMFnResult* errorResult();      VMFnResult* errorResult();
79      VMFnResult* successResult();      VMFnResult* successResult();
80      bool modifiesArg(int iArg) const OVERRIDE { return false; }      bool modifiesArg(int iArg) const OVERRIDE { return false; }
# Line 89  protected: Line 89  protected:
89  class VMIntResultFunction : public VMFunction {  class VMIntResultFunction : public VMFunction {
90  protected:  protected:
91      virtual ~VMIntResultFunction() {}      virtual ~VMIntResultFunction() {}
92      ExprType_t returnType() { return INT_EXPR; }      ExprType_t returnType() OVERRIDE { return INT_EXPR; }
93      VMFnResult* errorResult(int i = 0);      VMFnResult* errorResult(int i = 0);
94      VMFnResult* successResult(int i = 0);      VMFnResult* successResult(int i = 0);
95      bool modifiesArg(int iArg) const OVERRIDE { return false; }      bool modifiesArg(int iArg) const OVERRIDE { return false; }
# Line 104  protected: Line 104  protected:
104  class VMStringResultFunction : public VMFunction {  class VMStringResultFunction : public VMFunction {
105  protected:  protected:
106      virtual ~VMStringResultFunction() {}      virtual ~VMStringResultFunction() {}
107      ExprType_t returnType() { return STRING_EXPR; }      ExprType_t returnType() OVERRIDE { return STRING_EXPR; }
108      VMFnResult* errorResult(const String& s = "");      VMFnResult* errorResult(const String& s = "");
109      VMFnResult* successResult(const String& s = "");      VMFnResult* successResult(const String& s = "");
110      bool modifiesArg(int iArg) const OVERRIDE { return false; }      bool modifiesArg(int iArg) const OVERRIDE { return false; }

Legend:
Removed from v.3034  
changed lines
  Added in v.3054

  ViewVC Help
Powered by ViewVC