![]() |
The Simons
|
#include <Entry.h>
Inheritance diagram for Entry:
An Entry represents a directed relationship between two Objects. The first Object, known as the domain, serves as a search key. The second Object, known as the range, is the corresponding value stored opposite the key. Entry is used as the element-type of a Map, in which search keys are unique, and also of a Relation, in which search keys are non-unique.
Public Member Functions | |
Entry () | |
Construct an empty Entry. | |
virtual | ~Entry () |
Release an Entry. | |
Entry (ObjectID, ObjectID) | |
Construct an Entry mapping from a domain to a range value. | |
virtual ObjectID | clone () const |
Clone a shallow copy of this Entry. | |
virtual Natural | hash () const |
Return a unique hash code for this Entry. | |
virtual Order | compare (ObjectID) const |
Compare this Entry with another Object. | |
Order | compare (EntryID) const |
Compare this Entry with another Entry. | |
Order | deepCompare (EntryID) const |
Compare this Entry deeply with another Entry. | |
virtual Void | readOn (ReaderID) |
Read this Entry on a Reader stream. | |
virtual Void | writeOn (WriterID) const |
Write this Entry on a Writer stream. | |
ObjectID | domain () const |
Return the domain Object of this Entry. | |
ObjectID | range () const |
Return the range Object of this Entry. |
|
Construct an empty Entry. Initialises the domain and range to null.
|
|
Release an Entry.
|
|
Construct an Entry mapping from a domain to a range value.
|
|
Clone a shallow copy of this Entry.
Reimplemented from Object. |
|
Compare this Entry with another Entry. Compares the respective domain keys of each Entry.
|
|
Compare this Entry with another Object. If the other Object is an Entry, compares the two domain keys. Otherwise, compares this Entry's domain against the Object, treating it as a domain key.
Reimplemented from Object. |
|
Compare this Entry deeply with another Entry. Compares the respective domain keys and range values of each Entry. If both comparisons return the same Order, this is the result, otherwise the result is NONE.
|
|
Return the domain Object of this Entry.
|
|
Return a unique hash code for this Entry. The hash-code is identical to the hash-code of the domain value. This invariant must be maintained for compare() to work both with an Entry and with an arbitrary Object serving as the domain search key.
Reimplemented from Object. |
|
Return the range Object of this Entry.
|
|
Read this Entry on a Reader stream. Reconstructs the domain and range fields of this Entry by reading them from the Reader stream using getField().
Reimplemented from Object. |
|
Write this Entry on a Writer stream. Encodes the domain and range fields of this Entry by writing them to the Writer stream using putField().
Reimplemented from Object. |