home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iicrel.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  6.7 KB  |  236 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. // ICRelationImpl
  25. // ---
  26.  
  27. // public members
  28.  
  29. template <class CInherited>
  30. ICRelationImpl <CInherited>::
  31. ICRelationImpl (Ops& ops, INumber numberOfElements)
  32. : CInherited (ops, numberOfElements)
  33. {
  34. }
  35.  
  36. template <class CInherited>
  37. ICRelationImpl <CInherited>::
  38. ICRelationImpl
  39.   (Ops& ops, ICRelationImpl <CInherited> const& collection)
  40. : CInherited (ops, collection)
  41. {
  42. }
  43.  
  44. template <class CInherited>
  45. IBoolean
  46. ICRelationImpl <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. ICRelationImpl <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. ICRelationImpl <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. ICRelationImpl <CInherited>::
  75. Any () const
  76. { ICHECK_IsEmpty (ClassName (), "Any")
  77.  
  78.   return CInherited::Any ();
  79. }
  80.  
  81. template <class CInherited>
  82. void*
  83. ICRelationImpl <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. ICRelationImpl <CInherited>::
  97. ElementWithKey (void const* key) const
  98. { return CInherited::ElementWithKey (key);
  99. }
  100.  
  101. template <class CInherited>
  102. IBoolean
  103. ICRelationImpl <CInherited>::
  104. Locate (void const* element, ICursorImpl& cursor) const
  105. { ICHECK_IsFor (ClassName (), "Locate")
  106.  
  107.   return CInherited::Locate (element, cursor);
  108. }
  109.  
  110. template <class CInherited>
  111. IBoolean
  112. ICRelationImpl <CInherited>::
  113. LocateElementWithKey (void const* key, ICursorImpl& cursor) const
  114. { ICHECK_IsFor (ClassName (), "LocateElementWithKey")
  115.  
  116.   return CInherited::LocateElementWithKey (key, cursor);
  117. }
  118.  
  119. template <class CInherited>
  120. IBoolean
  121. ICRelationImpl <CInherited>::
  122. LocateNext (void const* element, ICursorImpl& cursor) const
  123. { ICHECK_IsFor   (ClassName (), "LocateNext")
  124.   ICHECK_IsValid (ClassName (), "LocateNext")
  125. #if defined (IALL_CHECKS)
  126.   ICHECK_Cursor  (ClassName (), "LocateNext")
  127. #endif
  128.  
  129.   return CInherited::LocateNext (element, cursor);
  130. }
  131.  
  132. template <class CInherited>
  133. IBoolean
  134. ICRelationImpl <CInherited>::
  135. LocateNextElementWithKey (void const* key, ICursorImpl& cursor) const
  136. { ICHECK_IsFor   (ClassName (), "LocateNextElementWithKey")
  137.   ICHECK_IsValid (ClassName (), "LocateNextElementWithKey")
  138. #if defined (IALL_CHECKS)
  139.   ICHECK_Cursor  (ClassName (), "LocateNextElementWithKey")
  140. #endif
  141.  
  142.   return CInherited::LocateNextElementWithKey (key, cursor);
  143. }
  144.  
  145. template <class CInherited>
  146. IBoolean
  147. ICRelationImpl <CInherited>::
  148. LocateOrAdd (void const* element, ICursorImpl& cursor)
  149. { ICHECK_IsFor (ClassName (), "LocateOrAdd")
  150.  
  151.   return CInherited::LocateOrAdd (element, cursor);
  152. }
  153.  
  154. template <class CInherited>
  155. IBoolean
  156. ICRelationImpl <CInherited>::
  157. LocateOrAddElementWithKey (void const* key, ICursorImpl& cursor)
  158. { ICHECK_IsFor (ClassName (), "LocateOrAddElementWithKey")
  159.  
  160.   return CInherited::LocateOrAddElementWithKey (key, cursor);
  161. }
  162.  
  163. template <class CInherited>
  164. void
  165. ICRelationImpl <CInherited>::
  166. RemoveAt (ICursorImpl& cursor)
  167. { ICHECK_IsFor        (ClassName (), "RemoveAt")
  168.   ICHECK_IsValid      (ClassName (), "RemoveAt")
  169. #if defined (IALL_CHECKS)
  170.   ICHECK_Cursor       (ClassName (), "RemoveAt")
  171. #endif
  172.  
  173.   CInherited::RemoveAt (cursor);
  174. }
  175.  
  176. template <class CInherited>
  177. void
  178. ICRelationImpl <CInherited>::
  179. ReplaceAt (ICursorImpl const& cursor, void const* element)
  180. { ICHECK_IsFor        (ClassName (), "ReplaceAt")
  181.   ICHECK_IsValid      (ClassName (), "ReplaceAt")
  182. #if defined (IALL_CHECKS)
  183.   ICHECK_Cursor       (ClassName (), "ReplaceAt")
  184. #endif
  185.   ICHECK_Replacement  (ClassName (), "ReplaceAt")
  186.  
  187.   CInherited::ReplaceAt (cursor, element);
  188. }
  189.  
  190. template <class CInherited>
  191. IBoolean
  192. ICRelationImpl <CInherited>::
  193. ReplaceElementWithKey (void const* element, ICursorImpl& cursor)
  194. { ICHECK_IsFor (ClassName (), "ReplaceElementWithKey")
  195.  
  196.   return CInherited::ReplaceElementWithKey (element, cursor);
  197. }
  198.  
  199. template <class CInherited>
  200. IBoolean
  201. ICRelationImpl <CInherited>::
  202. SetToFirst (ICursorImpl& cursor) const
  203. { ICHECK_IsFor (ClassName (), "SetToFirst")
  204.  
  205.   return CInherited::SetToFirst (cursor);
  206. }
  207.  
  208. template <class CInherited>
  209. IBoolean
  210. ICRelationImpl <CInherited>::
  211. SetToNext (ICursorImpl& cursor) const
  212. { ICHECK_IsFor   (ClassName (), "SetToNext")
  213.   ICHECK_IsValid (ClassName (), "SetToNext")
  214. #if defined (IALL_CHECKS)
  215.   ICHECK_Cursor  (ClassName (), "SetToNext")
  216. #endif
  217.  
  218.   return CInherited::SetToNext (cursor);
  219. }
  220.  
  221. template <class CInherited>
  222. IBoolean
  223. ICRelationImpl <CInherited>::
  224. SetToNextWithDifferentKey (ICursorImpl& cursor) const
  225. { ICHECK_IsFor        (ClassName (), "SetToNextWithDifferentKey")
  226.   ICHECK_IsValid      (ClassName (), "SetToNextWithDifferentKey")
  227. #if defined (IALL_CHECKS)
  228.   ICHECK_Cursor       (ClassName (), "SetToNextWithDifferentKey")
  229. #endif
  230.  
  231.   return CInherited::SetToNextWithDifferentKey (cursor);
  232. }
  233.  
  234. #pragma info (restore)
  235. #pragma pack ()
  236.