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

YCPStringRep Class Reference

YCPValueRep representing a character string of arbitrary length. Whatever internal representation is choosen: It should be possible to switch to 16 bit Unicode strings, when neccessary. More...

#include <YCPString.h>

Inheritance diagram for YCPStringRep:

YCPValueRep YCPElementRep List of all members.

Public Member Functions

string value () const
YCPOrder compare (const YCPString &v, bool rl=false) const
const char * value_cstr () const
string toString () const
std::ostream & toStream (std::ostream &str) const
YCPValueType valuetype () const

Protected Member Functions

 YCPStringRep (string s)

Private Attributes

Ustring v

Detailed Description

YCPValueRep representing a character string of arbitrary length. Whatever internal representation is choosen: It should be possible to switch to 16 bit Unicode strings, when neccessary.

YCP Syntax: Doublequoted ASCII string.

"This is a string", "", "08712345"


Constructor & Destructor Documentation

YCPStringRep::YCPStringRep string  s  )  [protected]
 

Creates a new YCPStringRep from a C++ string.

Parameters:
s A string that is taken literally as value of the newly create YCPStringRep object. Not expansion of backslashes is done, s is not considered to be enclosed with quotes. If there are quotes, they are considered to be part of the string.


Member Function Documentation

YCPOrder YCPStringRep::compare const YCPString v,
bool  rl = false
const
 

Compares two YCPStrings for equality, greaterness or smallerness.

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

std::ostream & YCPStringRep::toStream std::ostream &  str  )  const [virtual]
 

Output value as bytecode to stream

Implements YCPElementRep.

string YCPStringRep::toString  )  const [virtual]
 

Returns a string representation of the value of this object. It contains enclosing quotes. Newlines and quotes contained in the string itself are quoted with backslashes.

Implements YCPElementRep.

string YCPStringRep::value  )  const
 

Returns the value of this object in form of a C++ string value.

const char * YCPStringRep::value_cstr  )  const
 

Returns the value in form of a C const char * string.

YCPValueType YCPStringRep::valuetype  )  const [virtual]
 

Returns YT_STRING. See YCPValueRep::valuetype.

Implements YCPValueRep.


Member Data Documentation

Ustring YCPStringRep::v [private]
 


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