Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Examples

YCPValueRep Class Reference

Abstract base class of all YCP values. Abstract base class of all YCP elements that can be used as primary data, that can be stored in the SCR and that can be parsed as a whole. An important property of a value is, that its ASCII representation uniquely specifies its type. The parser's output is a stream of YCPValues, not of YCPElements. More...

#include <YCPValue.h>

Inheritance diagram for YCPValueRep:

YCPElementRep YCPBooleanRep YCPBreakRep YCPByteblockRep YCPCodeRep YCPEntryRep YCPFloatRep YCPListRep YCPMapRep YCPPathRep YCPReferenceRep YCPReturnRep YCPStringRep YCPSymbolRep YCPTermRep YCPVoidRep List of all members.

Public Member Functions

virtual YCPValueType valuetype () const=0
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
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
bool equal (const YCPValue &) const
YCPOrder compare (const YCPValue &v, bool rl=false) const

Detailed Description

Abstract base class of all YCP values. Abstract base class of all YCP elements that can be used as primary data, that can be stored in the SCR and that can be parsed as a whole. An important property of a value is, that its ASCII representation uniquely specifies its type. The parser's output is a stream of YCPValues, not of YCPElements.


Member Function Documentation

YCPBoolean YCPValueRep::asBoolean  )  const
 

Casts this value into a pointer of type const YCPBooleanRep *.

YCPByteblock YCPValueRep::asByteblock  )  const
 

Casts this value into a pointer of type const YCPByteblock .

YCPCode YCPValueRep::asCode  )  const
 

Casts this value into a pointer of type const YCPCode.

YCPEntry YCPValueRep::asEntry  )  const
 

Casts this value into a pointer of type const YCPEntry.

YCPFloat YCPValueRep::asFloat  )  const
 

Casts this value into a pointer of type const YCPFloat .

YCPInteger YCPValueRep::asInteger  )  const
 

Casts this value into a pointer of type const YCPIntegerRep *.

YCPList YCPValueRep::asList  )  const
 

Casts this value into a pointer of type const YCPList .

YCPMap YCPValueRep::asMap  )  const
 

Casts this value into a pointer of type const YCPMap .

YCPPath YCPValueRep::asPath  )  const
 

Casts this value into a pointer of type const YCPPath .

YCPReference YCPValueRep::asReference  )  const
 

Casts this value into a pointer of type const YCPReference.

YCPString YCPValueRep::asString  )  const
 

Casts this value into a pointer of type const YCPString .

YCPSymbol YCPValueRep::asSymbol  )  const
 

Casts this value into a pointer of type const YCPSymbol .

YCPTerm YCPValueRep::asTerm  )  const
 

Casts this value into a pointer of type const YCPTerm .

YCPVoid YCPValueRep::asVoid  )  const
 

Casts this value into a pointer of type const YCPVoidRep *.

YCPOrder YCPValueRep::compare const YCPValue v,
bool  rl = false
const
 

Compares two YCP values for equality, greaterness or smallerness. You should not compare values of different types.

Parameters:
v value to compare against
rl respect locale
Returns:
YO_LESS, if this is smaller than v, YO_EQUAL, if this is equal to v, YO_GREATER, if this is greater to v

bool YCPValueRep::equal const YCPValue  )  const
 

Compares two YCP values for equality. Two values are equal if they have the same type and the same contents.

bool YCPValueRep::isBoolean  )  const
 

Checks, if the type of this value is YT_BOOLEAN.

bool YCPValueRep::isBreak  )  const
 

Checks, if the type of this value is YT_BREAK.

bool YCPValueRep::isByteblock  )  const
 

Checks, if the type of this value is YT_BYTEBLOCK.

bool YCPValueRep::isCode  )  const
 

Checks, if the type of this value is YT_CODE.

bool YCPValueRep::isEntry  )  const
 

Checks, if the type of this value is YT_ENTRY.

bool YCPValueRep::isFloat  )  const
 

Checks, if the type of this value is YT_FLOAT.

bool YCPValueRep::isInteger  )  const
 

Checks, if the type of this value is YT_INTEGER.

bool YCPValueRep::isList  )  const
 

Checks, if the type of this value is YT_LIST

bool YCPValueRep::isMap  )  const
 

Checks, if the type of this value is YT_MAP.

bool YCPValueRep::isPath  )  const
 

Checks, if the type of this value is YT_PATH.

bool YCPValueRep::isReference  )  const
 

Checks, if the type of this value is YT_REFERENCE.

bool YCPValueRep::isReturn  )  const
 

Checks, if the type of this value is YT_RETURN.

bool YCPValueRep::isString  )  const
 

Checks, if the type of this value is YT_STRING.

bool YCPValueRep::isSymbol  )  const
 

Checks, if the type of this value is YT_SYMBOL.

bool YCPValueRep::isTerm  )  const
 

Checks, if the type of this value is YT_TERM. Note that a YCPTermRep also is a YCPListRep and has always also the type VT_LIST.

bool YCPValueRep::isVoid  )  const
 

Checks, if the type of this value is YT_VOID or YT_RETURN (explicitly returned void).

virtual YCPValueType YCPValueRep::valuetype  )  const [pure virtual]
 

Returns the type of the value. If you just want to check, whether it is legal to cast an object of the YCPValueRep to a certain more specific object, you should use one of the is... methods.

Implemented in YCPBooleanRep, YCPByteblockRep, YCPCodeRep, YCPBreakRep, YCPReturnRep, YCPEntryRep, YCPReferenceRep, YCPFloatRep, YCPListRep, YCPMapRep, YCPPathRep, YCPStringRep, YCPSymbolRep, YCPTermRep, and YCPVoidRep.


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 18:15:25 2007 for yast2-core by doxygen 1.3.6