#include <YCPSymbol.h>
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 |
Protected Member Functions | |
YCPSymbolRep (const char *s) | |
YCPSymbolRep (string s) | |
Private Attributes | |
Ustring | v |
Friends | |
class | YCPSymbol |
YCP Syntax: A letter or underscore followed by an arbitrary number of digits, letters and underscores.
hElP _8 a_45
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.
Compares two YCPSymbols for equality, greaterness or smallerness. Symbols are compared by their names interpreted as strings.
v | value to compare against |
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] |
YCPValueType YCPSymbolRep::valuetype | ( | ) | const [virtual] |
friend class YCPSymbol [friend] |
Ustring YCPSymbolRep::v [private] |
Referenced by compare(), symbol(), symbol_cstr(), toStream(), toString(), and toXml().