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

YCP symbol. Symbols appear as components of pathes, as names of structure elements and as term names. The ASCII representation of a symbol is a letter or underscore followed by an arbitrary number of letters, digits and underscores. More...

#include <YCPSymbol.h>

Inheritance diagram for YCPSymbolRep:
YCPValueRep YCPElementRep

Public Member Functions

string symbol () const
 
const char * symbol_cstr () const
 
YCPOrder compare (const YCPSymbol &v) 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

 YCPSymbolRep (const char *s)
 
 YCPSymbolRep (string s)
 
- Protected Member Functions inherited from YCPElementRep
 YCPElementRep ()
 
virtual ~YCPElementRep ()
 

Private Attributes

Ustring v
 

Friends

class YCPSymbol
 

Detailed Description

YCP symbol. Symbols appear as components of pathes, as names of structure elements and as term names. The ASCII representation of a symbol is a letter or underscore followed by an arbitrary number of letters, digits and underscores.

YCP Syntax: A letter or underscore followed by an arbitrary number of digits, letters and underscores.

hElP   _8   a_45

Constructor & Destructor Documentation

YCPSymbolRep::YCPSymbolRep ( const char *  s)
protected

Creates new symbol from a const char *pointer.

YCPSymbolRep::YCPSymbolRep ( string  s)
protected

Creates a new symbol from a string.

Member Function Documentation

YCPOrder YCPSymbolRep::compare ( const YCPSymbol v) const

Compares two YCPSymbols for equality, greaterness or smallerness. Symbols are compared by their names interpreted as strings.

Parameters
vvalue to compare against
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

References v, YO_EQUAL, YO_GREATER, and YO_LESS.

string YCPSymbolRep::symbol ( ) const

Returns the symbol's string.

References Ustring::asString(), and v.

const char * YCPSymbolRep::symbol_cstr ( ) const

Returns the symbol's string as const char * pointer.

References Ustring::asString(), and v.

std::ostream & YCPSymbolRep::toStream ( std::ostream &  str) const
virtual

Output value as bytecode to stream

Implements YCPElementRep.

References v, and Bytecode::writeUstring().

string YCPSymbolRep::toString ( void  ) const
virtual

Returns the ASCII representation of the symbol.

Implements YCPElementRep.

References Ustring::asString(), and v.

std::ostream & YCPSymbolRep::toXml ( std::ostream &  str,
int  indent 
) const
virtual

Implements YCPValueRep.

References Ustring::asString(), str, and v.

YCPValueType YCPSymbolRep::valuetype ( ) const
virtual

Returns YT_SYMBOL. See YCPValueRep::valuetype.

Implements YCPValueRep.

References YT_SYMBOL.

Friends And Related Function Documentation

friend class YCPSymbol
friend

Member Data Documentation

Ustring YCPSymbolRep::v
private

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

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