home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iasqntl.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  5.1 KB  |  190 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. // IASequentialCollection
  20. // ----------------------
  21.  
  22. // public members
  23.  
  24. template <class Element>
  25. inline
  26. IASequentialCollection <Element>::
  27. IASequentialCollection (INotifier& notifier)
  28. { SetImpl ((Implementation*)¬ifier);
  29. }
  30.  
  31. template <class Element>
  32. inline
  33. IASequentialCollection <Element>::
  34. ~IASequentialCollection ()
  35. {
  36. }
  37.  
  38. template <class Element>
  39. inline void
  40. IASequentialCollection <Element>::
  41. addAsFirst (Element const& element)
  42. { ImplOf (*this).AddAsFirst (&element);
  43. }
  44.  
  45. template <class Element>
  46. inline void
  47. IASequentialCollection <Element>::
  48. addAsFirst (Element const& element, ICursor& cursor)
  49. { ImplOf (*this).AddAsFirst (&element, CrsrImplOf (cursor));
  50. }
  51.  
  52. template <class Element>
  53. inline void
  54. IASequentialCollection <Element>::
  55. addAsLast (Element const& element)
  56. { ImplOf (*this).AddAsLast (&element);
  57. }
  58.  
  59. template <class Element>
  60. inline void
  61. IASequentialCollection <Element>::
  62. addAsLast (Element const& element, ICursor& cursor)
  63. { ImplOf (*this).AddAsLast (&element, CrsrImplOf (cursor));
  64. }
  65.  
  66. template <class Element>
  67. inline void
  68. IASequentialCollection <Element>::
  69. addAsNext (Element const& element, ICursor& cursor)
  70. { ImplOf (*this).AddAsNext (&element, CrsrImplOf (cursor));
  71. }
  72.  
  73. template <class Element>
  74. inline void
  75. IASequentialCollection <Element>::
  76. addAsPrevious (Element const& element, ICursor& cursor)
  77. { ImplOf (*this).AddAsPrevious (&element, CrsrImplOf (cursor));
  78. }
  79.  
  80. template <class Element>
  81. inline void
  82. IASequentialCollection <Element>::
  83. addAtPosition (IPosition position, Element const& element)
  84. { ImplOf (*this).AddAtPosition (position, &element);
  85. }
  86.  
  87. template <class Element>
  88. inline void
  89. IASequentialCollection <Element>::
  90. addAtPosition (IPosition position,
  91.                Element const& element, ICursor& cursor)
  92. { ImplOf (*this).
  93.     AddAtPosition (position, &element, CrsrImplOf (cursor));
  94. }
  95.  
  96. template <class Element>
  97. inline Element&
  98. IASequentialCollection <Element>::
  99. any ()
  100. { return *(Element*) ImplOf (*this).Any ();
  101. }
  102.  
  103. template <class Element>
  104. inline Element const&
  105. IASequentialCollection <Element>::
  106. any () const
  107. { return *(Element const*) ImplOf (*this).Any ();
  108. }
  109.  
  110. template <class Element>
  111. inline Element&
  112. IASequentialCollection <Element>::
  113. elementAtPosition (IPosition position)
  114. { return *(Element*) ImplOf (*this).ElementAtPosition (position);
  115. }
  116.  
  117. template <class Element>
  118. inline Element const&
  119. IASequentialCollection <Element>::
  120. elementAtPosition (IPosition position) const
  121. { return *(Element const*) ImplOf (*this).ElementAtPosition (position);
  122. }
  123.  
  124. template <class Element>
  125. inline Element&
  126. IASequentialCollection <Element>::
  127. first ()
  128. { return *(Element*) ImplOf (*this).First ();
  129. }
  130.  
  131. template <class Element>
  132. inline Element const&
  133. IASequentialCollection <Element>::
  134. first () const
  135. { return *(Element const*) ImplOf (*this).First ();
  136. }
  137.  
  138. template <class Element>
  139. inline Element&
  140. IASequentialCollection <Element>::
  141. last ()
  142. { return *(Element*) ImplOf (*this).Last ();
  143. }
  144.  
  145. template <class Element>
  146. inline Element const&
  147. IASequentialCollection <Element>::
  148. last () const
  149. { return *(Element const*) ImplOf (*this).Last ();
  150. }
  151.  
  152. template <class Element>
  153. inline void
  154. IASequentialCollection <Element>::
  155. reverse ()
  156. { ImplOf (*this).Reverse ();
  157. }
  158.  
  159. template <class Element>
  160. inline void
  161. IASequentialCollection <Element>::
  162. sort (long (*compFunc) (Element const&, Element const&))
  163. { ImplOf (*this).Sort ((ICompFunc)compFunc, 0);
  164. }
  165.  
  166. // protected members
  167.  
  168. template <class Element>
  169. inline
  170. IASequentialCollection <Element>::
  171. IASequentialCollection ()
  172. {
  173. }
  174.  
  175. template <class Element>
  176. inline
  177. IASequentialCollection <Element>::
  178. IASequentialCollection (IASequentialCollection <Element> const&)
  179. {
  180. }
  181.  
  182. // private members
  183.  
  184. template <class Element>
  185. inline IASequentialCollection <Element>::Implementation&
  186. IASequentialCollection <Element>::
  187. ImplOf (IASequentialCollection <Element> const& collection)
  188. { return *(Implementation*)collection.ivImpl;
  189. }
  190.