Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWHashDictionary

Module:  Essential Tools Module   Group:  RWCollectable Classes


RWHashDictionaryRWSetRWHashTable ... ... RWCollectionRWCollectable

Local Index

Members

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 = RW_DEFAULT_CAPACITY);
RWHashDictionary(const RWHashDictionary& hd);

Public Destructor

~RWHashDictionary();

Public Member Operators

void
operator=(const RWHashDictionary& hd);
bool
operator<=(const RWHashDictionary& hd) const;
bool
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 bool
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 bool
isEmpty() const;
virtual bool
isEqual(const RWCollectable* a) const;
virtual RWConstIterator*
newConstIterator();
virtual RWIterator*
newIterator();
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 DocumentContentsIndex pageNext file

© 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.