home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWCOLLASS_H__
- #define __RWCOLLASS_H__
- pragma push_align_members(64);
-
- /*
- * Declarations for RWCollectable Associations, used in dictionaries.
- *
- * $Header: E:/vcs/rw/collass.h_v 1.2 18 Feb 1992 09:54:12 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/collass.h_v $
- *
- * Rev 1.2 18 Feb 1992 09:54:12 KEFFER
- *
- * Rev 1.1 28 Oct 1991 09:08:10 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- * Rev 1.0 28 Jul 1991 08:13:26 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- /*
- * Binds a "key" and a "value" together. The key and value must be RWCollectable.
- */
-
- #include "rw/collect.h"
-
- class RWExport RWCollectableAssociation : public RWCollectable {
- protected:
- RWCollectable* ky;
- RWCollectable* val;
- public:
- RWCollectableAssociation();
- RWCollectableAssociation(RWCollectable* k, RWCollectable* v){ky=k; val=v;}
- RWCollectableAssociation(const RWCollectableAssociation& ca){ky=ca.ky; val=ca.val;}
-
- RWCollectable* key() const {return ky;}
- RWCollectable* value() const {return val;}
- RWCollectable* value(RWCollectable*);
-
- /* Inherited from class RWCollectable: */
- virtual unsigned binaryStoreSize() const;
- virtual int compareTo(const RWCollectable*) const;
- virtual unsigned hash() const;
- virtual ClassID isA() const {return __RWCOLLECTABLEASSOCIATION;}
- virtual RWBoolean isEqual(const RWCollectable*) const;
- virtual RWCollectable* newSpecies() const;
- virtual void restoreGuts(RWvistream&);
- virtual void restoreGuts(RWFile&);
- virtual void saveGuts(RWvostream&) const;
- virtual void saveGuts(RWFile&) const;
- };
-
- // NB: this function has *not* been exported; it is not intended to be used outside of the DLL:
- extern void rwDestroyAssociation(RWCollectable* key, RWCollectable* value, void*);
-
- pragma pop_align_members();
- #endif /* __RWCOLLASS_H__ */
-