Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

RWHashDictionary


RWHashDictionary-->RWSet-->RWHashTable -->RWCollection-->RWCollectable

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

typedef RWHashDictionary Dictionary;  // Smalltalk typedef.
#include <rw/hashdict.h>
RWHashDictionary  a ;

Description

An RWHashDictionary represents a group of unordered values, accessible by external keys. Duplicate keys are not allowed. RWHashDictionary is implemented as a hash table of associations of keys and values. Both the key and the value must inherit from the abstract base class RWCollectable, with a suitable definition of the virtual function hash() and isEqual() for the key.

This class corresponds to the Smalltalk class Dictionary.

Persistence

Polymorphic

Public Constructors

RWHashDictionary(size_t n = RWDEFAULT_CAPACITY);
RWHashDictionary(const RWHashDictionary& hd);

Public Member Operators

void
operator=(const RWHashDictionary& hd);
RWBoolean
operator<=(const RWHashDictionary& hd) const;
RWBoolean
operator==(const RWHashDictionary& hd) const;

Public Member Functions

void 
applyToKeyAndValue(RWapplyKeyAndValue ap, void* x);
RWBinaryTree
asBinaryTree();
RWBag
asBag() const;
RWSet
asOrderedCollection() const;
asSet() const;
RWOrdered
RWBinaryTree
asSortedCollection() const;
virtual RWspace
binaryStoreSize() const;
virtual void
clear();
virtual void
clearAndDestroy();
virtual int
compareTo(const RWCollectable* a) const;
virtual RWBoolean
contains(const RWCollectable* target) const;
virtual size_t
entries() const;
virtual RWCollectable*
find(const RWCollectable* target) const;
RWCollectable*
findKeyAndValue(const RWCollectable* target,
     RWCollectable*& v) const;
RWCollectable*
findValue(const RWCollectable* target) const;
RWCollectable*
findValue(const RWCollectable* target,
RWCollectable* newValue);
virtual unsigned
hash() const;
RWCollectable*
insertKeyAndValue(RWCollectable* key,RWCollectable* value);
virtual RWClassID
isA() const;
virtual RWBoolean
isEmpty() const;
virtual RWBoolean
isEqual(const RWCollectable* a) const;
virtual size_t
occurrencesOf(const RWCollectable* target) const;
virtual RWCollectable*
remove(const RWCollectable* target);
virtual void
removeAndDestroy(const RWCollectable* target);
RWCollectable*
removeKeyAndValue(const RWCollectable* target,
     RWCollectable*& v);
void
resize(size_t n = 0);
virtual void
restoreGuts(RWvistream&);
virtual void
restoreGuts(RWFile&);
virtual void
saveGuts(RWvostream&) const;
virtual void
saveGuts(RWFile&) const;
virtual RWCollection*
select(RWtestCollectable testfunc, void* x) const;
virtual RWCollection*
select(RWtestCollectablePair testfunc, void* x) const;
RWStringID
stringID();


Previous fileTop of documentContentsIndexNext file
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.