home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iamwt.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  4.0 KB  |  115 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. // IAMultiwayTree
  20. // --------------
  21.  
  22. template <INumber numOfChildren, class Element>
  23. inline void
  24. IAMultiwayTree <numOfChildren, Element>::
  25. attachAsChild (ITreeCursor const& cursor, IPosition position,
  26.                IAMultiwayTree <numOfChildren, Element> const& tree)
  27. { ImplOf (*this).
  28.     AttachAsChild (CrsrImplOf (cursor), position, ImplOf (tree));
  29. }
  30.  
  31. template <INumber numOfChildren, class Element>
  32. inline void
  33. IAMultiwayTree <numOfChildren, Element>::
  34. attachAsRoot (IAMultiwayTree <numOfChildren, Element> const& tree)
  35. { ImplOf (*this).AttachAsRoot (ImplOf (tree));
  36. }
  37.  
  38. template <INumber numOfChildren, class Element>
  39. inline void
  40. IAMultiwayTree <numOfChildren, Element>::
  41. attachSubtreeAsChild
  42.   (ITreeCursor const& cursor, IPosition position,
  43.    IAMultiwayTree <numOfChildren, Element> const& tree,
  44.    ITreeCursor const& thatCursor)
  45. { ImplOf (*this).
  46.     AttachSubtreeAsChild (CrsrImplOf (cursor), position,
  47.                           ImplOf (tree), CrsrImplOf (thatCursor));
  48. }
  49.  
  50. template <INumber numOfChildren, class Element>
  51. inline void
  52. IAMultiwayTree <numOfChildren, Element>::
  53. attachSubtreeAsRoot
  54.   (IAMultiwayTree <numOfChildren, Element> const& tree,
  55.    ITreeCursor const& thatCursor)
  56. { ImplOf (*this).
  57.     AttachSubtreeAsRoot (ImplOf (tree), CrsrImplOf (thatCursor));
  58. }
  59.  
  60. template <INumber numOfChildren, class Element>
  61. inline void
  62. IAMultiwayTree <numOfChildren, Element>::
  63. copy (IAMultiwayTree <numOfChildren, Element> const& tree)
  64. { ImplOf (*this).Copy (ImplOf (tree));
  65. }
  66.  
  67. template <INumber numOfChildren, class Element>
  68. inline void
  69. IAMultiwayTree <numOfChildren, Element>::
  70. copySubtree (IAMultiwayTree <numOfChildren, Element> const& tree,
  71.              ITreeCursor const& thatCursor)
  72. { ImplOf (*this).CopySubtree (ImplOf (tree), CrsrImplOf (thatCursor));
  73. }
  74.  
  75. template <INumber numOfChildren, class Element>
  76. inline IBoolean
  77. IAMultiwayTree <numOfChildren, Element>::
  78. hasChild (IPosition position, ITreeCursor const& cursor) const
  79. { return ImplOf (*this).HasChild (position, CrsrImplOf (cursor));
  80. }
  81.  
  82. template <INumber numOfChildren, class Element>
  83. inline INumber
  84. IAMultiwayTree <numOfChildren, Element>::
  85. numberOfChildren () const
  86. { return ImplOf (*this).NumberOfChildren ();
  87. }
  88.  
  89. // protected members
  90.  
  91. template <INumber numOfChildren, class Element>
  92. inline
  93. IAMultiwayTree <numOfChildren, Element>::
  94. IAMultiwayTree ()
  95. : IATree <Element> ()
  96. {
  97. }
  98.  
  99. template <INumber numOfChildren, class Element>
  100. inline
  101. IAMultiwayTree <numOfChildren, Element>::
  102. IAMultiwayTree (IAMultiwayTree <numOfChildren, Element> const& tree)
  103. : IATree <Element> (tree)
  104. {
  105. }
  106.  
  107. // private members
  108.  
  109. template <INumber numOfChildren, class Element>
  110. inline IAMultiwayTree <numOfChildren, Element>::Implementation&
  111. IAMultiwayTree <numOfChildren, Element>::
  112. ImplOf (IAMultiwayTree <numOfChildren, Element> const& tree)
  113. { return *(Implementation*)tree.ivImpl;
  114. }
  115.