yast2-core
Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
YCPBooleanRep Class Reference

YCPValueRep representing a boolean value. More...

#include <YCPBoolean.h>

Inheritance diagram for YCPBooleanRep:
YCPValueRep YCPElementRep

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
 
- Public Member Functions inherited from YCPValueRep
const char * valuetype_str () const
 
bool isVoid () const
 
bool isBoolean () const
 
bool isInteger () const
 
bool isFloat () const
 
bool isString () const
 
bool isByteblock () const
 
bool isPath () const
 
bool isSymbol () const
 
bool isList () const
 
bool isTerm () const
 
bool isMap () const
 
bool isCode () const
 
bool isBreak () const
 
bool isReturn () const
 
bool isEntry () const
 
bool isReference () const
 
bool isExternal () const
 
YCPVoid asVoid () const
 
YCPBoolean asBoolean () const
 
YCPInteger asInteger () const
 
YCPFloat asFloat () const
 
YCPString asString () const
 
YCPByteblock asByteblock () const
 
YCPPath asPath () const
 
YCPSymbol asSymbol () const
 
YCPList asList () const
 
YCPTerm asTerm () const
 
YCPMap asMap () const
 
YCPCode asCode () const
 
YCPEntry asEntry () const
 
YCPReference asReference () const
 
YCPExternal asExternal () const
 
bool equal (const YCPValue &) const
 
YCPOrder compare (const YCPValue &v, bool rl=false) const
 
- Public Member Functions inherited from YCPElementRep
YCPValue asValue () const
 
virtual const YCPElementRepshallowCopy () const
 

Protected Member Functions

 YCPBooleanRep (bool v)
 
 YCPBooleanRep (const char *r)
 
- Protected Member Functions inherited from YCPElementRep
 YCPElementRep ()
 
virtual ~YCPElementRep ()
 

Private Attributes

bool v
 

Friends

class YCPBoolean
 

Detailed Description

YCPValueRep representing a boolean value.

YCP Syntax:

true | false

Constructor & Destructor Documentation

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".

Member Function Documentation

YCPOrder YCPBooleanRep::compare ( const YCPBoolean b) const

Compares two YCPBooleans for equality, greaterness or smallerness.

Parameters
vvalue to compare against
Returns
YO_LESS, if this is false and v is true, YO_EQUAL, if this is equal to v, YO_GREATER, if this is true and v is false.

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

Returns YT_BOOLEAN. See YCPValueRep::valuetype.

Implements YCPValueRep.

References YT_BOOLEAN.

Friends And Related Function Documentation

friend class YCPBoolean
friend

Member Data Documentation

bool YCPBooleanRep::v
private

Referenced by compare(), toStream(), toString(), toXml(), and value().


The documentation for this class was generated from the following files:

Generated on a sunny day for yast2-core by doxygen 1.8.8