Associates a key with a value in the Essential Tools Module "dictionary" collection classes.
More...
#include <rw/collass.h>
RWCollectableAssociation inherits class RWCollectable. Used internally to associate a key with a value in the Essential Tools Module "dictionary" collection classes. Comparison and equality testing are forwarded to the key part of the association.
- Synopsis
- See also
- The dictionary containers RWBTreeDictionary, RWHashDictionary, and RWIdentityDictionary make use of RWCollectableAssociation. When any of their content is dealt with as an RWCollectable, such as when operator+=() or asBag() is used, the RWCollectableAssociation is exposed.
- Persistence
- Polymorphic
RWCollectableAssociation::RWCollectableAssociation |
( |
| ) |
|
virtual RWCollectableAssociation::~RWCollectableAssociation |
( |
| ) |
|
|
virtual |
virtual RWspace RWCollectableAssociation::binaryStoreSize |
( |
| ) |
const |
|
virtual |
Returns the number of bytes used by the virtual function saveGuts(RWFile&) to store an object. Typically, this involves adding up the space required to store all primitives, plus the results of calling recursiveStoreSize() for all objects inheriting from RWCollectable. See the Essential Tools Module User's Guide for details.
Reimplemented from RWCollectable.
static RWClassID RWCollectableAssociation::classIsA |
( |
| ) |
|
|
static |
virtual int RWCollectableAssociation::compareTo |
( |
const RWCollectable * |
c | ) |
const |
|
virtual |
Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWCollectable.
virtual unsigned RWCollectableAssociation::hash |
( |
| ) |
const |
|
virtual |
virtual RWClassID RWCollectableAssociation::isA |
( |
| ) |
const |
|
virtual |
virtual bool RWCollectableAssociation::isEqual |
( |
const RWCollectable * |
c | ) |
const |
|
virtual |
Returns the key part of the association.
virtual RWCollectable* RWCollectableAssociation::newSpecies |
( |
| ) |
const |
|
virtual |
Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.
Reimplemented from RWCollectable.
virtual void RWCollectableAssociation::restoreGuts |
( |
RWvistream & |
| ) |
|
|
virtual |
Reads an object's state from an input stream, replacing the previous state.
Reimplemented from RWCollectable.
virtual void RWCollectableAssociation::restoreGuts |
( |
RWFile & |
| ) |
|
|
virtual |
Reads an object's state from a binary file, using class RWFile, replacing the previous state.
Reimplemented from RWCollectable.
virtual void RWCollectableAssociation::saveGuts |
( |
RWvostream & |
| ) |
const |
|
virtual |
Writes an object's state to an output stream.
Reimplemented from RWCollectable.
virtual void RWCollectableAssociation::saveGuts |
( |
RWFile & |
| ) |
const |
|
virtual |
Writes an object's state to a binary file, using class RWFile.
Reimplemented from RWCollectable.
Returns the value part of the association.
Sets the value to ct and returns the old value.