1 #ifndef __LOUT_OBJECT_HH__
2 #define __LOUT_OBJECT_HH__
85 static int compareFun(
const void *p1,
const void *p2);
238 #endif // __LOUT_OBJECT_HH__
virtual int compareTo(Comparable *other)=0
Compare two objects, this and other.
const char * toString()
Use object::Object::intoStringBuffer to return a textual representation of the object.
Definition: object.cc:81
virtual bool equals(Object *other)
Returns, whether two objects are equal.
Definition: object.cc:50
An object::Object wrapper for strings (char*).
Definition: object.hh:185
A class for fast concatenation of a large number of strings.
Definition: misc.hh:565
~PairBase()
Definition: object.cc:314
static Comparator * compareFunComparator
Definition: object.hh:84
int compareTo(Comparable *other)
Compare two objects, this and other.
Definition: object.cc:260
PairBase(Object *first, Object *second)
Definition: object.cc:308
void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: object.cc:181
Pair(Object *first, Object *second)
Definition: object.hh:216
int compareTo(Comparable *other)
Compare two objects, this and other.
Definition: object.cc:235
size_t sizeOf()
Return the number of bytes, this object totally uses.
Definition: object.cc:371
Definition: object.hh:213
S * getSecond()
Definition: object.hh:231
~String()
Definition: object.cc:298
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
int hashValue()
Return a hash value for the object.
Definition: object.cc:159
int hashValue()
Return a hash value for the object.
Definition: object.cc:254
Used for other orders as the one defined by Comparable.
Definition: object.hh:66
F * getFirst()
Definition: object.hh:230
bool equals(Object *other)
Returns, whether two objects are equal.
Definition: object.cc:192
Instances of a sub class of may be compared (less, greater).
Definition: object.hh:41
T * getTypedValue()
Definition: object.hh:119
Integer(int value)
Definition: object.hh:131
TypedPointer(T *value)
Definition: object.hh:118
void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: object.cc:230
static int compareFun(const void *p1, const void *p2)
This static method may be used as compare function for qsort(3) and bsearch(3), for an array of Objec...
Definition: object.cc:127
ConstString(const char *str)
Definition: object.hh:168
Object * second
Definition: object.hh:198
virtual size_t sizeOf()
Return the number of bytes, this object totally uses.
Definition: object.cc:105
void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: object.cc:202
const char * str
Definition: object.hh:165
Definition: container.cc:27
Definition: object.hh:225
An object::Object wrapper for void pointers.
Definition: object.hh:99
virtual int hashValue()
Return a hash value for the object.
Definition: object.cc:59
StandardComparator standardComparator
Definition: object.cc:148
bool equals(Object *other)
Returns, whether two objects are equal.
Definition: object.cc:218
TypedPair(F *first, S *second)
Definition: object.hh:228
virtual int compare(Object *o1, Object *o2)=0
Compare two objects o1 and o2.
int hashValue()
Return a hash value for the object.
Definition: object.cc:197
virtual ~Object()
The destructor is defined as virtual (but not abstract), so that destruction of Object's works proper...
Definition: object.cc:39
void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: object.cc:285
bool value
Definition: object.hh:145
An object::Object wrapper for constant strings (char*).
Definition: object.hh:162
Object * first
Definition: object.hh:198
void * value
Definition: object.hh:102
void * getValue()
Definition: object.hh:109
An object::Object wrapper for int's.
Definition: object.hh:126
bool equals(Object *other)
Returns, whether two objects are equal.
Definition: object.cc:322
bool equals(Object *other)
Returns, whether two objects are equal.
Definition: object.cc:154
int hashValue()
Return a hash value for the object.
Definition: object.cc:225
const char * chars()
Definition: object.hh:174
bool equals(Object *other)
Returns, whether two objects are equal.
Definition: object.cc:244
Object * getFirst()
Definition: object.hh:218
int value
Definition: object.hh:128
int compare(Object *o1, Object *o2)
Compare two objects o1 and o2.
Definition: object.cc:136
Definition: object.hh:195
void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: object.cc:352
Pointer(void *value)
Definition: object.hh:105
virtual void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: object.cc:95
bool getValue()
Definition: object.hh:153
virtual Object * clone()
Return an exact copy of the object.
Definition: object.cc:68
int getValue()
Definition: object.hh:136
A typed version of object::Pointer.
Definition: object.hh:115
int compareTo(Comparable *other)
Compare two objects, this and other.
Definition: object.cc:209
Object * getSecond()
Definition: object.hh:219
int hashValue()
Return a hash value for the object.
Definition: object.cc:340
Boolean(bool value)
Definition: object.hh:148
An object::Object wrapper for bool's.
Definition: object.hh:143
String(const char *str)
Definition: object.cc:294