#include <expression.h>
Inheritance diagram for celx::FunctionCallExpression:


Public Member Functions | |
| void | addArgument (Expression *) |
| virtual Value | eval (ExecutionContext &) |
| FunctionCallExpression (Expression *) | |
| ~FunctionCallExpression () | |
Private Attributes | |
| std::vector< Expression * > | arguments |
| Expression * | func |
|
|
Definition at line 215 of file expression.cpp. 00215 : 00216 func(_func) 00217 { 00218 }
|
|
|
Definition at line 220 of file expression.cpp. References arguments, and func. 00221 {
00222 if (func != NULL)
00223 delete func;
00224 for (vector<Expression*>::iterator iter = arguments.begin();
00225 iter != arguments.end(); iter++)
00226 {
00227 delete *iter;
00228 }
00229 }
|
|
|
Definition at line 245 of file expression.cpp. References arguments.
|
|
|
Implements celx::Expression. Definition at line 231 of file expression.cpp. References celx::Function::call(), celx::Expression::eval(), func, and celx::Value::functionValue(). 00232 {
00233 Value funcVal = func->eval(context);
00234 Function* f;
00235 if (!funcVal.functionValue(f))
00236 {
00237 // Not a function
00238 context.runtimeError();
00239 return Value();
00240 }
00241
00242 return f->call(context);
00243 }
|
|
|
Definition at line 137 of file expression.h. Referenced by addArgument(), and ~FunctionCallExpression(). |
|
|
Definition at line 136 of file expression.h. Referenced by eval(), and ~FunctionCallExpression(). |
1.4.1