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; |
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; } |