#include <YExpression.h>
Public Member Functions | |
Y2YCPFunction (YSymbolEntryPtr entry) | |
~Y2YCPFunction () | |
string | qualifiedName () const |
string | name () const |
virtual bool | attachParameter (const YCPValue &arg, const int pos) |
virtual constTypePtr | wantedParameterType () const |
virtual bool | appendParameter (const YCPValue &arg) |
virtual bool | finishParameters () |
virtual YCPValue | evaluateCall () |
virtual bool | reset () |
Private Attributes | |
YSymbolEntryPtr | m_sentry |
YCPValue * | m_parameters |
Y2YCPFunction::Y2YCPFunction | ( | YSymbolEntryPtr | entry | ) |
References m_parameters, m_sentry, and y2debug.
Y2YCPFunction::~Y2YCPFunction | ( | ) |
References m_parameters.
bool Y2YCPFunction::appendParameter | ( | const YCPValue & | arg | ) | [virtual] |
Appends a parameter to the call.
Implements Y2Function.
References YCPElement::isNull(), m_parameters, m_sentry, qualifiedName(), y2debug, and ycp2error.
bool Y2YCPFunction::attachParameter | ( | const YCPValue & | arg, | |
const int | position | |||
) | [virtual] |
Attaches a parameter to a given position to the call.
Implements Y2Function.
References m_parameters, m_sentry, and y2error.
YCPValue Y2YCPFunction::evaluateCall | ( | ) | [virtual] |
Executes the call
Implements Y2Function.
References ee, ExecutionEnvironment::filename(), YCPElement::isNull(), ExecutionEnvironment::linenumber(), m_parameters, m_sentry, ExecutionEnvironment::setFilename(), ExecutionEnvironment::setLinenumber(), y2debug, and ycp2error.
bool Y2YCPFunction::finishParameters | ( | ) | [virtual] |
Signal that we're done adding parameters.
Implements Y2Function.
References m_parameters, m_sentry, qualifiedName(), and y2error.
string Y2YCPFunction::name | ( | ) | const [virtual] |
Implements Y2Function.
References m_sentry.
string Y2YCPFunction::qualifiedName | ( | ) | const |
References m_sentry.
Referenced by appendParameter(), and finishParameters().
bool Y2YCPFunction::reset | ( | ) | [virtual] |
Reset the currecn parameters, so the instance can be reused for the next call (appendParameter etc)
Implements Y2Function.
References m_parameters, and m_sentry.
constTypePtr Y2YCPFunction::wantedParameterType | ( | ) | const [virtual] |
What type is expected for the next appendParameter (val) ? (Used when calling from Perl, to be able to convert from the simple type system of Perl to the elaborate type system of YCP)
Implements Y2Function.
References Type::Any, m_parameters, m_sentry, Type::Unspec, and YCode::ycFunction.
YCPValue* Y2YCPFunction::m_parameters [private] |
Referenced by appendParameter(), attachParameter(), evaluateCall(), finishParameters(), reset(), wantedParameterType(), Y2YCPFunction(), and ~Y2YCPFunction().
YSymbolEntryPtr Y2YCPFunction::m_sentry [private] |
Referenced by appendParameter(), attachParameter(), evaluateCall(), finishParameters(), name(), qualifiedName(), reset(), wantedParameterType(), and Y2YCPFunction().