/[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 2596 by schoenebeck, Thu Jun 5 19:39:12 2014 UTC revision 2598 by schoenebeck, Fri Jun 6 12:38:54 2014 UTC
# Line 27  public: Line 27  public:
27      StmtFlags_t resultFlags() { return flags; }      StmtFlags_t resultFlags() { return flags; }
28  };  };
29    
30    class VMIntResult : public VMFnResult, public VMIntExpr {
31    public:
32        StmtFlags_t flags;
33        int value;
34    
35        VMIntResult() : flags(STMT_SUCCESS) {}
36        int evalInt() { return value; }
37        VMExpr* resultValue() { return this; }
38        StmtFlags_t resultFlags() { return flags; }
39    };
40    
41  class VMStringResult : public VMFnResult, public VMStringExpr {  class VMStringResult : public VMFnResult, public VMStringExpr {
42  public:  public:
43      StmtFlags_t flags;      StmtFlags_t flags;
# Line 43  protected: Line 54  protected:
54      ExprType_t returnType() { return EMPTY_EXPR; }      ExprType_t returnType() { return EMPTY_EXPR; }
55      VMFnResult* errorResult();      VMFnResult* errorResult();
56      VMFnResult* successResult();      VMFnResult* successResult();
     void wrnMsg(const String& txt);  
     void errMsg(const String& txt);  
57  protected:  protected:
58      VMEmptyResult result;      VMEmptyResult result;
59  };  };
60    
61    class VMIntResultFunction : public VMFunction {
62    protected:
63        ExprType_t returnType() { return INT_EXPR; }
64        VMFnResult* errorResult(int i = 0);
65        VMFnResult* successResult(int i = 0);
66    protected:
67        VMIntResult result;
68    };
69    
70  class VMStringResultFunction : public VMFunction {  class VMStringResultFunction : public VMFunction {
71  protected:  protected:
72      ExprType_t returnType() { return STRING_EXPR; }      ExprType_t returnType() { return STRING_EXPR; }

Legend:
Removed from v.2596  
changed lines
  Added in v.2598

  ViewVC Help
Powered by ViewVC