#include <YExpression.h>
Public Member Functions | |
YEFunction (TableEntry *entry) | |
YEFunction (bytecodeistream &str) | |
virtual ykind | kind () const |
virtual YCPValue | evaluate (bool cse=false) |
virtual constTypePtr | finalize () |
Private Member Functions | |
REP_BODY (YEFunction) |
YEFunction::YEFunction | ( | TableEntry * | entry | ) |
References TableEntry::sentry(), and y2debug.
YEFunction::YEFunction | ( | bytecodeistream & | str | ) |
References YECall::m_functioncall, YECall::m_sentry, and y2error.
YCPValue YEFunction::evaluate | ( | bool | cse = false |
) | [virtual] |
Execute YCP code to get the resulting YCPValue. Every inherited class of YCode should reimplement this method.
cse | should the evaluation be done for parse time evaluation (i.e. constant subexpression elimination) |
Reimplemented from YCode.
References Y2Function::attachParameter(), ee, ExecutionEnvironment::endlessRecursion(), Y2Function::evaluateCall(), ExecutionEnvironment::filename(), YCPElement::isNull(), ExecutionEnvironment::linenumber(), YECall::m_functioncall, YECall::m_next_param_id, YECall::m_parameters, YECall::m_sentry, ExecutionEnvironment::popframe(), ExecutionEnvironment::pushframe(), YECall::qualifiedName(), Y2Function::reset(), ExecutionEnvironment::setFilename(), ExecutionEnvironment::setLinenumber(), YECall::toString(), y2debug, y2error, and ycp2error.
constTypePtr YEFunction::finalize | ( | ) | [virtual] |
'close' function, perform final parameter check if ok, return 0 if missing parameter, return its type if undefined, return Type::Error (wrong type was already reported in attachParameter()
Reimplemented from YECall.
References Type::Error, YECall::m_functioncall, YECall::m_sentry, and y2error.
virtual ykind YEFunction::kind | ( | ) | const [inline, virtual] |
Kind of this YCode. This method must be reimplemented in the inherited classes.
Implements YCode.
References YCode::yeFunction.
YEFunction::REP_BODY | ( | YEFunction | ) | [private] |