Dillo
|
An object::Object wrapper for bool's. More...
#include <object.hh>
Public Member Functions | |
Boolean (bool value) | |
bool | equals (Object *other) |
Returns, whether two objects are equal. More... | |
int | hashValue () |
Return a hash value for the object. More... | |
void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. More... | |
int | compareTo (Comparable *other) |
Compare two objects, this and other. More... | |
bool | getValue () |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. More... | |
virtual Object * | clone () |
Return an exact copy of the object. More... | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. More... | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. More... | |
Private Attributes | |
bool | value |
An object::Object wrapper for bool's.
|
inline |
References value.
|
virtual |
Compare two objects, this and other.
Return a value < 0, when this is less than other, a value > 0, when this is greater than other, or 0, when this and other are equal.
If c1.equals(c2) (as defined in Object), c1.compareTo(c2) must be 0, but, unlike you may expect, the reversed is not necessarily true. This method returns 0, if, according to the rules for sorting, there is no difference, but there may still be differences (not relevant for sorting), which "equals" will care about.
Implements lout::object::Comparable.
References value.
|
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 value.
|
inline |
References value.
|
virtual |
|
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 value.
|
private |
Referenced by Boolean(), compareTo(), equals(), getValue(), hashValue(), and intoStringBuffer().