home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iichp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.8 KB  |  135 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. // ICHeapImpl
  25. // ---
  26.  
  27. // public members
  28.  
  29. template <class CInherited>
  30. ICHeapImpl <CInherited>::
  31. ICHeapImpl (Ops& ops, INumber numberOfElements)
  32. : CInherited (ops, numberOfElements)
  33. {
  34. }
  35.  
  36. template <class CInherited>
  37. ICHeapImpl <CInherited>::
  38. ICHeapImpl
  39.   (Ops& ops, ICHeapImpl <CInherited> const& collection)
  40. : CInherited (ops, collection)
  41. {
  42. }
  43.  
  44. template <class CInherited>
  45. IBoolean
  46. ICHeapImpl <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. ICHeapImpl <CInherited>::
  57. AddAllFrom (IACollectionImpl const& collection)
  58. { ICHECK_Identical (ClassName (), "AddAllFrom")
  59.  
  60.   CInherited::AddAllFrom (collection);
  61. }
  62.  
  63. template <class CInherited>
  64. void*
  65. ICHeapImpl <CInherited>::
  66. Any () const
  67. { ICHECK_IsEmpty (ClassName (), "Any")
  68.  
  69.   return CInherited::Any ();
  70. }
  71.  
  72. template <class CInherited>
  73. void*
  74. ICHeapImpl <CInherited>::
  75. ElementAt (ICursorImpl const& cursor) const
  76. { ICHECK_IsFor        (ClassName (), "ElementAt")
  77.   ICHECK_IsValid      (ClassName (), "ElementAt")
  78. #if defined (IALL_CHECKS)
  79.   ICHECK_Cursor       (ClassName (), "ElementAt")
  80. #endif
  81.  
  82.   return CInherited::ElementAt (cursor);
  83. }
  84.  
  85. template <class CInherited>
  86. void
  87. ICHeapImpl <CInherited>::
  88. RemoveAt (ICursorImpl& cursor)
  89. { ICHECK_IsFor        (ClassName (), "RemoveAt")
  90.   ICHECK_IsValid      (ClassName (), "RemoveAt")
  91. #if defined (IALL_CHECKS)
  92.   ICHECK_Cursor       (ClassName (), "RemoveAt")
  93. #endif
  94.  
  95.   CInherited::RemoveAt (cursor);
  96. }
  97.  
  98. template <class CInherited>
  99. void
  100. ICHeapImpl <CInherited>::
  101. ReplaceAt (ICursorImpl const& cursor, void const* element)
  102. { ICHECK_IsFor        (ClassName (), "ReplaceAt")
  103.   ICHECK_IsValid      (ClassName (), "ReplaceAt")
  104. #if defined (IALL_CHECKS)
  105.   ICHECK_Cursor       (ClassName (), "ReplaceAt")
  106. #endif
  107.  
  108.   CInherited::ReplaceAt (cursor, element);
  109. }
  110.  
  111. template <class CInherited>
  112. IBoolean
  113. ICHeapImpl <CInherited>::
  114. SetToFirst (ICursorImpl& cursor) const
  115. { ICHECK_IsFor (ClassName (), "SetToFirst")
  116.  
  117.   return CInherited::SetToFirst (cursor);
  118. }
  119.  
  120. template <class CInherited>
  121. IBoolean
  122. ICHeapImpl <CInherited>::
  123. SetToNext (ICursorImpl& cursor) const
  124. { ICHECK_IsFor   (ClassName (), "SetToNext")
  125.   ICHECK_IsValid (ClassName (), "SetToNext")
  126. #if defined (IALL_CHECKS)
  127.   ICHECK_Cursor  (ClassName (), "SetToNext")
  128. #endif
  129.  
  130.   return CInherited::SetToNext (cursor);
  131. }
  132.  
  133. #pragma info (restore)
  134. #pragma pack ()
  135.