home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iisbksb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  6.3 KB  |  252 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. #ifndef _IISBKSB_H
  19. #define _IISBKSB_H
  20.  
  21. #include <iiasb.h>
  22.  
  23.  
  24. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  25. #pragma pack (4)
  26.  
  27. #pragma SOMAsDefault (off)
  28.  
  29. template <class Base>
  30. class ISortedBagOnKeySortedBagMngCursorImpl;
  31.  
  32. template <class Base>
  33. class ISortedBagOnKeySortedBagImpl;
  34.  
  35. template <class Base>
  36. class ISortedBagOnKeySortedBagMngCursorImpl : public Base::MngCursor {
  37.  
  38.   typedef  Base::MngCursor Inherited;
  39.  
  40. public:
  41.  
  42.            ISortedBagOnKeySortedBagMngCursorImpl
  43.                             (ISortedBagOnKeySortedBagImpl <Base> const&);
  44.  
  45.  
  46.           ~ISortedBagOnKeySortedBagMngCursorImpl
  47.                             ();
  48.  
  49. protected:
  50.  
  51. private:
  52.  
  53.  
  54. };
  55.  
  56. template <class Base>
  57. class IASortedBagOnKeySortedBagOps;
  58.  
  59. template <class Base>
  60. class ISortedBagOnKeySortedBagImpl : public IASortedBagImpl {
  61.  
  62.   typedef  IASortedBagImpl Inherited;
  63.  
  64.   typedef  ISortedBagOnKeySortedBagImpl <Base> Self;
  65.  
  66. public:
  67.  
  68.   typedef  IASortedBagOnKeySortedBagOps <Base> Ops;
  69.  
  70.   typedef  Base::Cursor Cursor;
  71.  
  72.   typedef  ISortedBagOnKeySortedBagMngCursorImpl <Base> MngCursor;
  73.  
  74.            ISortedBagOnKeySortedBagImpl
  75.                             (Ops&, INumber);
  76.  
  77.            ISortedBagOnKeySortedBagImpl
  78.                             (Ops&, ISortedBagOnKeySortedBagImpl
  79.                               <Base> const&);
  80.  
  81.           ~ISortedBagOnKeySortedBagImpl
  82.                             ();
  83.  
  84.   IBoolean Add              (void const*, ICursorImpl&);
  85.  
  86.   void     AddAllFrom       (IACollectionImpl const&);
  87.  
  88.   IBoolean AllElementsDo    (IApplFunc, void*);
  89.  
  90.   void*    Any              () const;
  91.  
  92.   IBoolean CheckCursor      (ICursorImpl const&) const;
  93.  
  94.   IBoolean CheckReplacement (ICursorImpl const&, void const*) const;
  95.  
  96.   char const*
  97.            ClassName        () const;
  98.  
  99.   IACollectionImpl*
  100.            Clone            () const;
  101.  
  102.   IBoolean Contains         (void const*) const;
  103.  
  104.   IBoolean ContainsAllFrom  (IACollectionImpl const&) const;
  105.  
  106.   void     Copy             (IACollectionImpl const&);
  107.  
  108.   Cursor*  CreateCursor     () const;
  109.  
  110.   MngCursor*
  111.            CreateMngCursor  () const;
  112.  
  113.   void*    ElementAt        (ICursorImpl const&) const;
  114.  
  115.   void*    ElementAtPosition
  116.                             (IPosition) const;
  117.  
  118.   void*    First            () const;
  119.  
  120.   IBoolean IsBounded        () const;
  121.  
  122.   IBoolean IsConsistent     () const;
  123.  
  124.   IBoolean IsEmpty          () const;
  125.  
  126.   IBoolean IsFirstAt        (ICursorImpl const&) const;
  127.  
  128.   IBoolean IsFull           () const;
  129.  
  130.   IBoolean IsLastAt         (ICursorImpl const&) const;
  131.  
  132.   void*    Last             () const;
  133.  
  134.   IBoolean Locate           (void const*, ICursorImpl&) const;
  135.  
  136.   IBoolean LocateNext       (void const*, ICursorImpl&) const;
  137.  
  138.   IBoolean LocateOrAdd      (void const*, ICursorImpl&);
  139.  
  140.   INumber  NumberOfDifferentElements
  141.                             () const;
  142.  
  143.   INumber  NumberOfElements () const;
  144.  
  145.   INumber  NumberOfOccurrences
  146.                             (void const*) const;
  147.  
  148.   IPosition
  149.            PositionAt       (ICursorImpl const&) const;
  150.  
  151.   IBoolean Remove           (void const*);
  152.  
  153.   INumber  RemoveAll        ();
  154.  
  155.   INumber  RemoveAll        (IPredFunc, void*);
  156.  
  157.   INumber  RemoveAllOccurrences
  158.                             (void const*);
  159.  
  160.   void     RemoveAt         (ICursorImpl&);
  161.  
  162.   void     RemoveAtPosition (IPosition);
  163.  
  164.   void     RemoveFirst      ();
  165.  
  166.   void     RemoveLast       ();
  167.  
  168.   void     ReplaceAt        (ICursorImpl const&, void const*);
  169.  
  170.   void     ReplaceAtPosition
  171.                             (IPosition, void const*);
  172.  
  173.   IBoolean SetToFirst       (ICursorImpl&) const;
  174.  
  175.   IBoolean SetToLast        (ICursorImpl&) const;
  176.  
  177.   IBoolean SetToNext        (ICursorImpl&) const;
  178.  
  179.   IBoolean SetToNextDifferentElement
  180.                             (ICursorImpl&) const;
  181.  
  182.   void     SetToPosition    (IPosition, ICursorImpl&) const;
  183.  
  184.   IBoolean SetToPrevious    (ICursorImpl&) const;
  185.  
  186.   void     operator=        (ISortedBagOnKeySortedBagImpl
  187.                               <Base> const&);
  188.  
  189.   IBoolean operator==       (IASortedBagImpl const&) const;
  190.  
  191.   TStream& operator<<=      (TStream&);
  192.  
  193.   TStream& operator>>=      (TStream&) const;
  194.  
  195. protected:
  196.  
  197. private:
  198.  
  199.   static
  200.   char const*
  201.            cvClassName;
  202.  
  203.   Base&    ivBase;
  204.  
  205.   static
  206.   Base&    BaseOf           (ISortedBagOnKeySortedBagImpl
  207.                               <Base> const&);
  208.  
  209.   static
  210.   Ops&     OpsOf            (ISortedBagOnKeySortedBagImpl
  211.                               <Base> const&);
  212.  
  213.   friend
  214.   class    ISortedBagOnKeySortedBagMngCursorImpl <Base>;
  215.  
  216.  
  217. };
  218.  
  219. template <class Base>
  220. class IASortedBagOnKeySortedBagOps {
  221. public:
  222.  
  223.   virtual ~IASortedBagOnKeySortedBagOps
  224.                             ();
  225.  
  226.   virtual
  227.   IACollectionImpl*
  228.            Clone            () const = 0;
  229.  
  230.   virtual  operator Base&   () = 0;
  231.  
  232. protected:
  233.  
  234.   // for backward compatibility
  235.            IASortedBagOnKeySortedBagOps
  236.                             (IBoolean);
  237.  
  238. private:
  239.  
  240.  
  241. };
  242.  
  243. #pragma SOMAsDefault (pop)
  244.  
  245. #include <iisbksb.inl>
  246.  
  247.  
  248. #pragma info (restore)
  249. #pragma pack ()
  250.  
  251. #endif
  252.