home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iicmwt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  12.2 KB  |  405 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. // ICMultiwayTreeImpl
  25. // ------------------
  26.  
  27. // public members
  28.  
  29. template <class CInherited>
  30. ICMultiwayTreeImpl <CInherited>::
  31. ICMultiwayTreeImpl (Ops& ops)
  32. : CInherited (ops)
  33. {
  34. }
  35.  
  36. template <class CInherited>
  37. ICMultiwayTreeImpl <CInherited>::
  38. ICMultiwayTreeImpl
  39.   (Ops& ops, ICMultiwayTreeImpl <CInherited> const& tree)
  40. : CInherited (ops, tree)
  41. {
  42. }
  43.  
  44. template <class CInherited>
  45. void
  46. ICMultiwayTreeImpl <CInherited>::
  47. AddAsChild (ITreeCursorImpl const& cursor,
  48.             IPosition position, void const* element)
  49. { ICHECK_IsFor     (ClassName (), "AddAsChild")
  50.   ICHECK_IsValid   (ClassName (), "AddAsChild")
  51. #if defined (IALL_CHECKS)
  52.   ICHECK_Cursor    (ClassName (), "AddAsChild")
  53. #endif
  54.   ICHECK_Position3 (ClassName (), "AddAsChild")
  55.   ICHECK_Child     (ClassName (), "AddAsChild")
  56.  
  57.   CInherited::AddAsChild (cursor, position, element);
  58. }
  59.  
  60. template <class CInherited>
  61. void
  62. ICMultiwayTreeImpl <CInherited>::
  63. AddAsRoot (void const* element)
  64. { ICHECK_Root (ClassName (), "AddAsRoot")
  65.  
  66.   CInherited::AddAsRoot (element);
  67. }
  68.  
  69. template <class CInherited>
  70. IBoolean
  71. ICMultiwayTreeImpl <CInherited>::
  72. AllSubtreeElementsDo (ITreeCursorImpl const& cursor, IApplFunc applFunc,
  73.                       ITreeIterationOrder order, void* addArg)
  74. { ICHECK_IsFor   (ClassName (), "AllSubtreeElementsDo")
  75.   ICHECK_IsValid (ClassName (), "AllSubtreeElementsDo")
  76. #if defined (IALL_CHECKS)
  77.   ICHECK_Cursor  (ClassName (), "AllSubtreeElementsDo")
  78. #endif
  79.  
  80.   return CInherited::AllSubtreeElementsDo
  81.     (cursor, applFunc, order, addArg);
  82. }
  83.  
  84. template <class CInherited>
  85. void
  86. ICMultiwayTreeImpl <CInherited>::
  87. AttachAsChild (ITreeCursorImpl const& cursor, IPosition position,
  88.                IMultiwayTreeImpl& tree)
  89. { ICHECK_IsFor     (ClassName (), "AttachAsChild")
  90.   ICHECK_IsValid   (ClassName (), "AttachAsChild")
  91.   ICHECK_Position3 (ClassName (), "AttachAsChild")
  92.   ICHECK_Cycle     (ClassName (), "AttachAsChild")
  93. #if defined (IALL_CHECKS)
  94.   ICHECK_Cursor    (ClassName (), "AttachAsChild")
  95. #endif
  96.   ICHECK_Child     (ClassName (), "AttachAsChild")
  97.  
  98.   CInherited::AttachAsChild (cursor, position, tree);
  99. }
  100.  
  101. template <class CInherited>
  102. void
  103. ICMultiwayTreeImpl <CInherited>::
  104. AttachAsRoot (IMultiwayTreeImpl& tree)
  105. { ICHECK_Root (ClassName (), "AttachAsRoot")
  106.  
  107.   CInherited::AttachAsRoot (tree);
  108. }
  109.  
  110. template <class CInherited>
  111. void
  112. ICMultiwayTreeImpl <CInherited>::
  113. AttachSubtreeAsChild (ITreeCursorImpl const& cursor,
  114.                       IPosition position,
  115.                       IMultiwayTreeImpl& tree,
  116.                       ITreeCursorImpl const& thatCursor)
  117. { ICHECK_IsFor       (ClassName (), "AttachSubtreeAsChild")
  118.   ICHECK_IsForThat   (ClassName (), "AttachSubtreeAsChild")
  119.   ICHECK_IsValid     (ClassName (), "AttachSubtreeAsChild")
  120.   ICHECK_IsThatValid (ClassName (), "AttachSubtreeAsChild")
  121.   ICHECK_Position3   (ClassName (), "AttachSubtreeAsChild")
  122.   ICHECK_Cycle2      (ClassName (), "AttachSubtreeAsChild")
  123. #if defined (IALL_CHECKS)
  124.   ICHECK_Cursor      (ClassName (), "AttachSubtreeAsChild")
  125.   ICHECK_ThatCursor  (ClassName (), "AttachSubtreeAsChild")
  126. #endif
  127.   ICHECK_Child       (ClassName (), "AttachSubtreeAsChild")
  128.  
  129.   CInherited::AttachSubtreeAsChild (cursor, position, tree, thatCursor);
  130. }
  131.  
  132. template <class CInherited>
  133. void
  134. ICMultiwayTreeImpl <CInherited>::
  135. AttachSubtreeAsRoot (IMultiwayTreeImpl& tree,
  136.                      ITreeCursorImpl const& thatCursor)
  137. { ICHECK_IsForThat   (ClassName (), "AttachSubtreeAsRoot")
  138.   ICHECK_IsThatValid (ClassName (), "AttachSubtreeAsRoot")
  139.   ICHECK_Root        (ClassName (), "AttachSubtreeAsRoot")
  140. #if defined (IALL_CHECKS)
  141.   ICHECK_ThatCursor  (ClassName (), "AttachSubtreeAsRoot")
  142. #endif
  143.  
  144.   CInherited::AttachSubtreeAsRoot (tree, thatCursor);
  145. }
  146.  
  147. template <class CInherited>
  148. IPosition
  149. ICMultiwayTreeImpl <CInherited>::
  150. ChildPositionAt (ITreeCursorImpl const& cursor) const
  151. { ICHECK_IsFor   (ClassName (), "ChildPositionAt")
  152.   ICHECK_IsValid (ClassName (), "ChildPositionAt")
  153. #if defined (IALL_CHECKS)
  154.   ICHECK_Cursor  (ClassName (), "ChildPositionAt")
  155. #endif
  156.  
  157.   return CInherited::ChildPositionAt (cursor);
  158. }
  159.  
  160. template <class CInherited>
  161. void
  162. ICMultiwayTreeImpl <CInherited>::
  163. CopySubtree (IMultiwayTreeImpl const& tree,
  164.              ITreeCursorImpl const& thatCursor)
  165. { ICHECK_IsForThat   (ClassName (), "CopySubtree")
  166.   ICHECK_IsThatValid (ClassName (), "CopySubtree")
  167. #if defined (IALL_CHECKS)
  168.   ICHECK_ThatCursor  (ClassName (), "CopySubtree")
  169. #endif
  170.  
  171.   CInherited::CopySubtree (tree, thatCursor);
  172. }
  173.  
  174. template <class CInherited>
  175. void*
  176. ICMultiwayTreeImpl <CInherited>::
  177. ElementAt (ITreeCursorImpl const& cursor) const
  178. { ICHECK_IsFor   (ClassName (), "ElementAt")
  179.   ICHECK_IsValid (ClassName (), "ElementAt")
  180. #if defined (IALL_CHECKS)
  181.   ICHECK_Cursor  (ClassName (), "ElementAt")
  182. #endif
  183.  
  184.   return CInherited::ElementAt (cursor);
  185. }
  186.  
  187. template <class CInherited>
  188. IBoolean
  189. ICMultiwayTreeImpl <CInherited>::
  190. HasChild (IPosition position, ITreeCursorImpl const& cursor) const
  191. { ICHECK_IsFor     (ClassName (), "HasChild")
  192.   ICHECK_IsValid   (ClassName (), "HasChild")
  193. #if defined (IALL_CHECKS)
  194.   ICHECK_Cursor    (ClassName (), "HasChild")
  195. #endif
  196.   ICHECK_Position3 (ClassName (), "HasChild")
  197.  
  198.   return CInherited::HasChild (position, cursor);
  199. }
  200.  
  201. template <class CInherited>
  202. IBoolean
  203. ICMultiwayTreeImpl <CInherited>::
  204. IsLeaf (ITreeCursorImpl const& cursor) const
  205. { ICHECK_IsFor   (ClassName (), "IsLeaf")
  206.   ICHECK_IsValid (ClassName (), "IsLeaf")
  207. #if defined (IALL_CHECKS)
  208.   ICHECK_Cursor  (ClassName (), "IsLeaf")
  209. #endif
  210.  
  211.   return CInherited::IsLeaf (cursor);
  212. }
  213.  
  214. template <class CInherited>
  215. IBoolean
  216. ICMultiwayTreeImpl <CInherited>::
  217. IsRoot (ITreeCursorImpl const& cursor) const
  218. { ICHECK_IsFor   (ClassName (), "IsRoot")
  219.   ICHECK_IsValid (ClassName (), "IsRoot")
  220. #if defined (IALL_CHECKS)
  221.   ICHECK_Cursor  (ClassName (), "IsRoot")
  222. #endif
  223.  
  224.   return CInherited::IsRoot (cursor);
  225. }
  226.  
  227. template <class CInherited>
  228. INumber
  229. ICMultiwayTreeImpl <CInherited>::
  230. NumberOfSubtreeElements (ITreeCursorImpl const& cursor) const
  231. { ICHECK_IsFor   (ClassName (), "NumberOfSubtreeElements")
  232.   ICHECK_IsValid (ClassName (), "NumberOfSubtreeElements")
  233. #if defined (IALL_CHECKS)
  234.   ICHECK_Cursor  (ClassName (), "NumberOfSubtreeElements")
  235. #endif
  236.  
  237.   return CInherited::NumberOfSubtreeElements (cursor);
  238. }
  239.  
  240. template <class CInherited>
  241. INumber
  242. ICMultiwayTreeImpl <CInherited>::
  243. NumberOfSubtreeLeaves (ITreeCursorImpl const& cursor) const
  244. { ICHECK_IsFor   (ClassName (), "NumberOfSubtreeLeaves")
  245.   ICHECK_IsValid (ClassName (), "NumberOfSubtreeLeaves")
  246. #if defined (IALL_CHECKS)
  247.   ICHECK_Cursor  (ClassName (), "NumberOfSubtreeLeaves")
  248. #endif
  249.  
  250.   return CInherited::NumberOfSubtreeLeaves (cursor);
  251. }
  252.  
  253. template <class CInherited>
  254. INumber
  255. ICMultiwayTreeImpl <CInherited>::
  256. RemoveSubtree (ITreeCursorImpl& cursor)
  257. { ICHECK_IsFor   (ClassName (), "RemoveSubtree")
  258.   ICHECK_IsValid (ClassName (), "RemoveSubtree")
  259. #if defined (IALL_CHECKS)
  260.   ICHECK_Cursor  (ClassName (), "RemoveSubtree")
  261. #endif
  262.  
  263.   return CInherited::RemoveSubtree (cursor);
  264. }
  265.  
  266. template <class CInherited>
  267. void
  268. ICMultiwayTreeImpl <CInherited>::
  269. ReplaceAt (ITreeCursorImpl const& cursor, void const* element)
  270. { ICHECK_IsFor   (ClassName (), "ReplaceAt")
  271.   ICHECK_IsValid (ClassName (), "ReplaceAt")
  272. #if defined (IALL_CHECKS)
  273.   ICHECK_Cursor  (ClassName (), "ReplaceAt")
  274. #endif
  275.  
  276.   CInherited::ReplaceAt (cursor, element);
  277. }
  278.  
  279. template <class CInherited>
  280. IBoolean
  281. ICMultiwayTreeImpl <CInherited>::
  282. SetToChild (IPosition position, ITreeCursorImpl& cursor) const
  283. { ICHECK_IsFor     (ClassName (), "SetToChild")
  284.   ICHECK_IsValid   (ClassName (), "SetToChild")
  285. #if defined (IALL_CHECKS)
  286.   ICHECK_Cursor    (ClassName (), "SetToChild")
  287. #endif
  288.   ICHECK_Position3 (ClassName (), "SetToChild")
  289.  
  290.   return CInherited::SetToChild (position, cursor);
  291. }
  292.  
  293. template <class CInherited>
  294. IBoolean
  295. ICMultiwayTreeImpl <CInherited>::
  296. SetToFirst (ITreeCursorImpl& cursor, ITreeIterationOrder order) const
  297. { ICHECK_IsFor (ClassName (), "SetToFirst")
  298.  
  299.   return CInherited::SetToFirst (cursor, order);
  300. }
  301.  
  302. template <class CInherited>
  303. IBoolean
  304. ICMultiwayTreeImpl <CInherited>::
  305. SetToFirstExistingChild (ITreeCursorImpl& cursor) const
  306. { ICHECK_IsFor   (ClassName (), "SetToFirstExistingChild")
  307.   ICHECK_IsValid (ClassName (), "SetToFirstExistingChild")
  308. #if defined (IALL_CHECKS)
  309.   ICHECK_Cursor  (ClassName (), "SetToFirstExistingChild")
  310. #endif
  311.  
  312.   return CInherited::SetToFirstExistingChild (cursor);
  313. }
  314.  
  315. template <class CInherited>
  316. IBoolean
  317. ICMultiwayTreeImpl <CInherited>::
  318. SetToLast (ITreeCursorImpl& cursor, ITreeIterationOrder order) const
  319. { ICHECK_IsFor (ClassName (), "SetToLast")
  320.  
  321.   return CInherited::SetToLast (cursor, order);
  322. }
  323.  
  324. template <class CInherited>
  325. IBoolean
  326. ICMultiwayTreeImpl <CInherited>::
  327. SetToLastExistingChild (ITreeCursorImpl& cursor) const
  328. { ICHECK_IsFor   (ClassName (), "SetToLastExistingChild")
  329.   ICHECK_IsValid (ClassName (), "SetToLastExistingChild")
  330. #if defined (IALL_CHECKS)
  331.   ICHECK_Cursor  (ClassName (), "SetToLastExistingChild")
  332. #endif
  333.  
  334.   return CInherited::SetToLastExistingChild (cursor);
  335. }
  336.  
  337. template <class CInherited>
  338. IBoolean
  339. ICMultiwayTreeImpl <CInherited>::
  340. SetToNext (ITreeCursorImpl& cursor, ITreeIterationOrder order) const
  341. { ICHECK_IsFor (ClassName (), "SetToNext")
  342.  
  343.   return CInherited::SetToNext (cursor, order);
  344. }
  345.  
  346. template <class CInherited>
  347. IBoolean
  348. ICMultiwayTreeImpl <CInherited>::
  349. SetToNextExistingChild (ITreeCursorImpl& cursor) const
  350. { ICHECK_IsFor   (ClassName (), "SetToNextExistingChild")
  351.   ICHECK_IsValid (ClassName (), "SetToNextExistingChild")
  352. #if defined (IALL_CHECKS)
  353.   ICHECK_Cursor  (ClassName (), "SetToNextExistingChild")
  354. #endif
  355.  
  356.   return CInherited::SetToNextExistingChild (cursor);
  357. }
  358.  
  359. template <class CInherited>
  360. IBoolean
  361. ICMultiwayTreeImpl <CInherited>::
  362. SetToParent (ITreeCursorImpl& cursor) const
  363. { ICHECK_IsFor   (ClassName (), "SetToParent")
  364.   ICHECK_IsValid (ClassName (), "SetToParent")
  365. #if defined (IALL_CHECKS)
  366.   ICHECK_Cursor  (ClassName (), "SetToParent")
  367. #endif
  368.  
  369.   return CInherited::SetToParent (cursor);
  370. }
  371.  
  372. template <class CInherited>
  373. IBoolean
  374. ICMultiwayTreeImpl <CInherited>::
  375. SetToPrevious (ITreeCursorImpl& cursor, ITreeIterationOrder order) const
  376. { ICHECK_IsFor (ClassName (), "SetToPrevious")
  377.  
  378.   return CInherited::SetToPrevious (cursor, order);
  379. }
  380.  
  381. template <class CInherited>
  382. IBoolean
  383. ICMultiwayTreeImpl <CInherited>::
  384. SetToPreviousExistingChild (ITreeCursorImpl& cursor) const
  385. { ICHECK_IsFor   (ClassName (), "SetToPreviousExistingChild")
  386.   ICHECK_IsValid (ClassName (), "SetToPreviousExistingChild")
  387. #if defined (IALL_CHECKS)
  388.   ICHECK_Cursor  (ClassName (), "SetToPreviousExistingChild")
  389. #endif
  390.  
  391.   return CInherited::SetToPreviousExistingChild (cursor);
  392. }
  393.  
  394. template <class CInherited>
  395. IBoolean
  396. ICMultiwayTreeImpl <CInherited>::
  397. SetToRoot (ITreeCursorImpl& cursor) const
  398. { ICHECK_IsFor (ClassName (), "SetToRoot")
  399.  
  400.   return CInherited::SetToRoot (cursor);
  401. }
  402.  
  403. #pragma info (restore)
  404. #pragma pack ()
  405.