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