home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iicks.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  5.8 KB  |  205 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. #include <iiexc.h>
  19.  
  20. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  21. #pragma pack (4)
  22.  
  23. // ---
  24. // ICKeySetImpl
  25. // ---
  26.  
  27. // public members
  28.  
  29. template <class CInherited>
  30. ICKeySetImpl <CInherited>::
  31. ICKeySetImpl (Ops& ops, INumber numberOfElements)
  32. : CInherited (ops, numberOfElements)
  33. {
  34. }
  35.  
  36. template <class CInherited>
  37. ICKeySetImpl <CInherited>::
  38. ICKeySetImpl
  39.   (Ops& ops, ICKeySetImpl <CInherited> const& collection)
  40. : CInherited (ops, collection)
  41. {
  42. }
  43.  
  44. template <class CInherited>
  45. IBoolean
  46. ICKeySetImpl <CInherited>::
  47. Add (void const* element, ICursorImpl& cursor)
  48. { ICHECK_IsFor      (ClassName (), "Add")
  49.  
  50.   IBoolean hasBeenAdded = CInherited::Add (element, cursor);
  51.   return hasBeenAdded;
  52. }
  53.  
  54. template <class CInherited>
  55. void
  56. ICKeySetImpl <CInherited>::
  57. AddAllFrom (IACollectionImpl const& collection)
  58. { ICHECK_Identical (ClassName (), "AddAllFrom")
  59.  
  60.   CInherited::AddAllFrom (collection);
  61. }
  62.  
  63. template <class CInherited>
  64. IBoolean
  65. ICKeySetImpl <CInherited>::
  66. AddOrReplaceElementWithKey (void const* element, ICursorImpl& cursor)
  67. { ICHECK_IsFor (ClassName (), "AddOrReplaceElementWithKey")
  68.  
  69.   return CInherited::AddOrReplaceElementWithKey (element, cursor);
  70. }
  71.  
  72. template <class CInherited>
  73. void*
  74. ICKeySetImpl <CInherited>::
  75. Any () const
  76. { ICHECK_IsEmpty (ClassName (), "Any")
  77.  
  78.   return CInherited::Any ();
  79. }
  80.  
  81. template <class CInherited>
  82. void*
  83. ICKeySetImpl <CInherited>::
  84. ElementAt (ICursorImpl const& cursor) const
  85. { ICHECK_IsFor        (ClassName (), "ElementAt")
  86.   ICHECK_IsValid      (ClassName (), "ElementAt")
  87. #if defined (IALL_CHECKS)
  88.   ICHECK_Cursor       (ClassName (), "ElementAt")
  89. #endif
  90.  
  91.   return CInherited::ElementAt (cursor);
  92. }
  93.  
  94. template <class CInherited>
  95. void*
  96. ICKeySetImpl <CInherited>::
  97. ElementWithKey (void const* key) const
  98. { return CInherited::ElementWithKey (key);
  99. }
  100.  
  101. template <class CInherited>
  102. IBoolean
  103. ICKeySetImpl <CInherited>::
  104. LocateElementWithKey (void const* key, ICursorImpl& cursor) const
  105. { ICHECK_IsFor (ClassName (), "LocateElementWithKey")
  106.  
  107.   return CInherited::LocateElementWithKey (key, cursor);
  108. }
  109.  
  110. template <class CInherited>
  111. IBoolean
  112. ICKeySetImpl <CInherited>::
  113. LocateNextElementWithKey (void const* key, ICursorImpl& cursor) const
  114. { ICHECK_IsFor   (ClassName (), "LocateNextElementWithKey")
  115.   ICHECK_IsValid (ClassName (), "LocateNextElementWithKey")
  116. #if defined (IALL_CHECKS)
  117.   ICHECK_Cursor  (ClassName (), "LocateNextElementWithKey")
  118. #endif
  119.  
  120.   return CInherited::LocateNextElementWithKey (key, cursor);
  121. }
  122.  
  123. template <class CInherited>
  124. IBoolean
  125. ICKeySetImpl <CInherited>::
  126. LocateOrAddElementWithKey (void const* key, ICursorImpl& cursor)
  127. { ICHECK_IsFor (ClassName (), "LocateOrAddElementWithKey")
  128.  
  129.   return CInherited::LocateOrAddElementWithKey (key, cursor);
  130. }
  131.  
  132. template <class CInherited>
  133. void
  134. ICKeySetImpl <CInherited>::
  135. RemoveAt (ICursorImpl& cursor)
  136. { ICHECK_IsFor        (ClassName (), "RemoveAt")
  137.   ICHECK_IsValid      (ClassName (), "RemoveAt")
  138. #if defined (IALL_CHECKS)
  139.   ICHECK_Cursor       (ClassName (), "RemoveAt")
  140. #endif
  141.  
  142.   CInherited::RemoveAt (cursor);
  143. }
  144.  
  145. template <class CInherited>
  146. void
  147. ICKeySetImpl <CInherited>::
  148. ReplaceAt (ICursorImpl const& cursor, void const* element)
  149. { ICHECK_IsFor        (ClassName (), "ReplaceAt")
  150.   ICHECK_IsValid      (ClassName (), "ReplaceAt")
  151. #if defined (IALL_CHECKS)
  152.   ICHECK_Cursor       (ClassName (), "ReplaceAt")
  153. #endif
  154.   ICHECK_Replacement  (ClassName (), "ReplaceAt")
  155.  
  156.   CInherited::ReplaceAt (cursor, element);
  157. }
  158.  
  159. template <class CInherited>
  160. IBoolean
  161. ICKeySetImpl <CInherited>::
  162. ReplaceElementWithKey (void const* element, ICursorImpl& cursor)
  163. { ICHECK_IsFor (ClassName (), "ReplaceElementWithKey")
  164.  
  165.   return CInherited::ReplaceElementWithKey (element, cursor);
  166. }
  167.  
  168. template <class CInherited>
  169. IBoolean
  170. ICKeySetImpl <CInherited>::
  171. SetToFirst (ICursorImpl& cursor) const
  172. { ICHECK_IsFor (ClassName (), "SetToFirst")
  173.  
  174.   return CInherited::SetToFirst (cursor);
  175. }
  176.  
  177. template <class CInherited>
  178. IBoolean
  179. ICKeySetImpl <CInherited>::
  180. SetToNext (ICursorImpl& cursor) const
  181. { ICHECK_IsFor   (ClassName (), "SetToNext")
  182.   ICHECK_IsValid (ClassName (), "SetToNext")
  183. #if defined (IALL_CHECKS)
  184.   ICHECK_Cursor  (ClassName (), "SetToNext")
  185. #endif
  186.  
  187.   return CInherited::SetToNext (cursor);
  188. }
  189.  
  190. template <class CInherited>
  191. IBoolean
  192. ICKeySetImpl <CInherited>::
  193. SetToNextWithDifferentKey (ICursorImpl& cursor) const
  194. { ICHECK_IsFor        (ClassName (), "SetToNextWithDifferentKey")
  195.   ICHECK_IsValid      (ClassName (), "SetToNextWithDifferentKey")
  196. #if defined (IALL_CHECKS)
  197.   ICHECK_Cursor       (ClassName (), "SetToNextWithDifferentKey")
  198. #endif
  199.  
  200.   return CInherited::SetToNextWithDifferentKey (cursor);
  201. }
  202.  
  203. #pragma info (restore)
  204. #pragma pack ()
  205.