Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWHashDictionary

Module:  Essential Tools Module   Group:  RWCollectable


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

Public Destructor

~RWHashDictionary();

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 DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, 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.