home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWBTRDICT_H__
- #define __RWBTRDICT_H__
- pragma push_align_members(64);
-
- /*
- * RWBTreeDictionary --- Dictionary implemented as an in memory B-Tree
- *
- * $Header: E:/vcs/rw/btrdict.h_v 1.2 18 Feb 1992 09:54:08 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave
- * P.O. Box 2328
- * Corvallis, OR 97339
- * Voice: (503) 754-3010 FAX: (503) 757-6650
- *
- * Copyright (C) 1989, 1990, 1991. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- * $Log: E:/vcs/rw/btrdict.h_v $
- *
- * Rev 1.2 18 Feb 1992 09:54:08 KEFFER
- *
- * Rev 1.1 28 Oct 1991 09:08:08 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- * Rev 1.0 28 Jul 1991 08:12:36 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- /*
- * For the storage and retrieval of (key, value) pairs.
- */
-
- #include "rw/btree.h"
- #include "rw/colclass.h"
-
- class RWExport RWBTreeDictionary : public RWBTree {
- public:
- RWBTreeDictionary();
- ~RWBTreeDictionary();
-
- void applyToKeyAndValue(RWapplyKeyAndValue, void*);
- virtual void clear();
- virtual void clearAndDestroy();
- virtual RWCollectable* find(const RWCollectable* key) const; // Returns value
- RWCollectable* findKeyAndValue(const RWCollectable* key, RWCollectable*& value) const;
- RWCollectable* findValue(const RWCollectable*) const; // Returns value
- RWCollectable* findValue(const RWCollectable*, RWCollectable*) const; // Replace value.
- RWCollectable* insertKeyAndValue(RWCollectable* key, RWCollectable* val);
- virtual ClassID isA() const {return __RWBTREEDICTIONARY;}
- virtual RWCollectable* newSpecies() const;
- virtual RWCollectable* remove(const RWCollectable* key); // Returns value
- virtual void removeAndDestroy(const RWCollectable*);
- RWCollectable* removeKeyAndValue(const RWCollectable* key, RWCollectable*& value);
- };
-
- pragma pop_align_members();
- #endif /* __RWBTRDICT_H__ */
-