home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- * *
- * IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3.5 *
- * *
- * PID: 5622-880 *
- * - Licensed Material - Program-Property of IBM *
- * (C) Copyright IBM Corp. 1991, 1995 - All Right Reserved. *
- * *
- * US Government Users Restricted Rights - Use, duplication or *
- * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *
- * *
- * VisualAge, and IBM are trademarks or registered trademarks of *
- * International Business Machines Corporation. *
- * Windows is a registered trademark of Microsoft Corporation. *
- * *
- **********************************************************************/
-
- #include <stddef.h>
-
- // -----------
- // IKeyFromOps
- // -----------
-
- template <class Key>
- inline void* IKeyFromOps (Key const& k)
- { return (void*)&k;
- }
-
- // ----------
- // IKeyForOps
- // ----------
-
- template <class Key>
- inline Key const& IKeyForOps (Key const* k)
- { return *k;
- }
-
- // -----------
- // IOpsWithKey
- // -----------
-
- // public members
-
- template <class Element, class ElementOps>
- inline
- IOpsWithKey <Element, ElementOps>::
- IOpsWithKey ()
- {
- }
-
- template <class Element, class ElementOps>
- inline
- IOpsWithKey <Element, ElementOps>::
- IOpsWithKey (void* opsArg)
- : ElementOps (opsArg), keyOps (opsArg)
- {
- }
-
- template <class Element, class ElementOps>
- inline Element const&
- IOpsWithKey <Element, ElementOps>::
- Key (Element const& e) const
- { return e;
- }
-