YCPValueRep representing a boolean value. More...
#include <YCPBoolean.h>
Public Member Functions | |
bool | value () const |
YCPOrder | compare (const YCPBoolean &) const |
string | toString () const |
std::ostream & | toStream (std::ostream &str) const |
std::ostream & | toXml (std::ostream &str, int indent) const |
YCPValueType | valuetype () const |
Protected Member Functions | |
YCPBooleanRep (bool v) | |
YCPBooleanRep (const char *r) | |
Private Attributes | |
bool | v |
Friends | |
class | YCPBoolean |
YCPValueRep representing a boolean value.
YCP Syntax:
true | false
YCPBooleanRep::YCPBooleanRep | ( | bool | v | ) | [protected] |
Creates a new YCPBooleanRep of value v.
YCPBooleanRep::YCPBooleanRep | ( | const char * | r | ) | [protected] |
Creates a new YCPBooleanRep with a value given by the string representation, i.e. either "true" or "false".
YCPOrder YCPBooleanRep::compare | ( | const YCPBoolean & | b | ) | const |
Compares two YCPBooleans for equality, greaterness or smallerness.
v | value to compare against |
References v, YO_EQUAL, YO_GREATER, and YO_LESS.
std::ostream & YCPBooleanRep::toStream | ( | std::ostream & | str | ) | const [virtual] |
Output value as bytecode to stream
Implements YCPElementRep.
References v, and Bytecode::writeBool().
string YCPBooleanRep::toString | ( | void | ) | const [virtual] |
Gives the ASCII representation of this value, i.e. "true" or "false".
Implements YCPElementRep.
References v.
std::ostream & YCPBooleanRep::toXml | ( | std::ostream & | str, | |
int | indent | |||
) | const [virtual] |
Implements YCPValueRep.
References v.
bool YCPBooleanRep::value | ( | ) | const |
Returns the value of this YCPBooleanRep in form of a bool value.
References v.
YCPValueType YCPBooleanRep::valuetype | ( | ) | const [virtual] |
friend class YCPBoolean [friend] |
bool YCPBooleanRep::v [private] |
Referenced by compare(), toStream(), toString(), toXml(), and value().