home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iarstrct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  4.7 KB  |  176 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 _IARSTRCT_H
  19. #define _IARSTRCT_H
  20.  
  21. #include <ibcllct.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 IARestrictedAccessCollection : protected IACollectionBase {
  30.  
  31.   typedef  IACollectionImpl Implementation;
  32.  
  33. public:
  34.  
  35.            IARestrictedAccessCollection
  36.                             (INotifier&);
  37.  
  38.   virtual ~IARestrictedAccessCollection
  39.                             ();
  40.  
  41.   IBoolean add              (Element const&);
  42.  
  43.   IBoolean add              (Element const&, ICursor&);
  44.  
  45.   void     addAllFrom       (IARestrictedAccessCollection
  46.                               <Element> const&);
  47.  
  48.   IBoolean allElementsDo    (IBoolean (*applicatorFunction)
  49.                               (Element const&, void*),
  50.                              void* additionalArgument = 0) const;
  51.  
  52.   IBoolean allElementsDo    (IConstantApplicator <Element>&) const;
  53.  
  54.   Element const&
  55.            any              () const;
  56.  
  57.   void     copy             (IARestrictedAccessCollection
  58.                               <Element> const&);
  59.  
  60.   INotifier&
  61.            disableNotification
  62.                             ();
  63.  
  64.   Element const&
  65.            elementAt        (ICursor const&) const;
  66.  
  67.   Element const&
  68.            elementAtPosition
  69.                             (IPosition) const;
  70.  
  71.   INotifier&
  72.            enableNotification
  73.                             (IBoolean = true);
  74.  
  75.   Element const&
  76.            first            () const;
  77.  
  78.   IBoolean isBounded        () const;
  79.  
  80.   IBoolean isConsistent     () const;
  81.  
  82.   IBoolean isEmpty          () const;
  83.  
  84.   IBoolean isEnabledForNotification
  85.                             () const;
  86.  
  87.   IBoolean isFirstAt        (ICursor const&) const;
  88.  
  89.   IBoolean isFull           () const;
  90.  
  91.   IBoolean isLastAt         (ICursor const&) const;
  92.  
  93.   Element const&
  94.            last             () const;
  95.  
  96.   INumber  maxNumberOfElements
  97.                             () const;
  98.  
  99.   ICursor* newCursor        () const;
  100.  
  101.   INotifier&
  102.            notifier
  103.                             ();
  104.  
  105.   INotifier const&
  106.            notifier
  107.                             () const;
  108.  
  109.   INotifier&
  110.            notifyObservers  (INotificationEvent const&);
  111.  
  112.   INumber  numberOfElements () const;
  113.  
  114.   IPosition
  115.            positionAt       (ICursor const&) const;
  116.  
  117.   INumber  removeAll        ();
  118.  
  119.   IBoolean setToFirst       (ICursor&) const;
  120.  
  121.   IBoolean setToLast        (ICursor&) const;
  122.  
  123.   IBoolean setToNext        (ICursor&) const;
  124.  
  125.   void     setToPosition    (IPosition, ICursor&) const;
  126.  
  127.   IBoolean setToPrevious    (ICursor&) const;
  128.  
  129.            operator INotifier&
  130.                             () const;
  131.  
  132.   // for backward compatibility
  133.   Element const&
  134.            anyElement       () const;
  135.  
  136.   Element const&
  137.            firstElement     () const;
  138.  
  139.   IBoolean isFirst          (ICursor const&) const;
  140.  
  141.   IBoolean isLast           (ICursor const&) const;
  142.  
  143.   Element const&
  144.            lastElement      () const;
  145.  
  146.   IPosition
  147.            position         (ICursor const&) const;
  148.  
  149. protected:
  150.  
  151.            IARestrictedAccessCollection
  152.                             ();
  153.  
  154.            IARestrictedAccessCollection
  155.                             (IARestrictedAccessCollection
  156.                               <Element> const&);
  157.  
  158.   static
  159.   Implementation&
  160.            ImplOf           (IARestrictedAccessCollection
  161.                               <Element> const&);
  162.  
  163. private:
  164.  
  165.  
  166. };
  167.  
  168. #pragma SOMAsDefault (pop)
  169.  
  170. #include <iarstrct.inl>
  171.  
  172. #pragma info (restore)
  173. #pragma pack ()
  174.  
  175. #endif
  176.