home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / titeratr.h < prev    next >
C/C++ Source or Header  |  1999-02-22  |  9KB  |  261 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: titeratr.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emith: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somuc
  12.  * 
  13.  *    ORIGINS: 82, 81, 27
  14.  * 
  15.  * 
  16.  *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996
  17.  *    All Rights Reserved
  18.  *    Licensed Materials - Property of IBM
  19.  *    US Government Users Restricted Rights - Use, duplication or
  20.  *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  21.  * 
  22.  *    Copyright ⌐ 1988-92 Apple Computer, Inc.  All rights reserved.
  23.  * 
  24.  * CLASS_NAME: somf_TIterator
  25.  * 
  26.  * DESCRIPTION: All of the Utility Classes have corresponding iterator
  27.  *              classes.  An iterator for a particular object will iterate over
  28.  *              all of the objects in a class.  somf_TIterator is the
  29.  *              Abstract base class for all iterators.
  30.  * 
  31.  *  This file was generated by the SOM Compiler.
  32.  *  FileName: TIteratr.id2.
  33.  *  Generated using:
  34.  *      SOM Precompiler spc: 6.13
  35.  *      SOM Emitter emitidl.dll: 6.18
  36.  */
  37.  
  38.  
  39. #ifndef SOM_somf_TIterator_h
  40. #define SOM_somf_TIterator_h
  41.  
  42.  
  43. /*
  44.  * Passthru lines: File: "C.h", "before"
  45.  */
  46.  
  47. #include <mcollect.h>
  48.  
  49. #include <som.h>
  50.  
  51. /*
  52.  * -- This emitter treats Method Tokens as Thunks by default.
  53.  * -- Use the sc modifier "nothunks" to change this default
  54.  */
  55. #undef somresolve_
  56. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  57.  
  58. /*
  59.  * Define the class name as an object type
  60.  */
  61. #ifndef somf_TIterator
  62. #define somf_TIterator SOMObject
  63. #endif
  64. #include <somobj.h>
  65.  
  66. /*
  67.  * Start of bindings for IDL types
  68.  */
  69.  
  70. #ifndef SOMClass
  71.     #define SOMClass SOMObject
  72. #endif /* SOMClass */
  73. #ifndef somf_MCollectible
  74.     #define somf_MCollectible SOMObject
  75. #endif /* somf_MCollectible */
  76. #define somf_TIterator_kIteratorOutOfSync 900 /* 0x384 */
  77.  
  78. #ifndef SOM_DONT_USE_SHORT_NAMES
  79. #ifndef SOMTGD_kIteratorOutOfSync
  80.     #ifdef kIteratorOutOfSync
  81.         #undef kIteratorOutOfSync
  82.         #define SOMTGD_kIteratorOutOfSync 1
  83.     #else
  84.         #define kIteratorOutOfSync somf_TIterator_kIteratorOutOfSync
  85.     #endif /* kIteratorOutOfSync */
  86. #endif /* SOMTGD_kIteratorOutOfSync */
  87. #endif /* SOM_DONT_USE_SHORT_NAMES */
  88.  
  89. /*
  90.  * End of bindings for IDL types.
  91.  */
  92.  
  93. #define somf_TIterator_MajorVersion 2
  94. #define somf_TIterator_MinorVersion 1
  95.  
  96. /*
  97.  * External name shortening if required
  98.  */
  99. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  100. #define somf_TIteratorNewClass c
  101. #pragma linkage(c, system)
  102. #define somf_TIteratorClassData d
  103. #define somf_TIteratorCClassData x
  104. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  105. /*--------------Migration------------*/
  106. #define somf_TIterator_classObj somf_TIteratorClassData.classObject
  107. #define _somf_TIterator somf_TIterator_classObj
  108.  
  109. /*
  110.  * Declare the class creation procedure
  111.  */
  112. SOMEXTERN SOMClass * SOMLINK somf_TIteratorNewClass(integer4 somtmajorVersion,
  113.         integer4 somtminorVersion);
  114. #pragma linkage(somf_TIteratorNewClass, system)
  115.  
  116. /*
  117.  * Declare the class data structure
  118.  */
  119. SOMEXTERN struct somf_TIteratorClassDataStructure {
  120.     SOMClass *classObject;
  121.     somMToken somfNext;
  122.     somMToken somfFirst;
  123.     somMToken somfRemove;
  124. } SOMDLINK somf_TIteratorClassData;
  125.  
  126. /*
  127.  * Declare the C specific class data structure
  128.  */
  129. SOMEXTERN struct somf_TIteratorCClassDataStructure {
  130.     somMethodTabs parentMtab;
  131.     somDToken instanceDataToken;
  132. } SOMDLINK somf_TIteratorCClassData;
  133.  
  134. /*
  135.  * New and Renew macros for somf_TIterator
  136.  */
  137. #define somf_TIteratorNew() \
  138.    ( _somf_TIterator ? \
  139.     _somNew(_somf_TIterator) \
  140.     : ( somf_TIteratorNewClass(\
  141.         somf_TIterator_MajorVersion, \
  142.         somf_TIterator_MinorVersion),\
  143.        _somNew(_somf_TIterator)))
  144. #define somf_TIteratorRenew(buf) \
  145.    ( _somf_TIterator ? \
  146.     _somRenew(_somf_TIterator, buf) \
  147.     : ( somf_TIteratorNewClass(\
  148.         somf_TIterator_MajorVersion, \
  149.         somf_TIterator_MinorVersion),\
  150.        _somRenew(_somf_TIterator, buf)))
  151.  
  152. /*
  153.  * New Method: somfNext
  154.  */
  155. typedef somf_MCollectible*   SOMLINK somTP_somf_TIterator_somfNext(somf_TIterator *somSelf, Environment *ev);
  156. #pragma linkage(somTP_somf_TIterator_somfNext, system)
  157. typedef somTP_somf_TIterator_somfNext *somTD_somf_TIterator_somfNext;
  158. /*
  159.  *  Retrieve the next object in the collection and return it.  The order that
  160.  *  objects are retrieved is in an order that reflects the "ordered-ness"
  161.  *  of the collection (or the lack of ordering on the collection elements).
  162.  *  If the collection has changed since the last time somfFirst was called,
  163.  *  this method will FAIL.
  164.  */
  165. #define somMD_somf_TIterator_somfNext "::somf_TIterator::somfNext"
  166. #define somf_TIterator_somfNext(somSelf,ev) \
  167.     (SOM_Resolve(somSelf, somf_TIterator, somfNext) \
  168.     (somSelf,ev))
  169. #ifndef SOMGD_somfNext
  170.     #if (defined(_somfNext) || defined(__somfNext))
  171.         #undef _somfNext
  172.         #undef __somfNext
  173.         #define SOMGD_somfNext 1
  174.     #else
  175.         #define _somfNext somf_TIterator_somfNext
  176.     #endif /* _somfNext */
  177. #endif /* SOMGD_somfNext */
  178.  
  179. /*
  180.  * New Method: somfFirst
  181.  */
  182. typedef somf_MCollectible*   SOMLINK somTP_somf_TIterator_somfFirst(somf_TIterator *somSelf, Environment *ev);
  183. #pragma linkage(somTP_somf_TIterator_somfFirst, system)
  184. typedef somTP_somf_TIterator_somfFirst *somTD_somf_TIterator_somfFirst;
  185. /*
  186.  *  Reset the iterator and return the first element of the collection.  This
  187.  *  resyncs the iterator to the collection if other operations on the
  188.  *  collection caused the iterator to be invalidated.
  189.  */
  190. #define somMD_somf_TIterator_somfFirst "::somf_TIterator::somfFirst"
  191. #define somf_TIterator_somfFirst(somSelf,ev) \
  192.     (SOM_Resolve(somSelf, somf_TIterator, somfFirst) \
  193.     (somSelf,ev))
  194. #ifndef SOMGD_somfFirst
  195.     #if (defined(_somfFirst) || defined(__somfFirst))
  196.         #undef _somfFirst
  197.         #undef __somfFirst
  198.         #define SOMGD_somfFirst 1
  199.     #else
  200.         #define _somfFirst somf_TIterator_somfFirst
  201.     #endif /* _somfFirst */
  202. #endif /* SOMGD_somfFirst */
  203.  
  204. /*
  205.  * New Method: somfRemove
  206.  */
  207. typedef void   SOMLINK somTP_somf_TIterator_somfRemove(somf_TIterator *somSelf, Environment *ev);
  208. #pragma linkage(somTP_somf_TIterator_somfRemove, system)
  209. typedef somTP_somf_TIterator_somfRemove *somTD_somf_TIterator_somfRemove;
  210. /*
  211.  *  Remove the current object, the one just returned by First or Next,
  212.  *  from the Collection.
  213.  */
  214. #define somMD_somf_TIterator_somfRemove "::somf_TIterator::somfRemove"
  215. #define somf_TIterator_somfRemove(somSelf,ev) \
  216.     (SOM_Resolve(somSelf, somf_TIterator, somfRemove) \
  217.     (somSelf,ev))
  218. #ifndef SOMGD_somfRemove
  219.     #if (defined(_somfRemove) || defined(__somfRemove))
  220.         #undef _somfRemove
  221.         #undef __somfRemove
  222.         #define SOMGD_somfRemove 1
  223.     #else
  224.         #define _somfRemove somf_TIterator_somfRemove
  225.     #endif /* _somfRemove */
  226. #endif /* SOMGD_somfRemove */
  227. #ifndef SOM_DONT_USE_INHERITED_MACROS
  228. #define somf_TIterator_somDefaultInit SOMObject_somDefaultInit
  229. #define somf_TIterator_somDestruct SOMObject_somDestruct
  230. #define somf_TIterator_somDefaultCopyInit SOMObject_somDefaultCopyInit
  231. #define somf_TIterator_somDefaultAssign SOMObject_somDefaultAssign
  232. #define somf_TIterator_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  233. #define somf_TIterator_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  234. #define somf_TIterator_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  235. #define somf_TIterator_somDefaultConstAssign SOMObject_somDefaultConstAssign
  236. #define somf_TIterator_somDefaultVAssign SOMObject_somDefaultVAssign
  237. #define somf_TIterator_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  238. #define somf_TIterator_somInit SOMObject_somInit
  239. #define somf_TIterator_somFree SOMObject_somFree
  240. #define somf_TIterator_somUninit SOMObject_somUninit
  241. #define somf_TIterator_somGetClass SOMObject_somGetClass
  242. #define somf_TIterator_somGetClassName SOMObject_somGetClassName
  243. #define somf_TIterator_somGetSize SOMObject_somGetSize
  244. #define somf_TIterator_somIsA SOMObject_somIsA
  245. #define somf_TIterator_somIsInstanceOf SOMObject_somIsInstanceOf
  246. #define somf_TIterator_somRespondsTo SOMObject_somRespondsTo
  247. #define somf_TIterator_somDispatch SOMObject_somDispatch
  248. #define somf_TIterator_somClassDispatch SOMObject_somClassDispatch
  249. #define somf_TIterator_somCastObj SOMObject_somCastObj
  250. #define somf_TIterator_somResetObj SOMObject_somResetObj
  251. #define somf_TIterator_somDispatchV SOMObject_somDispatchV
  252. #define somf_TIterator_somDispatchL SOMObject_somDispatchL
  253. #define somf_TIterator_somDispatchA SOMObject_somDispatchA
  254. #define somf_TIterator_somDispatchD SOMObject_somDispatchD
  255. #define somf_TIterator_somPrintSelf SOMObject_somPrintSelf
  256. #define somf_TIterator_somDumpSelf SOMObject_somDumpSelf
  257. #define somf_TIterator_somDumpSelfInt SOMObject_somDumpSelfInt
  258. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  259.  
  260. #endif       /* SOM_somf_TIterator_h */
  261.