home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iikbksb.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  5.9 KB  |  240 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 _IIKBKSB_H
  19. #define _IIKBKSB_H
  20.  
  21. #include <iiakb.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 IKeyBagOnKeySortedBagMngCursorImpl;
  31.  
  32. template <class Base>
  33. class IKeyBagOnKeySortedBagImpl;
  34.  
  35. template <class Base>
  36. class IKeyBagOnKeySortedBagMngCursorImpl : public Base::MngCursor {
  37.  
  38.   typedef  Base::MngCursor Inherited;
  39.  
  40. public:
  41.  
  42.            IKeyBagOnKeySortedBagMngCursorImpl
  43.                             (IKeyBagOnKeySortedBagImpl <Base> const&);
  44.  
  45.           ~IKeyBagOnKeySortedBagMngCursorImpl
  46.                             ();
  47.  
  48. protected:
  49.  
  50. private:
  51.  
  52.  
  53. };
  54.  
  55. template <class Base>
  56. class IBagOnKeyBagImpl;
  57.  
  58. template <class Base>
  59. class IAKeyBagOnKeySortedBagOps;
  60.  
  61. template <class Base>
  62. class IKeyBagOnKeySortedBagImpl : public IAKeyBagImpl {
  63.  
  64.   typedef  IAKeyBagImpl Inherited;
  65.  
  66.   typedef  IKeyBagOnKeySortedBagImpl <Base> Self;
  67.  
  68. public:
  69.  
  70.   typedef  IAKeyBagOnKeySortedBagOps <Base> Ops;
  71.  
  72.   typedef  Base::Cursor Cursor;
  73.  
  74.   typedef  IKeyBagOnKeySortedBagMngCursorImpl <Base> MngCursor;
  75.  
  76.            IKeyBagOnKeySortedBagImpl
  77.                             (Ops&, INumber);
  78.  
  79.            IKeyBagOnKeySortedBagImpl
  80.                             (Ops&,
  81.                              IKeyBagOnKeySortedBagImpl <Base> const&);
  82.  
  83.           ~IKeyBagOnKeySortedBagImpl
  84.                             ();
  85.  
  86.   IBoolean Add              (void const*, ICursorImpl&);
  87.  
  88.   void     AddAllFrom       (IACollectionImpl const&);
  89.  
  90.   IBoolean AddOrReplaceElementWithKey
  91.                             (void const*, ICursorImpl&);
  92.  
  93.   IBoolean AllElementsDo    (IApplFunc, void*);
  94.  
  95.   void*    Any              () const;
  96.  
  97.   IBoolean CheckCursor      (ICursorImpl const&) const;
  98.  
  99.   IBoolean CheckReplacement (ICursorImpl const&, void const* ) const;
  100.  
  101.   char const*
  102.            ClassName        () const;
  103.  
  104.   IACollectionImpl*
  105.            Clone            () const;
  106.  
  107.   IBoolean ContainsAllKeysFrom
  108.                             (IACollectionImpl const&) const;
  109.  
  110.   IBoolean ContainsElementWithKey
  111.                             (void const*) const;
  112.  
  113.   void     Copy             (IACollectionImpl const&);
  114.  
  115.   Cursor*  CreateCursor     () const;
  116.  
  117.   MngCursor*
  118.            CreateMngCursor  () const;
  119.  
  120.   void*    ElementAt        (ICursorImpl const&) const;
  121.  
  122.   void*    ElementWithKey   (void const*) const;
  123.  
  124.   IBoolean IsBounded        () const;
  125.  
  126.   IBoolean IsConsistent     () const;
  127.  
  128.   IBoolean IsEmpty          () const;
  129.  
  130.   IBoolean IsFull           () const;
  131.  
  132.   void*    Key              (void const*) const;
  133.  
  134.   IBoolean LocateElementWithKey
  135.                             (void const*, ICursorImpl&) const;
  136.  
  137.   IBoolean LocateNextElementWithKey
  138.                             (void const*, ICursorImpl&) const;
  139.  
  140.   IBoolean LocateOrAddElementWithKey
  141.                             (void const*, ICursorImpl&);
  142.  
  143.   INumber  NumberOfDifferentKeys
  144.                             () const;
  145.  
  146.   INumber  NumberOfElements () const;
  147.  
  148.   INumber  NumberOfElementsWithKey
  149.                             (void const*) const;
  150.  
  151.   INumber  RemoveAll        ();
  152.  
  153.   INumber  RemoveAll        (IPredFunc, void*);
  154.  
  155.   INumber  RemoveAllElementsWithKey
  156.                             (void const*);
  157.  
  158.   void     RemoveAt         (ICursorImpl&);
  159.  
  160.   IBoolean RemoveElementWithKey
  161.                             (void const*);
  162.  
  163.   void     ReplaceAt        (ICursorImpl const&, void const*);
  164.  
  165.   IBoolean ReplaceElementWithKey
  166.                             (void const*, ICursorImpl&);
  167.  
  168.   IBoolean SetToFirst       (ICursorImpl&) const;
  169.  
  170.   IBoolean SetToNext        (ICursorImpl&) const;
  171.  
  172.   IBoolean SetToNextWithDifferentKey
  173.                             (ICursorImpl&) const;
  174.  
  175.   void     operator=        (IKeyBagOnKeySortedBagImpl <Base> const&);
  176.  
  177.   TStream& operator<<=      (TStream&);
  178.  
  179.   TStream& operator>>=      (TStream&) const;
  180.  
  181. protected:
  182.  
  183.   IBoolean EqualKeys        (void const*, void const*, IArgType) const;
  184.  
  185. private:
  186.  
  187.   static
  188.   char const*
  189.            cvClassName;
  190.  
  191.   Base&    ivBase;
  192.  
  193.   static
  194.   Base&    BaseOf           (IKeyBagOnKeySortedBagImpl <Base> const&);
  195.  
  196.   static
  197.   Ops&     OpsOf            (IKeyBagOnKeySortedBagImpl <Base> const&);
  198.  
  199.   friend
  200.   class    IKeyBagOnKeySortedBagMngCursorImpl <Base>;
  201.  
  202.   friend
  203.   class    IKeyBagOnKeySortedBagImpl <Base>;
  204.  
  205.   friend
  206.   class    IBagOnKeyBagImpl <Self>;
  207.  
  208.  
  209. };
  210.  
  211. template <class Base>
  212. class IAKeyBagOnKeySortedBagOps {
  213. public:
  214.  
  215.   virtual ~IAKeyBagOnKeySortedBagOps
  216.                             ();
  217.  
  218.   virtual
  219.   IACollectionImpl*
  220.            Clone            () const = 0;
  221.  
  222.   virtual  operator Base&   () = 0;
  223.  
  224. protected:
  225.  
  226. private:
  227.  
  228.  
  229. };
  230.  
  231. #pragma SOMAsDefault (pop)
  232.  
  233. #include <iikbksb.inl>
  234.  
  235.  
  236. #pragma info (restore)
  237. #pragma pack ()
  238.  
  239. #endif
  240.