32 |
ExprType_t exprType() const { return EMPTY_EXPR; } |
ExprType_t exprType() const { return EMPTY_EXPR; } |
33 |
VMExpr* resultValue() { return this; } |
VMExpr* resultValue() { return this; } |
34 |
StmtFlags_t resultFlags() { return flags; } |
StmtFlags_t resultFlags() { return flags; } |
35 |
|
bool isConstExpr() const OVERRIDE { return false; } |
36 |
}; |
}; |
37 |
|
|
38 |
/** |
/** |
48 |
int evalInt() { return value; } |
int evalInt() { return value; } |
49 |
VMExpr* resultValue() { return this; } |
VMExpr* resultValue() { return this; } |
50 |
StmtFlags_t resultFlags() { return flags; } |
StmtFlags_t resultFlags() { return flags; } |
51 |
|
bool isConstExpr() const OVERRIDE { return false; } |
52 |
}; |
}; |
53 |
|
|
54 |
/** |
/** |
64 |
String evalStr() { return value; } |
String evalStr() { return value; } |
65 |
VMExpr* resultValue() { return this; } |
VMExpr* resultValue() { return this; } |
66 |
StmtFlags_t resultFlags() { return flags; } |
StmtFlags_t resultFlags() { return flags; } |
67 |
|
bool isConstExpr() const OVERRIDE { return false; } |
68 |
}; |
}; |
69 |
|
|
70 |
/** |
/** |
76 |
ExprType_t returnType() { return EMPTY_EXPR; } |
ExprType_t returnType() { return EMPTY_EXPR; } |
77 |
VMFnResult* errorResult(); |
VMFnResult* errorResult(); |
78 |
VMFnResult* successResult(); |
VMFnResult* successResult(); |
79 |
|
bool modifiesArg(int iArg) const OVERRIDE { return false; } |
80 |
protected: |
protected: |
81 |
VMEmptyResult result; |
VMEmptyResult result; |
82 |
}; |
}; |
90 |
ExprType_t returnType() { return INT_EXPR; } |
ExprType_t returnType() { return INT_EXPR; } |
91 |
VMFnResult* errorResult(int i = 0); |
VMFnResult* errorResult(int i = 0); |
92 |
VMFnResult* successResult(int i = 0); |
VMFnResult* successResult(int i = 0); |
93 |
|
bool modifiesArg(int iArg) const OVERRIDE { return false; } |
94 |
protected: |
protected: |
95 |
VMIntResult result; |
VMIntResult result; |
96 |
}; |
}; |
104 |
ExprType_t returnType() { return STRING_EXPR; } |
ExprType_t returnType() { return STRING_EXPR; } |
105 |
VMFnResult* errorResult(const String& s = ""); |
VMFnResult* errorResult(const String& s = ""); |
106 |
VMFnResult* successResult(const String& s = ""); |
VMFnResult* successResult(const String& s = ""); |
107 |
|
bool modifiesArg(int iArg) const OVERRIDE { return false; } |
108 |
protected: |
protected: |
109 |
VMStringResult result; |
VMStringResult result; |
110 |
}; |
}; |
188 |
VMFnResult* exec(VMFnArgs* args); |
VMFnResult* exec(VMFnArgs* args); |
189 |
}; |
}; |
190 |
|
|
191 |
|
/** |
192 |
|
* Implements the built-in inc() script function. |
193 |
|
*/ |
194 |
|
class CoreVMFunction_inc : public VMIntResultFunction { |
195 |
|
public: |
196 |
|
int minRequiredArgs() const { return 1; } |
197 |
|
int maxAllowedArgs() const { return 1; } |
198 |
|
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; } |
199 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
200 |
|
bool modifiesArg(int iArg) const { return true; } |
201 |
|
VMFnResult* exec(VMFnArgs* args); |
202 |
|
}; |
203 |
|
|
204 |
|
/** |
205 |
|
* Implements the built-in dec() script function. |
206 |
|
*/ |
207 |
|
class CoreVMFunction_dec : public VMIntResultFunction { |
208 |
|
public: |
209 |
|
int minRequiredArgs() const { return 1; } |
210 |
|
int maxAllowedArgs() const { return 1; } |
211 |
|
bool acceptsArgType(int iArg, ExprType_t type) const { return type == INT_EXPR; } |
212 |
|
ExprType_t argType(int iArg) const { return INT_EXPR; } |
213 |
|
bool modifiesArg(int iArg) const { return true; } |
214 |
|
VMFnResult* exec(VMFnArgs* args); |
215 |
|
}; |
216 |
|
|
217 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |
218 |
|
|
219 |
#endif // LS_COREVMFUNCTIONS_H |
#endif // LS_COREVMFUNCTIONS_H |