yast2-core
|
#include <YExpression.h>
Public Member Functions | |
YEList (YCodePtr code) | |
YEList (bytecodeistream &str) | |
~YEList () | |
virtual ykind | kind () const |
void | attach (YCodePtr element) |
string | toString () const |
YCPValue | evaluate (bool cse=false) |
std::ostream & | toStream (std::ostream &str) const |
std::ostream & | toXml (std::ostream &str, int indent) const |
constTypePtr | type () const |
int | count () const |
YCodePtr | value (int index) const |
![]() | |
YCode () | |
virtual | ~YCode () |
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 |
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 |
Private Member Functions | |
REP_BODY (YEList) | |
Private Attributes | |
ycodelist_t * | m_first |
YEList::YEList | ( | YCodePtr | code | ) |
References ycodelist::code, m_first, and ycodelist::next.
YEList::YEList | ( | bytecodeistream & | str | ) |
References m_first, and Bytecode::readYCodelist().
YEList::~YEList | ( | ) |
References m_first, and ycodelist::next.
void YEList::attach | ( | YCodePtr | element | ) |
References ycodelist::code, m_first, and ycodelist::next.
int YEList::count | ( | ) | const |
References m_first, and ycodelist::next.
Referenced by toXml().
|
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 YCPList::add(), ycodelist::code, YCPElement::isNull(), m_first, ycodelist::next, toString(), value(), and y2debug.
|
inlinevirtual |
Kind of this YCode. This method must be reimplemented in the inherited classes.
Implements YCode.
References YEVariable::evaluate(), str, YEVariable::toStream(), YEVariable::toString(), YEVariable::toXml(), YEVariable::type(), and YCode::yeList.
|
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_first, YCode::toStream(), and Bytecode::writeYCodelist().
|
virtual |
Return ASCII represtation of this YCP code.
Reimplemented from YCode.
References ycodelist::code, m_first, and ycodelist::next.
Referenced by evaluate().
|
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(), count(), m_first, ycodelist::next, and Xmlcode::writeYCodelist().
|
virtual |
Return type of this YCP code (interesting mostly for function calls).
Reimplemented from YCode.
References ycodelist::code, m_first, and ycodelist::next.
YCodePtr YEList::value | ( | int | index | ) | const |
References ycodelist::code, m_first, and ycodelist::next.
Referenced by evaluate().
|
private |
Referenced by attach(), count(), evaluate(), toStream(), toString(), toXml(), type(), value(), YEList(), and ~YEList().