home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iasqntl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.1 KB  |  109 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 _IASQNTL_H
  19. #define _IASQNTL_H
  20.  
  21. #include <iaorder.h>
  22.  
  23. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  24. #pragma pack (4)
  25.  
  26. #pragma SOMAsDefault (off)
  27.  
  28. template  <class Element>
  29. class IASequentialCollection : public IAOrderedCollection <Element> {
  30.  
  31.   typedef IACollectionImpl Implementation;
  32.  
  33. public:
  34.  
  35.            IASequentialCollection
  36.                             (INotifier&);
  37.  
  38.           ~IASequentialCollection
  39.                             ();
  40.  
  41.   void     addAsFirst       (Element const&);
  42.  
  43.   void     addAsFirst       (Element const&, ICursor&);
  44.  
  45.   void     addAsLast        (Element const&);
  46.  
  47.   void     addAsLast        (Element const&, ICursor&);
  48.  
  49.   void     addAsNext        (Element const&, ICursor&);
  50.  
  51.   void     addAsPrevious    (Element const&, ICursor&);
  52.  
  53.   void     addAtPosition    (IPosition, Element const&);
  54.  
  55.   void     addAtPosition    (IPosition, Element const&, ICursor&);
  56.  
  57.   Element& any              ();
  58.  
  59.   Element const&
  60.            any              () const;
  61.  
  62.   Element& elementAtPosition
  63.                             (IPosition);
  64.  
  65.   Element const&
  66.            elementAtPosition
  67.                             (IPosition) const;
  68.  
  69.   Element& first            ();
  70.  
  71.   Element const&
  72.            first            () const;
  73.  
  74.   Element& last             ();
  75.  
  76.   Element const&
  77.            last             () const;
  78.  
  79.   void     reverse          ();
  80.  
  81.   void     sort             (long (*comparisonFunction)
  82.                               (Element const&, Element const&));
  83.  
  84. protected:
  85.  
  86.            IASequentialCollection
  87.                             ();
  88.  
  89.            IASequentialCollection
  90.                             (IASequentialCollection <Element> const&);
  91.  
  92. private:
  93.  
  94.   static
  95.   Implementation&
  96.            ImplOf           (IASequentialCollection <Element> const&);
  97.  
  98.  
  99. };
  100.  
  101. #pragma SOMAsDefault (pop)
  102.  
  103. #include <iasqntl.inl>
  104.  
  105. #pragma info (restore)
  106. #pragma pack ()
  107.  
  108. #endif
  109.