#include <YExpression.h>
Public Member Functions | |
| YETriple (YCodePtr a_expr, YCodePtr a_true, YCodePtr a_false) | |
| YETriple (bytecodeistream &str) | |
| ~YETriple () | |
| virtual ykind | kind () const |
| 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 |
Private Member Functions | |
| REP_BODY (YETriple) | |
Private Attributes | |
| YCodePtr | m_expr |
| YCodePtr | m_true |
| YCodePtr | m_false |
| YETriple::YETriple | ( | YCodePtr | a_expr, | |
| YCodePtr | a_true, | |||
| YCodePtr | a_false | |||
| ) |
| YETriple::YETriple | ( | bytecodeistream & | str | ) |
References m_expr, m_false, m_true, and Bytecode::readCode().
| YETriple::~YETriple | ( | ) |
| YCPValue YETriple::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 YCPElement::isNull(), m_expr, m_false, m_true, toString(), y2debug, and ycp2error.
| virtual ykind YETriple::kind | ( | ) | const [inline, virtual] |
Kind of this YCode. This method must be reimplemented in the inherited classes.
Implements YCode.
References YCode::yeTriple.
| YETriple::REP_BODY | ( | YETriple | ) | [private] |
| std::ostream & YETriple::toStream | ( | std::ostream & | str | ) | const [virtual] |
| string YETriple::toString | ( | void | ) | const [virtual] |
Return ASCII represtation of this YCP code.
Reimplemented from YCode.
References m_expr, m_false, and m_true.
Referenced by evaluate().
| std::ostream & YETriple::toXml | ( | std::ostream & | str, | |
| int | indent | |||
| ) | const [virtual] |
| constTypePtr YETriple::type | ( | ) | const [inline, virtual] |
YCodePtr YETriple::m_expr [private] |
Referenced by evaluate(), toStream(), toString(), toXml(), and YETriple().
YCodePtr YETriple::m_false [private] |
Referenced by evaluate(), toStream(), toString(), toXml(), type(), and YETriple().
YCodePtr YETriple::m_true [private] |
Referenced by evaluate(), toStream(), toString(), toXml(), type(), and YETriple().
1.6.3