home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / ibcllct.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.9 KB  |  118 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 _IBCLLCT_H
  19. #define _IBCLLCT_H
  20.  
  21. #include <imcllct.h>
  22. #include <iglobals.h>
  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.   typedef  ICursorImpl Implementation;
  32.  
  33. public:
  34.  
  35.   virtual ~ICursor          ();
  36.  
  37.   void     copy             (ICursor const&);
  38.  
  39.   void     invalidate       ();
  40.  
  41.   IBoolean isValid          () const;
  42.  
  43.   IBoolean setToFirst       ();
  44.  
  45.   IBoolean setToNext        ();
  46.  
  47.   void     operator=        (ICursor const&);
  48.  
  49.   IBoolean operator==       (ICursor const&) const;
  50.  
  51.   IBoolean operator!=       (ICursor const&) const;
  52.  
  53. protected:
  54.  
  55.            ICursor          (Implementation*);
  56.  
  57.            ICursor          (ICursor const&);
  58.  
  59.   static
  60.   inline
  61.   Implementation&
  62.            ImplOf           (ICursor const&);
  63.  
  64. private:
  65.  
  66.   Implementation*
  67.            ivImpl;
  68.  
  69.   friend
  70.   class    IACollectionBase;
  71.  
  72.   friend
  73.   class    IVCollectionImpl;
  74.  
  75.  
  76. };
  77.  
  78. #define forICursor(c) \
  79.   for ((c).setToFirst (); (c).isValid (); (c).setToNext ())
  80.  
  81. // for backward compatibility
  82. #define forCursor(c) \
  83.   for ((c).setToFirst (); (c).isValid (); (c).setToNext ())
  84.  
  85. class IACollectionBase : protected IMetaCollection {
  86. public:
  87.  
  88. protected:
  89.  
  90.            IACollectionBase ();
  91.  
  92.            IACollectionBase (IACollectionBase const&);
  93.  
  94.           ~IACollectionBase ();
  95.  
  96.   static
  97.   ICursorImpl&
  98.            CrsrImplOf       (ICursor& cursor);
  99.  
  100.   static
  101.   ICursorImpl const&
  102.            CrsrImplOf       (ICursor const& cursor);
  103.  
  104.   static
  105.   ICursor* InterfaceFor     (ICursorImpl* cursor);
  106.  
  107.  
  108. };
  109.  
  110. #pragma SOMAsDefault (pop)
  111.  
  112. #include <ibcllct.inl>
  113.  
  114. #pragma info (restore)
  115. #pragma pack ()
  116.  
  117. #endif
  118.