home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / irelhsh.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  5.1 KB  |  183 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. // ---
  19. // IGRelationAsHshTableCursor
  20. // ---
  21.  
  22. // public members
  23.  
  24. template <class Element, class Key, class ElementOps>
  25. inline
  26. IGRelationAsHshTableCursor <Element, Key, ElementOps>::
  27. IGRelationAsHshTableCursor
  28.   (IGRelationAsHshTable
  29.     <Element, Key, ElementOps> const& collection)
  30. : IElementCursor <Element>
  31.     (collection.ivImpl->CreateCursor ())
  32. {
  33. }
  34.  
  35. template <class Element, class Key, class ElementOps>
  36. inline IGRelationAsHshTableCursor <Element, Key, ElementOps>&
  37. IGRelationAsHshTableCursor <Element, Key, ElementOps>::
  38. operator=
  39.   (IGRelationAsHshTableCursor
  40.     <Element, Key, ElementOps> const& cursor)
  41. { Inherited::operator= (cursor);
  42.   return *this;
  43. }
  44.  
  45. // protected members
  46.  
  47. template <class Element, class Key, class ElementOps>
  48. inline
  49. IGRelationAsHshTableCursor <Element, Key, ElementOps>::
  50. IGRelationAsHshTableCursor (ICursorImpl* impl)
  51. : IElementCursor <Element> (impl)
  52. {
  53. }
  54.  
  55. // ---
  56. // IGRelationAsHshTable
  57. // ---
  58.  
  59. // public members
  60.  
  61. template <class Element, class Key, class ElementOps>
  62. inline
  63. IGRelationAsHshTable <Element, Key, ElementOps>::
  64. IGRelationAsHshTable (INumber numberOfElements)
  65. { SetImpl ((Implementation*) *new
  66.                 Instantiation (numberOfElements));
  67. }
  68.  
  69. template <class Element, class Key, class ElementOps>
  70. inline
  71. IGRelationAsHshTable <Element, Key, ElementOps>::
  72. IGRelationAsHshTable
  73.   (IGRelationAsHshTable
  74.     <Element, Key, ElementOps> const& collection)
  75. { CloneImplOf (collection);
  76. }
  77.  
  78. template <class Element, class Key, class ElementOps>
  79. inline IGRelationAsHshTable <Element, Key, ElementOps>&
  80. IGRelationAsHshTable <Element, Key, ElementOps>::
  81. operator= (IGRelationAsHshTable
  82.             <Element, Key, ElementOps> const& collection)
  83. { ImplOf (*this).Copy (ImplOf (collection));
  84.   return *this;
  85. }
  86.  
  87. // protected members
  88.  
  89. template <class Element, class Key, class ElementOps>
  90. inline
  91. IGRelationAsHshTable <Element, Key, ElementOps>::
  92. IGRelationAsHshTable (PureImplementation& impl)
  93. { SetImpl (&impl);
  94. }
  95.  
  96. template <class Element, class Key, class ElementOps>
  97. inline IGRelationAsHshTable
  98.  <Element, Key, ElementOps>::Implementation&
  99. IGRelationAsHshTable <Element, Key, ElementOps>::
  100. ImplOf (IGRelationAsHshTable
  101.          <Element, Key, ElementOps> const& collection)
  102. { return *(Implementation*)collection.ivImpl;
  103. }
  104.  
  105. // ---
  106. // IRelationAsHshTable
  107. // ---
  108.  
  109. // public members
  110.  
  111. template <class Element, class Key>
  112. inline
  113. IRelationAsHshTable <Element, Key>::
  114. IRelationAsHshTable (INumber numberOfElements)
  115. : IGRelationAsHshTable
  116.    <Element, Key, IEKEHOps <Element, Key> > (numberOfElements)
  117. {
  118. }
  119.  
  120. // protected members
  121.  
  122. template <class Element, class Key>
  123. inline
  124. IRelationAsHshTable <Element, Key>::
  125. IRelationAsHshTable (PureImplementation& impl)
  126. : IGRelationAsHshTable
  127.    <Element, Key, IEKEHOps <Element, Key> > (impl)
  128. {
  129. }
  130.  
  131. // ---
  132. // IVGRelationAsHshTable
  133. // ---
  134.  
  135. // public members
  136.  
  137. template <class Element, class Key, class ElementOps>
  138. inline
  139. IVGRelationAsHshTable <Element, Key, ElementOps>::
  140. IVGRelationAsHshTable (INumber numberOfElements)
  141. : IGRelationAsHshTable
  142.     <Element, Key, ElementOps> (*(Implementation*) *new
  143.                 Instantiation (numberOfElements))
  144. {
  145. }
  146.  
  147. // protected members
  148.  
  149. template <class Element, class Key, class ElementOps>
  150. inline
  151. IVGRelationAsHshTable <Element, Key, ElementOps>::
  152. IVGRelationAsHshTable (PureImplementation& impl)
  153. : IGRelationAsHshTable
  154.     <Element, Key, ElementOps> (impl)
  155. {
  156. }
  157.  
  158. // ---
  159. // IVRelationAsHshTable
  160. // ---
  161.  
  162. // public members
  163.  
  164. template <class Element, class Key>
  165. inline
  166. IVRelationAsHshTable <Element, Key>::
  167. IVRelationAsHshTable (INumber numberOfElements)
  168. : IVGRelationAsHshTable
  169.    <Element, Key, IEKEHOps <Element, Key> > (numberOfElements)
  170. {
  171. }
  172.  
  173. // protected members
  174.  
  175. template <class Element, class Key>
  176. inline
  177. IVRelationAsHshTable <Element, Key>::
  178. IVRelationAsHshTable (PureImplementation& impl)
  179. : IVGRelationAsHshTable
  180.    <Element, Key, IEKEHOps <Element, Key> > (impl)
  181. {
  182. }
  183.