home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iakss.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  3.1 KB  |  99 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. // IAKeySortedSet
  20. // ---
  21.  
  22. template <class Element, class Key>
  23. inline
  24. IAKeySortedSet <Element, Key>::
  25. IAKeySortedSet (INotifier& notifier)
  26. { SetImpl ((Implementation*)¬ifier);
  27. }
  28.  
  29. template <class Element, class Key>
  30. inline
  31. IAKeySortedSet <Element, Key>::
  32. ~IAKeySortedSet ()
  33. {
  34. }
  35.  
  36. template <class Element, class Key>
  37. inline long
  38. IAKeySortedSet <Element, Key>::
  39. compare (IAKeySortedSet <Element, Key> const& collection,
  40.          long (*compFunc) (Element const&, Element const&)) const
  41. { return ImplOf (*this).
  42.     Compare (ImplOf (collection), (ICompFunc)compFunc, 0);
  43. }
  44.  
  45. // protected members
  46.  
  47. template <class Element, class Key>
  48. inline
  49. IAKeySortedSet <Element, Key>::
  50. IAKeySortedSet ()
  51. {
  52. }
  53.  
  54. template <class Element, class Key>
  55. inline
  56. IAKeySortedSet <Element, Key>::
  57. IAKeySortedSet (IAKeySortedSet <Element, Key> const& collection)
  58. : Inherited (collection)
  59. {
  60. }
  61.  
  62. template <class Element, class Key>
  63. inline INumber
  64. IAKeySortedSet <Element, Key>::
  65. numberOfDifferentKeys () const
  66. { return IAKeyCollection <Element, Key>::numberOfDifferentKeys ();
  67. }
  68.  
  69. template <class Element, class Key>
  70. inline INumber
  71. IAKeySortedSet <Element, Key>::
  72. numberOfElementsWithKey (Key const& key) const
  73. { return IAKeyCollection <Element, Key>::numberOfElementsWithKey (key);
  74. }
  75.  
  76. template <class Element, class Key>
  77. inline INumber
  78. IAKeySortedSet <Element, Key>::
  79. removeAllElementsWithKey (Key const& key)
  80. { return IAKeyCollection <Element, Key>::removeAllElementsWithKey (key);
  81. }
  82.  
  83. template <class Element, class Key>
  84. inline IBoolean
  85. IAKeySortedSet <Element, Key>::
  86. setToNextWithDifferentKey (ICursor& cursor) const
  87. { return
  88.     IAKeyCollection <Element, Key>::setToNextWithDifferentKey (cursor);
  89. }
  90.  
  91. // private members
  92.  
  93. template <class Element, class Key>
  94. inline IAKeySortedSet <Element, Key>::Implementation&
  95. IAKeySortedSet <Element, Key>::
  96. ImplOf (IAKeySortedSet <Element, Key> const& collection)
  97. { return *(Implementation*)collection.ivImpl;
  98. }
  99.