home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iikssseq.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  7.0 KB  |  284 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 _IIKSSSEQ_H
  19. #define _IIKSSSEQ_H
  20.  
  21. #include <iiakss.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 IKeySortedSetOnSequenceMngCursorImpl;
  31.  
  32. template <class Base>
  33. class IKeySortedSetOnSequenceImpl;
  34.  
  35. template <class Base>
  36. class IKeySortedSetOnSequenceMngCursorImpl : public Base::MngCursor {
  37.  
  38.   typedef  Base::MngCursor Inherited;
  39.  
  40. public:
  41.  
  42.            IKeySortedSetOnSequenceMngCursorImpl
  43.                             (IKeySortedSetOnSequenceImpl <Base> const&);
  44.  
  45.           ~IKeySortedSetOnSequenceMngCursorImpl
  46.                             ();
  47.  
  48. protected:
  49.  
  50. private:
  51.  
  52.  
  53. };
  54.  
  55. template <class Base>
  56. class IKeySetOnKeySortedSetImpl;
  57.  
  58. template <class Base>
  59. class ISortedBagOnKeySortedSetImpl;
  60.  
  61. template <class Base>
  62. class ISortedMapOnKeySortedSetImpl;
  63.  
  64. template <class Base>
  65. class IAKeySortedSetOnSequenceOps;
  66.  
  67. template <class Base>
  68. class IKeySortedSetOnSequenceImpl : public IAKeySortedSetImpl {
  69.  
  70.   typedef  IAKeySortedSetImpl Inherited;
  71.  
  72.   typedef  IKeySortedSetOnSequenceImpl <Base> Self;
  73.  
  74. public:
  75.  
  76.   typedef  IAKeySortedSetOnSequenceOps <Base> Ops;
  77.  
  78.   typedef  Base::Cursor Cursor;
  79.  
  80.   typedef  IKeySortedSetOnSequenceMngCursorImpl <Base> MngCursor;
  81.  
  82.            IKeySortedSetOnSequenceImpl
  83.                             (Ops&, INumber);
  84.  
  85.            IKeySortedSetOnSequenceImpl
  86.                             (Ops&,
  87.                              IKeySortedSetOnSequenceImpl <Base> const&);
  88.  
  89.           ~IKeySortedSetOnSequenceImpl
  90.                             ();
  91.  
  92.   IBoolean Add              (void const*, ICursorImpl&);
  93.  
  94.   IBoolean AddOrReplaceElementWithKey
  95.                             (void const*, ICursorImpl&);
  96.  
  97.   IBoolean AllElementsDo    (IApplFunc, void*);
  98.  
  99.   void*    Any              () const;
  100.  
  101.   IBoolean CheckCursor      (ICursorImpl const&) const;
  102.  
  103.   IBoolean CheckReplacement (ICursorImpl const&, void const*) const;
  104.  
  105.   char const*
  106.            ClassName        () const;
  107.  
  108.   IACollectionImpl*
  109.            Clone            () const;
  110.  
  111.   IBoolean ContainsAllKeysFrom
  112.                             (IACollectionImpl const&) const;
  113.  
  114.   IBoolean ContainsElementWithKey
  115.                             (void const*) const;
  116.  
  117.   void     Copy             (IACollectionImpl const&);
  118.  
  119.   Cursor*  CreateCursor     () const;
  120.  
  121.   MngCursor*
  122.            CreateMngCursor  () const;
  123.  
  124.   void*    ElementAt        (ICursorImpl const&) const;
  125.  
  126.   void*    ElementAtPosition
  127.                             (IPosition) const;
  128.  
  129.   void*    ElementWithKey   (void const*) const;
  130.  
  131.   void*    First            () const;
  132.  
  133.   IBoolean IsBounded        () const;
  134.  
  135.   IBoolean IsConsistent     () const;
  136.  
  137.   IBoolean IsEmpty          () const;
  138.  
  139.   IBoolean IsFirstAt        (ICursorImpl const&) const;
  140.  
  141.   IBoolean IsFull           () const;
  142.  
  143.   IBoolean IsLastAt         (ICursorImpl const&) const;
  144.  
  145.   void*    Key              (void const*) const;
  146.  
  147.   void*    Last             () const;
  148.  
  149.   IBoolean LocateElementWithKey
  150.                             (void const*, ICursorImpl&) const;
  151.  
  152.   IBoolean LocateNextElementWithKey
  153.                             (void const*, ICursorImpl&) const;
  154.  
  155.   IBoolean LocateOrAddElementWithKey
  156.                             (void const*, ICursorImpl&);
  157.  
  158.   INumber  NumberOfElements () const;
  159.  
  160.   IPosition
  161.            PositionAt       (ICursorImpl const&) const;
  162.  
  163.   INumber  RemoveAll        ();
  164.  
  165.   INumber  RemoveAll        (IPredFunc, void*);
  166.  
  167.   void     RemoveAt         (ICursorImpl&);
  168.  
  169.   void     RemoveAtPosition (IPosition);
  170.  
  171.   IBoolean RemoveElementWithKey
  172.                             (void const*);
  173.  
  174.   void     RemoveFirst      ();
  175.  
  176.   void     RemoveLast       ();
  177.  
  178.   void     ReplaceAt        (ICursorImpl const&, void const*);
  179.  
  180.   void     ReplaceAtPosition
  181.                             (IPosition position, void const*);
  182.  
  183.   IBoolean ReplaceElementWithKey
  184.                             (void const*, ICursorImpl&);
  185.  
  186.   IBoolean SetToFirst       (ICursorImpl&) const;
  187.  
  188.   IBoolean SetToLast        (ICursorImpl&) const;
  189.  
  190.   IBoolean SetToNext        (ICursorImpl&) const;
  191.  
  192.   void     SetToPosition    (IPosition, ICursorImpl&) const;
  193.  
  194.   IBoolean SetToPrevious    (ICursorImpl&) const;
  195.  
  196.   void     operator=        (IKeySortedSetOnSequenceImpl <Base> const&);
  197.  
  198.   TStream& operator<<=      (TStream&);
  199.  
  200.   TStream& operator>>=      (TStream&) const;
  201.  
  202. protected:
  203.  
  204.   long     CompareKeys      (void const*, void const*, IArgType) const;
  205.  
  206. private:
  207.  
  208.   static
  209.   char const*
  210.            cvClassName;
  211.  
  212.   Base&    ivBase;
  213.  
  214.   void const*
  215.            ivKey;
  216.  
  217.   static
  218.   Base&    BaseOf           (IKeySortedSetOnSequenceImpl <Base> const&);
  219.  
  220.   IBoolean LocateKey        (void const*, ICursorImpl&) const;
  221.  
  222.   IBoolean LocateNextKey    (void const*, ICursorImpl&) const;
  223.  
  224.   static
  225.   Ops&     OpsOf            (IKeySortedSetOnSequenceImpl <Base> const&);
  226.  
  227.   friend
  228.   class    IKeySortedSetOnSequenceMngCursorImpl <Base>;
  229.  
  230.   friend
  231.   class    IKeySetOnKeySortedSetImpl <Self>;
  232.  
  233.   friend
  234.   class    ISortedBagOnKeySortedSetImpl <Self>;
  235.  
  236.   friend
  237.   class    ISortedMapOnKeySortedSetImpl <Self>;
  238.  
  239.  
  240. };
  241.  
  242. template <class Base>
  243. class IAKeySortedSetOnSequenceOps {
  244. public:
  245.  
  246.   virtual ~IAKeySortedSetOnSequenceOps
  247.                             ();
  248.  
  249.   virtual
  250.   IACollectionImpl*
  251.            Clone            () const = 0;
  252.  
  253.   virtual
  254.   long     CompareKeys      (void const*, void const*,
  255.                              IArgType) const = 0;
  256.  
  257.   virtual
  258.   void*    Key              (void const*) const = 0;
  259.  
  260.   virtual
  261.   TStream& operator<<=      (TStream&) = 0;
  262.  
  263.   virtual
  264.   TStream& operator>>=      (TStream&) const = 0;
  265.  
  266.   virtual  operator Base&   () = 0;
  267.  
  268. protected:
  269.  
  270. private:
  271.  
  272.  
  273. };
  274.  
  275. #pragma SOMAsDefault (pop)
  276.  
  277. #include <iikssseq.inl>
  278.  
  279.  
  280. #pragma info (restore)
  281. #pragma pack ()
  282.  
  283. #endif
  284.