Module: Essential Tools Module Group: RWCollectable Classes
RWCollectableAssociationRWCollectable
binaryStoreSize() compareTo() hash() |
isA() isEqual() key() |
restoreGuts() RWCollectableAssociation() saveGuts() |
value() ~RWCollectableAssociation() |
#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.
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);
Constructs an RWCollectableAssociation with the given key and value.
virtual ~RWCollectableAssociation();
Empty destructor.
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 bool 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.
virtual void restoreGuts(RWvistream&); virtual void restoreGuts(RWFile&); virtual void saveGuts(RWvostream&) const; virtual void saveGuts(RWFile&) const;
Redefined from class RWCollectable.
RWCollectable* value() const;
Returns the value part of the association.
RWCollectable* value(RWCollectable* ct);
Sets the value to ct and returns the old value.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.