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