dillo
3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
![]() ![]() |
An object::Object wrapper for int's. More...
#include <object.hh>
Public Member Functions | |
Integer (int 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 c1 and c2. More... | |
int | getValue () |
![]() | |
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 | |
int | value |
Additional Inherited Members | |
![]() | |
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 Object* (Object*[] or Object**). More... | |
An object::Object wrapper for int's.
|
inline |
|
virtual |
Compare two objects c1 and c2.
Return a value < 0, when c1 is less than c2, a value > 0, when c1 is greater than c2, or 0, when c1 and c2 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.
Definition at line 192 of file object.cc.
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.
Definition at line 175 of file object.cc.
References value.
|
inline |
Definition at line 102 of file object.hh.
References value.
Referenced by dw::Hyphenator::hyphenateSingleWord().
|
virtual |
Return a hash value for the object.
Reimplemented from lout::object::Object.
Definition at line 180 of file object.cc.
References value.
|
virtual |
Store a textual representation of the object in a misc::StringBuffer.
This is used by object::Object::toString.
Reimplemented from lout::object::Object.
Definition at line 185 of file object.cc.
References lout::misc::StringBuffer::append(), and value.
|
private |
Definition at line 94 of file object.hh.
Referenced by compareTo(), equals(), getValue(), hashValue(), Integer(), and intoStringBuffer().