yast2-core
|
#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 |
![]() | |
YCode () | |
virtual | ~YCode () |
virtual ykind | kind () const =0 |
std::string | commentToXml () const |
std::ostream & | commentToXml (std::ostream &str) const |
virtual bool | isConstant () const |
bool | isError () const |
virtual bool | isStatement () const |
virtual bool | isBlock () const |
virtual bool | isReferenceable () const |
virtual YCPValue | evaluate (bool cse=false) |
void | setCommentBefore (const char *comment) |
void | setCommentAfter (const char *comment) |
![]() | |
Rep () | |
Rep (const Rep &) | |
Rep & | operator= (const Rep &) |
virtual | ~Rep () |
void | ref () const |
void | unref () const |
unsigned | refCount () const |
virtual const char * | repName () const |
virtual std::ostream & | dumpOn (std::ostream &str) const |
Static Public Member Functions | |
static YECallPtr | readCall (bytecodeistream &str) |
![]() | |
static string | toString (ykind kind) |
![]() | |
static void | ref (const Rep *obj_r) |
static void | unref (const Rep *obj_r) |
Protected Attributes | |
TableEntry * | m_entry |
SymbolEntryPtr | m_sentry |
YCodePtr * | m_parameters |
constTypePtr * | m_parameter_types |
Y2Function * | m_functioncall |
uint | m_next_param_id |
![]() | |
const char * | comment_before |
const char * | comment_after |
Private Member Functions | |
REP_BODY (YECall) | |
Additional Inherited Members | |
![]() | |
enum | ykind { yxError = 0, ycVoid, ycBoolean, ycInteger, ycFloat, ycString, ycByteblock, ycPath, ycSymbol, ycList, ycMap, ycTerm, ycEntry, ycConstant, ycLocale, ycFunction, yePropagate, yeUnary, yeBinary, yeTriple, yeCompare, yeLocale, yeList, yeMap, yeTerm, yeIs, yeBracket, yeBlock, yeReturn, yeVariable, yeBuiltin, yeFunction, yeReference, yeFunctionPointer, yeExpression, ysTypedef, ysVariable, ysFunction, ysAssign, ysBracket, ysIf, ysWhile, ysDo, ysRepeat, ysExpression, ysReturn, ysBreak, ysContinue, ysTextdomain, ysInclude, ysFilename, ysImport, ysBlock, ysSwitch, ysStatement, yiBreakpoint } |
![]() | |
virtual void | ref_to (unsigned) const |
virtual void | unref_to (unsigned) const |
YECall::YECall | ( | TableEntry * | entry | ) |
References entry(), 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(), Type::Unspec, and y2debug.
const SymbolEntryPtr YECall::entry | ( | ) | const |
References m_sentry.
Referenced by finalize(), and YECall().
|
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, BlockType::match(), TableEntry::next_overloaded(), TableEntry::sentry(), type(), Type::Void, and y2debug.
Referenced by YEFunction::finalize().
string YECall::qualifiedName | ( | ) | const |
References m_sentry.
Referenced by YEFunction::evaluate(), and YEFunctionPointer::evaluate().
|
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().
|
private |
|
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, str, YCode::toStream(), Bytecode::writeEntry(), and Bytecode::writeInt32().
|
virtual |
Return ASCII represtation of this YCP code.
Reimplemented from YCode.
References m_next_param_id, m_parameters, m_sentry, and y2debug.
Referenced by YEFunction::evaluate(), YEFunctionPointer::evaluate(), and YECall().
|
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 YCode::commentToXml(), m_next_param_id, m_parameters, and m_sentry.
|
virtual |
Return type of this YCP code (interesting mostly for function calls).
Reimplemented from YCode.
References m_sentry.
Referenced by attachParameter(), finalize(), and switch().
|
protected |
Referenced by attachParameter(), and finalize().
|
protected |
Referenced by YEFunction::evaluate(), YEFunctionPointer::evaluate(), YEFunction::finalize(), YEFunction::YEFunction(), and ~YECall().
|
protected |
Referenced by attachParameter(), YEFunction::evaluate(), YEFunctionPointer::evaluate(), finalize(), toStream(), toString(), toXml(), and YECall().
|
protected |
Referenced by attachParameter(), finalize(), YECall(), and ~YECall().
|
protected |
Referenced by attachParameter(), YEFunction::evaluate(), YEFunctionPointer::evaluate(), finalize(), toStream(), toString(), toXml(), YECall(), and ~YECall().
|
protected |