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 YCPExternalRep YCPFloatRep YCPIntegerRep YCPListRep YCPMapRep YCPPathRep YCPReferenceRep YCPReturnRep YCPStringRep YCPSymbolRep YCPTermRep YCPVoidRep List of all members.

Public Member Functions

virtual YCPValueType valuetype () const=0
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

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

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, YCPExternalRep, YCPFloatRep, YCPIntegerRep, YCPListRep, YCPMapRep, YCPPathRep, YCPStringRep, YCPSymbolRep, YCPTermRep, and YCPVoidRep.

const char * YCPValueRep::valuetype_str (  )  const

A string description of the type, for debugging only. (Not suitable for parsing)

bool YCPValueRep::isVoid (  )  const

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

bool YCPValueRep::isBoolean (  )  const

Checks, if the type of this value is YT_BOOLEAN.

bool YCPValueRep::isInteger (  )  const

Checks, if the type of this value is YT_INTEGER.

bool YCPValueRep::isFloat (  )  const

Checks, if the type of this value is YT_FLOAT.

bool YCPValueRep::isString (  )  const

Checks, if the type of this value is YT_STRING.

bool YCPValueRep::isByteblock (  )  const

Checks, if the type of this value is YT_BYTEBLOCK.

bool YCPValueRep::isPath (  )  const

Checks, if the type of this value is YT_PATH.

bool YCPValueRep::isSymbol (  )  const

Checks, if the type of this value is YT_SYMBOL.

bool YCPValueRep::isList (  )  const

Checks, if the type of this value is YT_LIST

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::isMap (  )  const

Checks, if the type of this value is YT_MAP.

bool YCPValueRep::isCode (  )  const

Checks, if the type of this value is YT_CODE.

bool YCPValueRep::isBreak (  )  const

Checks, if the type of this value is YT_BREAK.

bool YCPValueRep::isReturn (  )  const

Checks, if the type of this value is YT_RETURN.

bool YCPValueRep::isEntry (  )  const

Checks, if the type of this value is YT_ENTRY.

bool YCPValueRep::isReference (  )  const

Checks, if the type of this value is YT_REFERENCE.

bool YCPValueRep::isExternal (  )  const

Checks, if the type of this value is YT_EXTERNAL.

YCPVoid YCPValueRep::asVoid (  )  const

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

YCPBoolean YCPValueRep::asBoolean (  )  const

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

YCPInteger YCPValueRep::asInteger (  )  const

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

YCPFloat YCPValueRep::asFloat (  )  const

Casts this value into a pointer of type const YCPFloat .

YCPString YCPValueRep::asString (  )  const

Casts this value into a pointer of type const YCPString .

YCPByteblock YCPValueRep::asByteblock (  )  const

Casts this value into a pointer of type const YCPByteblock .

YCPPath YCPValueRep::asPath (  )  const

Casts this value into a pointer of type const YCPPath .

YCPSymbol YCPValueRep::asSymbol (  )  const

Casts this value into a pointer of type const YCPSymbol .

YCPList YCPValueRep::asList (  )  const

Casts this value into a pointer of type const YCPList .

YCPTerm YCPValueRep::asTerm (  )  const

Casts this value into a pointer of type const YCPTerm .

YCPMap YCPValueRep::asMap (  )  const

Casts this value into a pointer of type const YCPMap .

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.

YCPReference YCPValueRep::asReference (  )  const

Casts this value into a pointer of type const YCPReference.

YCPExternal YCPValueRep::asExternal (  )  const

Casts this value into a pointer of type const YCPExternal.

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.

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


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:23 2007 for yast2-core by  doxygen 1.5.0