home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibtree.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  3.4 KB  |  161 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. // ITreeCursor
  20. // -----------
  21.  
  22. // public members
  23.  
  24. inline void
  25. ITreeCursor::
  26. copy (ITreeCursor const& cursor)
  27. { ImplOf (*this).Copy (*cursor.ivImpl);
  28. }
  29.  
  30. inline void
  31. ITreeCursor::
  32. invalidate ()
  33. { ImplOf (*this).Invalidate ();
  34. }
  35.  
  36. inline IBoolean
  37. ITreeCursor::
  38. isValid () const
  39. { return ImplOf (*this).IsValid ();
  40. }
  41.  
  42. inline IBoolean
  43. ITreeCursor::
  44. setToChild (IPosition position)
  45. { return ImplOf (*this).SetToChild (position);
  46. }
  47.  
  48. inline IBoolean
  49. ITreeCursor::
  50. setToFirstExistingChild ()
  51. { return ImplOf (*this).SetToFirstExistingChild ();
  52. }
  53.  
  54. inline IBoolean
  55. ITreeCursor::
  56. setToLastExistingChild ()
  57. { return ImplOf (*this).SetToLastExistingChild ();
  58. }
  59.  
  60. inline IBoolean
  61. ITreeCursor::
  62. setToNextExistingChild ()
  63. { return ImplOf (*this).SetToNextExistingChild ();
  64. }
  65.  
  66. inline IBoolean
  67. ITreeCursor::
  68. setToParent ()
  69. { return ImplOf (*this).SetToParent ();
  70. }
  71.  
  72. inline IBoolean
  73. ITreeCursor::
  74. setToPreviousExistingChild ()
  75. { return ImplOf (*this).SetToPreviousExistingChild ();
  76. }
  77.  
  78. inline IBoolean
  79. ITreeCursor::
  80. setToRoot ()
  81. { return ImplOf (*this).SetToRoot ();
  82. }
  83.  
  84. inline void
  85. ITreeCursor::
  86. operator= (ITreeCursor const& cursor)
  87. { ImplOf (*this).Copy (ImplOf (cursor));
  88. }
  89.  
  90. inline IBoolean
  91. ITreeCursor::
  92. operator== (ITreeCursor const& cursor) const
  93. { return ImplOf (*this).operator== (*cursor.ivImpl);
  94. }
  95.  
  96. inline IBoolean
  97. ITreeCursor::
  98. operator!= (ITreeCursor const& cursor) const
  99. { return ImplOf (*this).operator!= (*cursor.ivImpl);
  100. }
  101.  
  102. // protected members
  103.  
  104. inline
  105. ITreeCursor::
  106. ITreeCursor (Implementation* impl)
  107. : ivImpl (impl)
  108. {
  109. }
  110.  
  111. inline
  112. ITreeCursor::
  113. ITreeCursor (ITreeCursor const& cursor)
  114. : ivImpl (cursor.ImplOf (*this).Clone ())
  115. {
  116. }
  117.  
  118. inline ITreeCursor::Implementation&
  119. ITreeCursor::
  120. ImplOf (ITreeCursor const& cursor)
  121. { return *(Implementation*)cursor.ivImpl;
  122. }
  123.  
  124. // ----------
  125. // IATreeBase
  126. // ----------
  127.  
  128. // protected members
  129.  
  130. inline
  131. IATreeBase::
  132. IATreeBase ()
  133. : IMetaTree ()
  134. {
  135. }
  136.  
  137. inline
  138. IATreeBase::
  139. IATreeBase (IATreeBase const& tree)
  140. : IMetaTree (tree)
  141. {
  142. }
  143.  
  144. inline
  145. IATreeBase::
  146. ~IATreeBase ()
  147. {
  148. }
  149.  
  150. inline ITreeCursorImpl&
  151. IATreeBase::
  152. CrsrImplOf (ITreeCursor& cursor)
  153. { return *cursor.ivImpl;
  154. }
  155.  
  156. inline ITreeCursorImpl const&
  157. IATreeBase::
  158. CrsrImplOf (ITreeCursor const& cursor)
  159. { return *cursor.ivImpl;
  160. }
  161.