home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / bento / headers / nmspcitr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  2.1 KB  |  84 lines

  1. /*
  2.     File:        NmSpcItr.h
  3.  
  4.     Contains:    Definition of XMPAbsValueIterator class
  5.  
  6.     Written by:    Caia Grisar
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>     1/29/94    NP        XMPMethod changes.
  13.          <1>     1/14/94    CG        first checked in
  14.     To Do:
  15. */
  16.  
  17. #ifndef _NMSPCITR_
  18. #define _NMSPCITR_
  19.  
  20. #ifndef _NAMSPACE_
  21. #include "NamSpace.h"
  22. #endif
  23.  
  24.  
  25. //==============================================================================
  26. // Classes defined in this interface
  27. //==============================================================================
  28.  
  29. class XMPAbsValueIterator;
  30.  
  31. //==============================================================================
  32. // XMPAbsValueIterator
  33. //
  34. //    Both key and value are return by the iterator.
  35. //
  36. //    This iterator is only meant to be used in the the context of a for loop,
  37. //    e.g.:
  38. //
  39. //    XMPAbsValueIterator iter;
  40. //    for (iter.First(key, value);
  41. //            iter.IsNotComplete();
  42. //            iter.Next(key, value))
  43. //    {
  44. //        ...
  45. //    }
  46. //
  47. //==============================================================================
  48.  
  49. class XMPAbsValueIterator
  50. {
  51.   public:
  52.  
  53.     XMPAbsValueIterator() {}
  54.         // Subclass should have constructor:
  55.         //    XMPMacValueIterator(XMPAbsNameSpace* nameSpace);
  56.     XMPVMethod ~XMPAbsValueIterator() {}
  57.  
  58.         /*    If any of the 6 methods below is invoked does not match the
  59.             XMPNSTypeSpec with which the XMPNameSpace was initialized,
  60.             kXMPErrWrongType is thrown. Note that the keys and values
  61.             returned are pointers to internal structure and are READ-ONLY */
  62.  
  63.     XMPVMethod void            First(XMPISOStr* key, XMPPtr* value, XMPULong* valueLength)
  64.         = 0;
  65. //    XMPMethod void            First(XMPOSType* key, XMPPtr* value)
  66. //        = 0;
  67. //    XMPMethod void            First(XMPSLong* key, XMPPtr* value)
  68. //        = 0;
  69.     XMPVMethod void            Next(XMPISOStr* key, XMPPtr* value, XMPULong* valueLength)
  70.         = 0;
  71. //    XMPMethod void            Next(XMPOSType* key, XMPPtr* value)
  72. //        = 0;
  73. //    XMPMethod void            Next(XMPSLong* key, XMPPtr* value)
  74. //        = 0;
  75.     XMPVMethod XMPBoolean    IsNotComplete()
  76.         = 0;
  77. };
  78.  
  79. #ifndef _NMSPCITM_
  80. #include "NmSpcItM.h"
  81. #endif
  82.  
  83. #endif // _NMSPCITR_
  84.