home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iaqu.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.5 KB  |  89 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 _IAQU_H
  19. #define _IAQU_H
  20.  
  21. #include <iarstrct.h>
  22. #include <iaorder.h>
  23. #include <iiaseq.h>
  24.  
  25. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  26. #pragma pack (4)
  27.  
  28. #pragma SOMAsDefault (off)
  29.  
  30. template <class Element>
  31. class IAQueue :
  32.   public IARestrictedAccessCollection <Element> {
  33.  
  34.   typedef  IARestrictedAccessCollection <Element> Inherited;
  35.  
  36.   typedef  IASequenceImpl Implementation;
  37.  
  38. public:
  39.  
  40.            IAQueue
  41.                             (INotifier&);
  42.  
  43.           ~IAQueue
  44.                             ();
  45.  
  46.   void     addAsLast        (Element const&);
  47.  
  48.   void     addAsLast        (Element const&, ICursor&);
  49.  
  50.   long     compare          (IAQueue <Element> const&,
  51.                              long (*comparisonFunction)
  52.                               (Element const&, Element const&)) const;
  53.  
  54.   void     dequeue          ();
  55.  
  56.   void     dequeue          (Element&);
  57.  
  58.   void     enqueue          (Element const&);
  59.  
  60.   void     enqueue          (Element const&, ICursor&);
  61.  
  62.   void     removeFirst      ();
  63.  
  64. protected:
  65.  
  66.            IAQueue
  67.                             ();
  68.  
  69.            IAQueue
  70.                             (IAQueue <Element> const&);
  71.  
  72. private:
  73.  
  74.   static
  75.   Implementation&
  76.            ImplOf           (IAQueue <Element> const&);
  77.  
  78.  
  79. };
  80.  
  81. #include <iaqu.inl>
  82.  
  83. #pragma SOMAsDefault (pop)
  84.  
  85. #pragma info (restore)
  86. #pragma pack ()
  87.  
  88. #endif
  89.