lout::object::ConstString Class Reference

An object::Object wrapper for constant strings (char*). More...

#include <object.hh>

List of all members.

Public Member Functions

 ConstString (const char *str)
bool equals (Object *other)
 Returns, whether two objects are equal.
int hashValue ()
 Return a hash value for the object.
int compareTo (Comparable *other)
void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer.
const char * chars ()

Static Public Member Functions

static int hashValue (const char *str)

Protected Attributes

const char * str


Detailed Description

An object::Object wrapper for constant strings (char*).

As opposed to object::String, the char array is not copied.


Constructor & Destructor Documentation

lout::object::ConstString::ConstString ( const char *  str  )  [inline]


Member Function Documentation

const char* lout::object::ConstString::chars (  )  [inline]

References str.

int lout::object::ConstString::compareTo ( Comparable *  other  ) 

References str.

bool lout::object::ConstString::equals ( Object other  )  [virtual]

Returns, whether two objects are equal.

The caller should ensure, that this and the object have the same class; this makes casting of "other" safe. Typically, an implementation should check this == other first, the caller can assume a fast implementation.

Reimplemented from lout::object::Object.

References str.

int lout::object::ConstString::hashValue ( const char *  str  )  [static]

int lout::object::ConstString::hashValue (  )  [virtual]

Return a hash value for the object.

Reimplemented from lout::object::Object.

References str.

void lout::object::ConstString::intoStringBuffer ( misc::StringBuffer sb  )  [virtual]

Store a textual representation of the object in a misc::StringBuffer.

This is used by object::Object::toString.

Reimplemented from lout::object::Object.

References lout::misc::StringBuffer::append(), and str.


Member Data Documentation

const char* lout::object::ConstString::str [protected]


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

Generated on Wed Sep 7 02:00:38 2011 for Dillo by  doxygen 1.5.9