#include <YExpression.h>
Public Member Functions | |
YECall (TableEntry *entry) | |
YECall (bytecodeistream &str) | |
~YECall () | |
const SymbolEntryPtr | entry () const |
constTypePtr | attachParameter (YCodePtr code, constTypePtr type) |
virtual constTypePtr | finalize () |
string | toString () const |
std::ostream & | toStream (std::ostream &str) const |
std::ostream & | toXml (std::ostream &str, int indent) const |
constTypePtr | type () const |
string | qualifiedName () const |
Static Public Member Functions | |
static YECallPtr | readCall (bytecodeistream &str) |
Protected Attributes | |
TableEntry * | m_entry |
SymbolEntryPtr | m_sentry |
YCodePtr * | m_parameters |
constTypePtr * | m_parameter_types |
Y2Function * | m_functioncall |
uint | m_next_param_id |
Private Member Functions | |
REP_BODY (YECall) |
YECall::YECall | ( | TableEntry * | entry | ) |
References m_next_param_id, m_parameter_types, m_parameters, TableEntry::next_overloaded(), TableEntry::sentry(), and y2debug.
YECall::YECall | ( | bytecodeistream & | str | ) |
References m_next_param_id, m_parameters, Bytecode::readCode(), Bytecode::readInt32(), toString(), y2debug, and y2error.
YECall::~YECall | ( | ) |
References m_functioncall, m_parameter_types, and m_parameters.
constTypePtr YECall::attachParameter | ( | YCodePtr | code, | |
constTypePtr | type | |||
) |
Attach parameter to external function call
code,: | parameter code | |
type,: | parameter type |
Attach parameter to external function call
This function doesn't really check parameter types, this is done in YECall::finalize() below.
code,: | parameter code | |
type,: | parameter type |
References Type::Error, m_entry, m_next_param_id, m_parameter_types, m_parameters, TableEntry::next_overloaded(), TableEntry::sentry(), Type::Unspec, and y2debug.
const SymbolEntryPtr YECall::entry | ( | ) | const |
References m_sentry.
Referenced by finalize().
constTypePtr YECall::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 in YEFunction.
References entry(), Type::Error, YCode::isBlock(), m_entry, m_next_param_id, m_parameter_types, m_parameters, m_sentry, TableEntry::next_overloaded(), TableEntry::sentry(), type(), Type::Void, and y2debug.
string YECall::qualifiedName | ( | ) | const |
References m_sentry.
Referenced by YEFunctionPointer::evaluate(), and YEFunction::evaluate().
YECallPtr YECall::readCall | ( | bytecodeistream & | str | ) | [static] |
A static method to read YEFunction for function pointers and convert it to YEFunctionPointer implementation. This is needed for backward compatibility with SLES9/9.1
str | the input bytecode stream |
References bytecodeistream::isVersion(), Bytecode::readCode(), Bytecode::readEntry(), Bytecode::readInt32(), and y2error.
Referenced by Xmlcode::readCode(), and Bytecode::readCode().
YECall::REP_BODY | ( | YECall | ) | [private] |
std::ostream & YECall::toStream | ( | std::ostream & | str | ) | const [virtual] |
Write YCP code to a byte stream (bytecode implementation). Every class inheriting from YCode must reimplement this method.
str | byte stream to store into |
Implements YCode.
References m_next_param_id, m_parameters, m_sentry, Bytecode::writeEntry(), and Bytecode::writeInt32().
string YECall::toString | ( | void | ) | const [virtual] |
Return ASCII represtation of this YCP code.
Reimplemented from YCode.
References m_next_param_id, m_parameters, m_sentry, and y2debug.
Referenced by YEFunctionPointer::evaluate(), YEFunction::evaluate(), and YECall().
std::ostream & YECall::toXml | ( | std::ostream & | str, | |
int | indent | |||
) | const [virtual] |
Write YCP code as XML representation. Every class inheriting from YCode must reimplement this method.
str | string stream to store into | |
indend | indentation level for pretty print |
Implements YCode.
References m_next_param_id, m_parameters, and m_sentry.
constTypePtr YECall::type | ( | ) | const [virtual] |
Return type of this YCP code (interesting mostly for function calls).
Reimplemented from YCode.
References m_sentry.
Referenced by finalize().
TableEntry* YECall::m_entry [protected] |
Referenced by attachParameter(), and finalize().
Y2Function* YECall::m_functioncall [protected] |
Referenced by YEFunctionPointer::evaluate(), YEFunction::evaluate(), YEFunction::finalize(), YEFunction::YEFunction(), and ~YECall().
uint YECall::m_next_param_id [protected] |
Referenced by attachParameter(), YEFunctionPointer::evaluate(), YEFunction::evaluate(), finalize(), toStream(), toString(), toXml(), and YECall().
constTypePtr* YECall::m_parameter_types [protected] |
Referenced by attachParameter(), finalize(), YECall(), and ~YECall().
YCodePtr* YECall::m_parameters [protected] |
Referenced by attachParameter(), YEFunctionPointer::evaluate(), YEFunction::evaluate(), finalize(), toStream(), toString(), toXml(), YECall(), and ~YECall().
SymbolEntryPtr YECall::m_sentry [protected] |