Wrapper for YCode as YCPValue. More...
#include <YCPCode.h>
Public Member Functions | |
YCodePtr | code () const |
YCPOrder | compare (const YCPCode &v) const |
string | toString () const |
std::ostream & | toStream (std::ostream &str) const |
std::ostream & | toXml (std::ostream &str, int indent) const |
YCPValueType | valuetype () const |
YCPValue | evaluate (bool cse=false) const |
Protected Member Functions | |
YCPCodeRep () | |
YCPCodeRep (YCodePtr c) | |
~YCPCodeRep () | |
Private Attributes | |
YCodePtr | m_code |
Friends | |
class | YCPCode |
Wrapper for YCode as YCPValue.
YCPCodeRep::YCPCodeRep | ( | ) | [protected] |
Constructor
References m_code.
YCPCodeRep::YCPCodeRep | ( | YCodePtr | c | ) | [protected] |
References m_code.
YCPCodeRep::~YCPCodeRep | ( | ) | [protected] |
Cleans up.
YCodePtr YCPCodeRep::code | ( | ) | const |
References m_code.
Compares two YCodes for equality, greaterness or smallerness.
References YO_LESS.
YCPValue YCPCodeRep::evaluate | ( | bool | cse = false |
) | const |
Evaluates the code.
References m_code, toString(), and y2debug.
std::ostream & YCPCodeRep::toStream | ( | std::ostream & | str | ) | const [virtual] |
string YCPCodeRep::toString | ( | void | ) | const [virtual] |
Returns an ASCII representation of the YCode.
Implements YCPElementRep.
References m_code.
Referenced by evaluate().
std::ostream & YCPCodeRep::toXml | ( | std::ostream & | str, | |
int | indent | |||
) | const [virtual] |
Implements YCPValueRep.
References m_code.
YCPValueType YCPCodeRep::valuetype | ( | ) | const [virtual] |
friend class YCPCode [friend] |
YCodePtr YCPCodeRep::m_code [private] |
Referenced by code(), evaluate(), toStream(), toString(), toXml(), and YCPCodeRep().