RWCollectableAssociationRWCollectable
Member Functions | |
binaryStoreSize() compareTo() hash() isA() isEqual() key() |
restoreGuts() saveGuts() value() |
#include <rw/collass.h>
RWCollectableAssociation inherits class RWCollectable. Used internally to associate a key with a value in the Tools.h++ "dictionary" collection classes. Comparison and equality testing are forwarded to the key part of the association.
Polymorphic
The "dictionary containers" RWBTreeDictionary, RWHashDictionary, and RWIdentityDictionary make use of RWCollectableAssociation. When any of their contents is dealt with as an RWCollectable, as when operator+=() or asBag() etc. is used, the RWCollectableAssociation will be exposed.
RWCollectableAssociation(); RWCollectableAssociation(RWCollectable* k, RWCollectable* v);
Construct an RWCollectableAssociation with the given key and value.
virtual ~RWCollectableAssociation(); virtual RWspace binaryStoreSize() const;
Redefined from class RWCollectable.
virtual int compareTo(const RWCollectable* c) const;
Redefined from class RWCollectable. Returns the results of calling key()->compareTo(c).
virtual unsigned hash() const;
Redefined from class RWCollectable. Returns the results of calling key()->hash().
virtual RWClassID isA() const;
Redefined from class RWCollectable to return __RWCOLLECTABLEASSOCIATION.
virtual RWBoolean isEqual(const RWCollectable* c) const;
Redefined from class RWCollectable. Returns the results of calling key()->isEqual(c).
RWCollectable* key() const;
Returns the key part of the association.
RWCollectable* value() const;
Returns the value part of the association.
RWCollectable* value(RWCollectable* ct);
Sets the value to ct and returns the old value.
virtual void restoreGuts(RWvistream&); virtual void restoreGuts(RWFile&); virtual void saveGuts(RWvostream&) const; virtual void saveGuts(RWFile&) const;
Redefined from class RWCollectable.