home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / iivcllct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  3.0 KB  |  122 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 _IIVCLLCT_H
  19. #define _IIVCLLCT_H
  20.  
  21. #include <iiglobal.h>
  22. #include <istdntfy.hpp>
  23.  
  24. #pragma info (nocls, nocnd, nocns, nocnv, noext, nognr, novft)
  25. #pragma pack (4)
  26.  
  27. #pragma SOMAsDefault (off)
  28.  
  29. class ICursor;
  30.  
  31. class ICursorImpl;
  32.  
  33. template <class Element>
  34. class IVCollectionEventData {
  35. public:
  36.  
  37.            IVCollectionEventData
  38.                             (ICursor const&, Element const* = 0);
  39.  
  40.   ICursor const&
  41.            cursor           () const;
  42.  
  43.   Element const*const
  44.            element          () const;
  45.  
  46. protected:
  47.  
  48. private:
  49.  
  50.   ICursor const*
  51.            ivCursor;
  52.  
  53.   Element const*
  54.            ivElement;
  55.  
  56.  
  57. };
  58.  
  59. class IVCollectionImpl : public IStandardNotifier {
  60.  
  61.   typedef  IStandardNotifier Inherited;
  62.  
  63. public:
  64.  
  65.   static
  66.   INotificationId const
  67.   IC_IMPORTB addId,
  68.   IC_IMPORTB modifyId,
  69.   IC_IMPORTB removeId,
  70.   IC_IMPORTB replaceId;
  71.  
  72.   // for backward compatibility
  73.   static
  74.   INotificationId const
  75.   IC_IMPORTB addedId,
  76.   IC_IMPORTB modifiedId,
  77.   IC_IMPORTB removedId,
  78.   IC_IMPORTB replacedId;
  79.  
  80.           ~IVCollectionImpl ();
  81.  
  82.   INotifier&
  83.            DisableNotification
  84.                             ();
  85.  
  86.   INotifier&
  87.            EnableNotification
  88.                             (IBoolean = true);
  89.  
  90.   IBoolean HasObservers     () const;
  91.  
  92.   IBoolean IsEnabledForNotification
  93.                             () const;
  94.  
  95. protected:
  96.  
  97.            IVCollectionImpl ();
  98.  
  99.   void     NotifyOfAddAt    (ICursorImpl const&);
  100.  
  101.   void     NotifyOfModification
  102.                             ();
  103.  
  104.   void     NotifyOfRemoveAt (ICursorImpl const&);
  105.  
  106.   void     NotifyOfReplaceAt
  107.                             (ICursorImpl const&, void const* = 0);
  108.  
  109. private:
  110.  
  111.  
  112. };
  113.  
  114. typedef IVCollectionImpl IVCollection;
  115.  
  116. #include <iivcllct.inl>
  117.  
  118. #pragma info (restore)
  119. #pragma pack ()
  120.  
  121. #endif
  122.