home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iastk.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.6 KB  |  92 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 _IASTK_H
  19. #define _IASTK_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 IAStack :
  32.   public IARestrictedAccessCollection <Element> {
  33.  
  34.   typedef  IARestrictedAccessCollection <Element> Inherited;
  35.  
  36.   typedef  IASequenceImpl Implementation;
  37.  
  38. public:
  39.  
  40.            IAStack
  41.                             (INotifier&);
  42.  
  43.           ~IAStack
  44.                             ();
  45.  
  46.   void     addAsLast        (Element const&);
  47.  
  48.   void     addAsLast        (Element const&, ICursor&);
  49.  
  50.   long     compare          (IAStack <Element> const&,
  51.                              long (*comparisonFunction)
  52.                               (Element const&, Element const&)) const;
  53.  
  54.   void     pop              ();
  55.  
  56.   void     pop              (Element&);
  57.  
  58.   void     push             (Element const&);
  59.  
  60.   void     push             (Element const&, ICursor&);
  61.  
  62.   void     removeLast       ();
  63.  
  64.   Element const&
  65.            top              () const;
  66.  
  67. protected:
  68.  
  69.            IAStack
  70.                             ();
  71.  
  72.            IAStack
  73.                             (IAStack <Element> const&);
  74.  
  75. private:
  76.  
  77.   static
  78.   Implementation&
  79.            ImplOf           (IAStack <Element> const&);
  80.  
  81.  
  82. };
  83.  
  84. #include <iastk.inl>
  85.  
  86. #pragma SOMAsDefault (pop)
  87.  
  88. #pragma info (restore)
  89. #pragma pack ()
  90.  
  91. #endif
  92.