home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / irelhsh.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  6.6 KB  |  253 lines

  1. /**********************************************************************
  2. *                                                                     *
  3. *  IBM(R) VisualAge(TM) for C++ for Windows(R), Version 3.5           *
  4. *                                                                     *
  5. *  PID: 5622-880                                                      *
  6. *  - Licensed Material - Program-Property of IBM                      *
  7. *  (C) Copyright IBM Corp. 1991, 1995 - All Right Reserved.           *
  8. *                                                                     *
  9. *  US Government Users Restricted Rights - Use, duplication or        *
  10. *  disclosure restricted by GSA ADP Schedule Contract with IBM Corp.  *
  11. *                                                                     *
  12. *  VisualAge, and IBM are trademarks or registered trademarks of      *
  13. *  International Business Machines Corporation.                       *
  14. *  Windows is a registered trademark of Microsoft Corporation.        *
  15. *                                                                     *
  16. **********************************************************************/
  17.  
  18. #ifndef _IRELHSH_H
  19. #define _IRELHSH_H
  20.  
  21. #include <iarel.h>
  22. #include <iicrel.h>
  23. #include <iivrel.h>
  24. #include <iirelhsh.h>
  25.  
  26.  
  27. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  28. #pragma pack (4)
  29.  
  30. #pragma SOMAsDefault (off)
  31.  
  32. template <class Element, class Key, class ElementOps>
  33. class IGRelationAsHshTable;
  34.  
  35. template <class Element, class Key, class ElementOps>
  36. class IGRelationAsHshTableCursor :
  37.   public IElementCursor <Element> {
  38.  
  39.   typedef  IElementCursor <Element> Inherited;
  40.  
  41.   typedef  IGRelationAsHshTable
  42.             <Element, Key, ElementOps>::
  43.               Implementation::Cursor Implementation;
  44.  
  45. public:
  46.  
  47.            IGRelationAsHshTableCursor
  48.                             (IGRelationAsHshTable
  49.                               <
  50.                                Element, Key, ElementOps> const&);
  51.  
  52.   IGRelationAsHshTableCursor <Element, Key, ElementOps>&
  53.            operator=        (IGRelationAsHshTableCursor
  54.                               <
  55.                                Element, Key, ElementOps> const&);
  56.  
  57. protected:
  58.  
  59.            IGRelationAsHshTableCursor
  60.                             (ICursorImpl*);
  61.  
  62. private:
  63.  
  64.  
  65. };
  66.  
  67. template <class Element, class Key, class ElementOps>
  68. class IGRelationAsHshTable :
  69.   public IARelation <Element, Key> {
  70. protected:
  71.  
  72.   typedef  IGRelationAsHshTable <Element, Key, ElementOps> Self;
  73.  
  74.   typedef  IRelationAsHshTableImpl PureImplementation;
  75.  
  76. #if defined (INO_CHECKS)
  77.   typedef  PureImplementation Implementation;
  78. #else
  79.   typedef  ICRelationImpl
  80.             <PureImplementation> Implementation;
  81. #endif
  82.  
  83. #define IGRelationAsHshTableTypedef(Element, Key, ElementOps)\
  84.   typedef  IRelationAsHshTableOps\
  85.             <Element, Key,\
  86.              IWEKEHOps <Element, Key, ElementOps>,\
  87.              Implementation> Instantiation
  88.  
  89.            IGRelationAsHshTableTypedef (Element, Key, ElementOps);
  90.  
  91. public:
  92.  
  93.   typedef  IGRelationAsHshTableCursor
  94.             <Element, Key, ElementOps> Cursor;
  95.  
  96.  
  97.            IGRelationAsHshTable
  98.                             (INumber = 100);
  99.  
  100.            IGRelationAsHshTable
  101.                             (IGRelationAsHshTable
  102.                               <
  103.                                Element, Key, ElementOps> const&);
  104.  
  105.   IGRelationAsHshTable <Element, Key, ElementOps>&
  106.            operator=        (IGRelationAsHshTable
  107.                               <
  108.                                Element, Key, ElementOps> const&);
  109.  
  110.  
  111. protected:
  112.  
  113.            IGRelationAsHshTable
  114.                             (PureImplementation&);
  115.  
  116.   static
  117.   Implementation&
  118.            ImplOf           (IGRelationAsHshTable
  119.                               <
  120.                                Element, Key, ElementOps> const&);
  121.  
  122. private:
  123.  
  124.   friend
  125.   class    IGRelationAsHshTableCursor
  126.             <Element, Key, ElementOps>;
  127.  
  128.  
  129.  
  130. };
  131.  
  132. template <class Element, class Key>
  133. class IRelationAsHshTable :
  134.   public IGRelationAsHshTable
  135.           <Element, Key, IEKEHOps <Element, Key> > {
  136.  
  137.   typedef  IGRelationAsHshTable
  138.             <Element, Key,
  139.              IEKEHOps <Element, Key> > Inherited;
  140.  
  141. protected:
  142.  
  143.   typedef  IRelationAsHshTable <Element, Key> Self;
  144.  
  145. #define IRelationAsHshTableTypedef(Element, Key)\
  146.   typedef  IRelationAsHshTableOps\
  147.             <Element, Key,\
  148.              IWEKEHOps <Element, Key, IEKEHOps <Element, Key> >,\
  149.              Implementation> Instantiation
  150.  
  151. public:
  152.  
  153.            IRelationAsHshTable
  154.                             (INumber = 100);
  155.  
  156.  
  157. protected:
  158.  
  159.            IRelationAsHshTable
  160.                               (PureImplementation&);
  161.  
  162. private:
  163.  
  164.  
  165. };
  166.  
  167. template <class Element, class Key, class ElementOps>
  168. class IVGRelationAsHshTable :
  169.   public IGRelationAsHshTable
  170.           <Element, Key, ElementOps > {
  171.  
  172.   typedef  IVGRelationAsHshTable
  173.             <Element, Key, ElementOps> Inherited;
  174.  
  175. protected:
  176.  
  177. #if defined (INO_CHECKS)
  178.   typedef  IVRelationImpl
  179.             <PureImplementation> Implementation;
  180. #else
  181.   typedef  ICRelationImpl
  182.             <IVRelationImpl
  183.               <PureImplementation> > Implementation;
  184. #endif
  185.  
  186. #define IVGRelationAsHshTableTypedef(Element, Key, ElementOps)\
  187.   typedef  IRelationAsHshTableOps\
  188.             <Element, Key,\
  189.              IWEKEHOps <Element, Key, ElementOps>,\
  190.              Implementation> Instantiation
  191.  
  192.            IVGRelationAsHshTableTypedef (Element, Key, ElementOps);
  193.  
  194. public:
  195.  
  196.            IVGRelationAsHshTable
  197.                             (INumber = 100);
  198.  
  199.  
  200. protected:
  201.  
  202.            IVGRelationAsHshTable
  203.                               (PureImplementation&);
  204.  
  205. private:
  206.  
  207.  
  208. };
  209.  
  210. template <class Element, class Key>
  211. class IVRelationAsHshTable :
  212.   public IVGRelationAsHshTable
  213.           <Element, Key, IEKEHOps <Element, Key> > {
  214.  
  215.   typedef  IVGRelationAsHshTable
  216.             <Element, Key,
  217.              IEKEHOps <Element, Key> > Inherited;
  218.  
  219. protected:
  220.  
  221.   typedef  IVRelationAsHshTable <Element, Key> Self;
  222.  
  223. #define IVRelationAsHshTableTypedef(Element, Key)\
  224.   typedef  IVRelationAsHshTableOps\
  225.             <Element, Key,\
  226.              IWEKEHOps <Element, Key, IEKEHOps <Element, Key> >,\
  227.              Implementation> Instantiation
  228.  
  229. public:
  230.  
  231.            IVRelationAsHshTable
  232.                             (INumber = 100);
  233.  
  234.  
  235. protected:
  236.  
  237.            IVRelationAsHshTable
  238.                               (PureImplementation&);
  239.  
  240. private:
  241.  
  242.  
  243. };
  244.  
  245. #pragma SOMAsDefault (pop)
  246.  
  247. #include <irelhsh.inl>
  248.  
  249. #pragma info (restore)
  250. #pragma pack ()
  251.  
  252. #endif
  253.