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