home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iaorder.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  5.3 KB  |  213 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. // IOrderedCursor
  20. // --------------
  21.  
  22. // public members
  23.  
  24. template <class Element>
  25. inline IBoolean
  26. IOrderedCursor <Element>::
  27. setToLast ()
  28. { return ImplOf (*this).SetToLast ();
  29. }
  30.  
  31.  
  32. template <class Element>
  33. inline IBoolean
  34. IOrderedCursor <Element>::
  35. setToPrevious ()
  36. { return ImplOf (*this).SetToPrevious ();
  37. }
  38.  
  39. // protected members
  40.  
  41. template <class Element>
  42. inline
  43. IOrderedCursor <Element>::
  44. IOrderedCursor (Implementation* impl)
  45. : IElementCursor <Element> (impl)
  46. {
  47. }
  48.  
  49. // -------------------
  50. // IAOrderedCollection
  51. // -------------------
  52.  
  53. // public members
  54.  
  55. template <class Element>
  56. inline
  57. IAOrderedCollection <Element>::
  58. IAOrderedCollection (INotifier& notifier)
  59. { SetImpl ((Implementation*)¬ifier);
  60. }
  61.  
  62. template <class Element>
  63. inline
  64. IAOrderedCollection <Element>::
  65. ~IAOrderedCollection ()
  66. {
  67. }
  68.  
  69. template <class Element>
  70. inline Element const&
  71. IAOrderedCollection <Element>::
  72. elementAtPosition (IPosition position) const
  73. { return *(Element const*) ImplOf (*this).
  74.     ElementAtPosition (position);
  75. }
  76.  
  77. template <class Element>
  78. inline Element const&
  79. IAOrderedCollection <Element>::
  80. firstElement () const
  81. { return *(Element const*) ImplOf (*this).First ();
  82. }
  83.  
  84. template <class Element>
  85. inline Element const&
  86. IAOrderedCollection <Element>::
  87. first () const
  88. { return *(Element const*) ImplOf (*this).First ();
  89. }
  90.  
  91. template <class Element>
  92. inline IBoolean
  93. IAOrderedCollection <Element>::
  94. isFirst (ICursor const& cursor) const
  95. { return ImplOf (*this).IsFirstAt (CrsrImplOf (cursor));
  96. }
  97.  
  98. template <class Element>
  99. inline IBoolean
  100. IAOrderedCollection <Element>::
  101. isFirstAt (ICursor const& cursor) const
  102. { return ImplOf (*this).IsFirstAt (CrsrImplOf (cursor));
  103. }
  104.  
  105. template <class Element>
  106. inline IBoolean
  107. IAOrderedCollection <Element>::
  108. isLast (ICursor const& cursor) const
  109. { return ImplOf (*this).IsLastAt (CrsrImplOf (cursor));
  110. }
  111.  
  112. template <class Element>
  113. inline IBoolean
  114. IAOrderedCollection <Element>::
  115. isLastAt (ICursor const& cursor) const
  116. { return ImplOf (*this).IsLastAt (CrsrImplOf (cursor));
  117. }
  118.  
  119. template <class Element>
  120. inline Element const&
  121. IAOrderedCollection <Element>::
  122. lastElement () const
  123. { return *(Element const*) ImplOf (*this).Last ();
  124. }
  125.  
  126. template <class Element>
  127. inline Element const&
  128. IAOrderedCollection <Element>::
  129. last () const
  130. { return *(Element const*) ImplOf (*this).Last ();
  131. }
  132.  
  133. template <class Element>
  134. inline IPosition
  135. IAOrderedCollection <Element>::
  136. position (ICursor const& cursor) const
  137. { return ImplOf (*this).PositionAt (CrsrImplOf (cursor));
  138. }
  139.  
  140. template <class Element>
  141. inline IPosition
  142. IAOrderedCollection <Element>::
  143. positionAt (ICursor const& cursor) const
  144. { return ImplOf (*this).PositionAt (CrsrImplOf (cursor));
  145. }
  146.  
  147. template <class Element>
  148. inline void
  149. IAOrderedCollection <Element>::
  150. removeAtPosition (IPosition position)
  151. { ImplOf (*this).RemoveAtPosition (position);
  152. }
  153.  
  154. template <class Element>
  155. inline void
  156. IAOrderedCollection <Element>::
  157. removeFirst ()
  158. { ImplOf (*this).RemoveFirst ();
  159. }
  160.  
  161. template <class Element>
  162. inline void
  163. IAOrderedCollection <Element>::
  164. removeLast ()
  165. { ImplOf (*this).RemoveLast ();
  166. }
  167.  
  168. template <class Element>
  169. inline IBoolean
  170. IAOrderedCollection <Element>::
  171. setToLast (ICursor& cursor) const
  172. { return ImplOf (*this).SetToLast (CrsrImplOf (cursor));
  173. }
  174.  
  175. template <class Element>
  176. inline void
  177. IAOrderedCollection <Element>::
  178. setToPosition (IPosition position, ICursor& cursor) const
  179. { ImplOf (*this).SetToPosition (position, CrsrImplOf (cursor));
  180. }
  181.  
  182. template <class Element>
  183. inline IBoolean
  184. IAOrderedCollection <Element>::
  185. setToPrevious (ICursor& cursor) const
  186. { return ImplOf (*this).SetToPrevious (CrsrImplOf (cursor));
  187. }
  188.  
  189. // protected members
  190.  
  191. template <class Element>
  192. inline
  193. IAOrderedCollection <Element>::
  194. IAOrderedCollection ()
  195. {
  196. }
  197.  
  198. template <class Element>
  199. inline
  200. IAOrderedCollection <Element>::
  201. IAOrderedCollection (IAOrderedCollection <Element> const&)
  202. {
  203. }
  204.  
  205. // private members
  206.  
  207. template <class Element>
  208. inline IAOrderedCollection <Element>::Implementation&
  209. IAOrderedCollection <Element>::
  210. ImplOf (IAOrderedCollection <Element> const& collection)
  211. { return *(Implementation*)collection.ivImpl;
  212. }
  213.