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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: tcollect.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, 1989 Apple Computer, Inc. All rights reserved.
  23.  * 
  24.  * CLASS_NAME: somf_TCollection
  25.  * 
  26.  * DESCRIPTION: This class represents a group of objects.  It is implemented
  27.  *              as an abstract class from which all collection classes inherit
  28.  *              methods.
  29.  * 
  30.  *  This file was generated by the SOM Compiler.
  31.  *  FileName: TCollect.id2.
  32.  *  Generated using:
  33.  *      SOM Precompiler spc: 6.13
  34.  *      SOM Emitter emitidl.dll: 6.18
  35.  */
  36.  
  37.  
  38. #ifndef SOM_somf_TCollection_h
  39. #define SOM_somf_TCollection_h
  40.  
  41.  
  42. #include <som.h>
  43.  
  44. /*
  45.  * -- This emitter treats Method Tokens as Thunks by default.
  46.  * -- Use the sc modifier "nothunks" to change this default
  47.  */
  48. #undef somresolve_
  49. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  50.  
  51. /*
  52.  * Define the class name as an object type
  53.  */
  54. #ifndef somf_TCollection
  55. #define somf_TCollection SOMObject
  56. #endif
  57. #include <mcollect.h>
  58.  
  59. /*
  60.  * Start of bindings for IDL types
  61.  */
  62.  
  63. #ifndef SOMClass
  64.     #define SOMClass SOMObject
  65. #endif /* SOMClass */
  66. #ifndef somf_TIterator
  67.     #define somf_TIterator SOMObject
  68. #endif /* somf_TIterator */
  69. #define somf_TCollection_kCollectionSizeHint 8 /* 8 */
  70.  
  71. #ifndef SOM_DONT_USE_SHORT_NAMES
  72. #ifndef SOMTGD_kCollectionSizeHint
  73.     #ifdef kCollectionSizeHint
  74.         #undef kCollectionSizeHint
  75.         #define SOMTGD_kCollectionSizeHint 1
  76.     #else
  77.         #define kCollectionSizeHint somf_TCollection_kCollectionSizeHint
  78.     #endif /* kCollectionSizeHint */
  79. #endif /* SOMTGD_kCollectionSizeHint */
  80. #endif /* SOM_DONT_USE_SHORT_NAMES */
  81.  
  82. /*
  83.  * End of bindings for IDL types.
  84.  */
  85.  
  86. /*
  87.  * Passthru lines: File: "C.h", "after"
  88.  */
  89.  
  90. #include <titeratr.h>
  91.  
  92. #define somf_TCollection_MajorVersion 2
  93. #define somf_TCollection_MinorVersion 1
  94.  
  95. /*
  96.  * External name shortening if required
  97.  */
  98. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  99. #define somf_TCollectionNewClass c
  100. #pragma linkage(c, system)
  101. #define somf_TCollectionClassData d
  102. #define somf_TCollectionCClassData x
  103. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  104. /*--------------Migration------------*/
  105. #define somf_TCollection_classObj somf_TCollectionClassData.classObject
  106. #define _somf_TCollection somf_TCollection_classObj
  107.  
  108. /*
  109.  * Declare the class creation procedure
  110.  */
  111. SOMEXTERN SOMClass * SOMLINK somf_TCollectionNewClass(integer4 somtmajorVersion,
  112.         integer4 somtminorVersion);
  113. #pragma linkage(somf_TCollectionNewClass, system)
  114.  
  115. /*
  116.  * Declare the class data structure
  117.  */
  118. SOMEXTERN struct somf_TCollectionClassDataStructure {
  119.     SOMClass *classObject;
  120.     somMToken somfAdd;
  121.     somMToken somfAddAll;
  122.     somMToken somfRemove;
  123.     somMToken somfRemoveAll;
  124.     somMToken somfDeleteAll;
  125.     somMToken somfCount;
  126.     somMToken somfMember;
  127.     somMToken somfCreateIterator;
  128.     somMToken somfTestFunction;
  129.     somMToken somfSetTestFunction;
  130.     somMToken somfTCollectionInit;
  131. } SOMDLINK somf_TCollectionClassData;
  132.  
  133. /*
  134.  * Declare the C specific class data structure
  135.  */
  136. SOMEXTERN struct somf_TCollectionCClassDataStructure {
  137.     somMethodTabs parentMtab;
  138.     somDToken instanceDataToken;
  139. } SOMDLINK somf_TCollectionCClassData;
  140.  
  141. /*
  142.  * New and Renew macros for somf_TCollection
  143.  */
  144. #define somf_TCollectionNew() \
  145.    ( _somf_TCollection ? \
  146.     _somNew(_somf_TCollection) \
  147.     : ( somf_TCollectionNewClass(\
  148.         somf_TCollection_MajorVersion, \
  149.         somf_TCollection_MinorVersion),\
  150.        _somNew(_somf_TCollection)))
  151. #define somf_TCollectionRenew(buf) \
  152.    ( _somf_TCollection ? \
  153.     _somRenew(_somf_TCollection, buf) \
  154.     : ( somf_TCollectionNewClass(\
  155.         somf_TCollection_MajorVersion, \
  156.         somf_TCollection_MinorVersion),\
  157.        _somRenew(_somf_TCollection, buf)))
  158.  
  159. /*
  160.  * Override method: somfIsEqual
  161.  */
  162. #define somf_TCollection_somfIsEqual(somSelf,ev,obj) \
  163.     somf_MCollectible_somfIsEqual(somSelf,ev,obj)
  164.  
  165. /*
  166.  * New Method: somfAdd
  167.  */
  168. typedef somf_MCollectible*   SOMLINK somTP_somf_TCollection_somfAdd(somf_TCollection *somSelf, Environment *ev, 
  169.         somf_MCollectible* obj);
  170. #pragma linkage(somTP_somf_TCollection_somfAdd, system)
  171. typedef somTP_somf_TCollection_somfAdd *somTD_somf_TCollection_somfAdd;
  172. /*
  173.  *  Add obj to this.
  174.  */
  175. #define somMD_somf_TCollection_somfAdd "::somf_TCollection::somfAdd"
  176. #define somf_TCollection_somfAdd(somSelf,ev,obj) \
  177.     (SOM_Resolve(somSelf, somf_TCollection, somfAdd) \
  178.     (somSelf,ev,obj))
  179. #ifndef SOMGD_somfAdd
  180.     #if (defined(_somfAdd) || defined(__somfAdd))
  181.         #undef _somfAdd
  182.         #undef __somfAdd
  183.         #define SOMGD_somfAdd 1
  184.     #else
  185.         #define _somfAdd somf_TCollection_somfAdd
  186.     #endif /* _somfAdd */
  187. #endif /* SOMGD_somfAdd */
  188.  
  189. /*
  190.  * New Method: somfAddAll
  191.  */
  192. typedef void   SOMLINK somTP_somf_TCollection_somfAddAll(somf_TCollection *somSelf, Environment *ev, 
  193.         somf_TCollection* col);
  194. #pragma linkage(somTP_somf_TCollection_somfAddAll, system)
  195. typedef somTP_somf_TCollection_somfAddAll *somTD_somf_TCollection_somfAddAll;
  196. /*
  197.  *  Add all of the objects in collection to this.  Essentially this is
  198.  *  equivalent to getting an iterator for the collection passed in and adding
  199.  *  each element in the collection to this.
  200.  */
  201. #define somMD_somf_TCollection_somfAddAll "::somf_TCollection::somfAddAll"
  202. #define somf_TCollection_somfAddAll(somSelf,ev,col) \
  203.     (SOM_Resolve(somSelf, somf_TCollection, somfAddAll) \
  204.     (somSelf,ev,col))
  205. #ifndef SOMGD_somfAddAll
  206.     #if (defined(_somfAddAll) || defined(__somfAddAll))
  207.         #undef _somfAddAll
  208.         #undef __somfAddAll
  209.         #define SOMGD_somfAddAll 1
  210.     #else
  211.         #define _somfAddAll somf_TCollection_somfAddAll
  212.     #endif /* _somfAddAll */
  213. #endif /* SOMGD_somfAddAll */
  214.  
  215. /*
  216.  * New Method: somfRemove
  217.  */
  218. typedef somf_MCollectible*   SOMLINK somTP_somf_TCollection_somfRemove(somf_TCollection *somSelf, Environment *ev, 
  219.         somf_MCollectible* obj);
  220. #pragma linkage(somTP_somf_TCollection_somfRemove, system)
  221. typedef somTP_somf_TCollection_somfRemove *somTD_somf_TCollection_somfRemove;
  222. /*
  223.  *  Remove obj from this.  Return the object which was actually removed
  224.  *  (which if you are using an IsEqual test function may not be the same as the
  225.  *  object passed in only "equal")
  226.  */
  227. #define somMD_somf_TCollection_somfRemove "::somf_TCollection::somfRemove"
  228. #define somf_TCollection_somfRemove(somSelf,ev,obj) \
  229.     (SOM_Resolve(somSelf, somf_TCollection, somfRemove) \
  230.     (somSelf,ev,obj))
  231. #ifndef SOMGD_somfRemove
  232.     #if (defined(_somfRemove) || defined(__somfRemove))
  233.         #undef _somfRemove
  234.         #undef __somfRemove
  235.         #define SOMGD_somfRemove 1
  236.     #else
  237.         #define _somfRemove somf_TCollection_somfRemove
  238.     #endif /* _somfRemove */
  239. #endif /* SOMGD_somfRemove */
  240.  
  241. /*
  242.  * New Method: somfRemoveAll
  243.  */
  244. typedef void   SOMLINK somTP_somf_TCollection_somfRemoveAll(somf_TCollection *somSelf, Environment *ev);
  245. #pragma linkage(somTP_somf_TCollection_somfRemoveAll, system)
  246. typedef somTP_somf_TCollection_somfRemoveAll *somTD_somf_TCollection_somfRemoveAll;
  247. /*
  248.  *  Remove all of the objects from this.
  249.  */
  250. #define somMD_somf_TCollection_somfRemoveAll "::somf_TCollection::somfRemoveAll"
  251. #define somf_TCollection_somfRemoveAll(somSelf,ev) \
  252.     (SOM_Resolve(somSelf, somf_TCollection, somfRemoveAll) \
  253.     (somSelf,ev))
  254. #ifndef SOMGD_somfRemoveAll
  255.     #if (defined(_somfRemoveAll) || defined(__somfRemoveAll))
  256.         #undef _somfRemoveAll
  257.         #undef __somfRemoveAll
  258.         #define SOMGD_somfRemoveAll 1
  259.     #else
  260.         #define _somfRemoveAll somf_TCollection_somfRemoveAll
  261.     #endif /* _somfRemoveAll */
  262. #endif /* SOMGD_somfRemoveAll */
  263.  
  264. /*
  265.  * New Method: somfDeleteAll
  266.  */
  267. typedef void   SOMLINK somTP_somf_TCollection_somfDeleteAll(somf_TCollection *somSelf, Environment *ev);
  268. #pragma linkage(somTP_somf_TCollection_somfDeleteAll, system)
  269. typedef somTP_somf_TCollection_somfDeleteAll *somTD_somf_TCollection_somfDeleteAll;
  270. /*
  271.  *  Remove all of the objects from this and deallocate the storage that these
  272.  *  objects might have owned (that is, the destructor function is called
  273.  *  for each object in the collection).
  274.  */
  275. #define somMD_somf_TCollection_somfDeleteAll "::somf_TCollection::somfDeleteAll"
  276. #define somf_TCollection_somfDeleteAll(somSelf,ev) \
  277.     (SOM_Resolve(somSelf, somf_TCollection, somfDeleteAll) \
  278.     (somSelf,ev))
  279. #ifndef SOMGD_somfDeleteAll
  280.     #if (defined(_somfDeleteAll) || defined(__somfDeleteAll))
  281.         #undef _somfDeleteAll
  282.         #undef __somfDeleteAll
  283.         #define SOMGD_somfDeleteAll 1
  284.     #else
  285.         #define _somfDeleteAll somf_TCollection_somfDeleteAll
  286.     #endif /* _somfDeleteAll */
  287. #endif /* SOMGD_somfDeleteAll */
  288.  
  289. /*
  290.  * New Method: somfCount
  291.  */
  292. typedef long   SOMLINK somTP_somf_TCollection_somfCount(somf_TCollection *somSelf, Environment *ev);
  293. #pragma linkage(somTP_somf_TCollection_somfCount, system)
  294. typedef somTP_somf_TCollection_somfCount *somTD_somf_TCollection_somfCount;
  295. /*
  296.  *  Return the number of objects in this.
  297.  */
  298. #define somMD_somf_TCollection_somfCount "::somf_TCollection::somfCount"
  299. #define somf_TCollection_somfCount(somSelf,ev) \
  300.     (SOM_Resolve(somSelf, somf_TCollection, somfCount) \
  301.     (somSelf,ev))
  302. #ifndef SOMGD_somfCount
  303.     #if (defined(_somfCount) || defined(__somfCount))
  304.         #undef _somfCount
  305.         #undef __somfCount
  306.         #define SOMGD_somfCount 1
  307.     #else
  308.         #define _somfCount somf_TCollection_somfCount
  309.     #endif /* _somfCount */
  310. #endif /* SOMGD_somfCount */
  311.  
  312. /*
  313.  * New Method: somfMember
  314.  */
  315. typedef somf_MCollectible*   SOMLINK somTP_somf_TCollection_somfMember(somf_TCollection *somSelf, Environment *ev, 
  316.         somf_MCollectible* obj);
  317. #pragma linkage(somTP_somf_TCollection_somfMember, system)
  318. typedef somTP_somf_TCollection_somfMember *somTD_somf_TCollection_somfMember;
  319. /*
  320.  *  Each object in this is compared to obj using the function testFn.  Return the
  321.  *  object for which testFn returned TRUE.  Return SOMF_NIL if not object was found.
  322.  */
  323. #define somMD_somf_TCollection_somfMember "::somf_TCollection::somfMember"
  324. #define somf_TCollection_somfMember(somSelf,ev,obj) \
  325.     (SOM_Resolve(somSelf, somf_TCollection, somfMember) \
  326.     (somSelf,ev,obj))
  327. #ifndef SOMGD_somfMember
  328.     #if (defined(_somfMember) || defined(__somfMember))
  329.         #undef _somfMember
  330.         #undef __somfMember
  331.         #define SOMGD_somfMember 1
  332.     #else
  333.         #define _somfMember somf_TCollection_somfMember
  334.     #endif /* _somfMember */
  335. #endif /* SOMGD_somfMember */
  336.  
  337. /*
  338.  * New Method: somfCreateIterator
  339.  */
  340. typedef somf_TIterator*   SOMLINK somTP_somf_TCollection_somfCreateIterator(somf_TCollection *somSelf, Environment *ev);
  341. #pragma linkage(somTP_somf_TCollection_somfCreateIterator, system)
  342. typedef somTP_somf_TCollection_somfCreateIterator *somTD_somf_TCollection_somfCreateIterator;
  343. /*
  344.  *  This method returns a new iterator which is suitable for use in iterating
  345.  *  over the objects in this collection.
  346.  */
  347. #define somMD_somf_TCollection_somfCreateIterator "::somf_TCollection::somfCreateIterator"
  348. #define somf_TCollection_somfCreateIterator(somSelf,ev) \
  349.     (SOM_Resolve(somSelf, somf_TCollection, somfCreateIterator) \
  350.     (somSelf,ev))
  351. #ifndef SOMGD_somfCreateIterator
  352.     #if (defined(_somfCreateIterator) || defined(__somfCreateIterator))
  353.         #undef _somfCreateIterator
  354.         #undef __somfCreateIterator
  355.         #define SOMGD_somfCreateIterator 1
  356.     #else
  357.         #define _somfCreateIterator somf_TCollection_somfCreateIterator
  358.     #endif /* _somfCreateIterator */
  359. #endif /* SOMGD_somfCreateIterator */
  360.  
  361. /*
  362.  * New Method: somfTestFunction
  363.  */
  364. typedef somf_MCollectible_somf_MCollectibleCompareFn   SOMLINK somTP_somf_TCollection_somfTestFunction(somf_TCollection *somSelf, Environment *ev);
  365. #pragma linkage(somTP_somf_TCollection_somfTestFunction, system)
  366. typedef somTP_somf_TCollection_somfTestFunction *somTD_somf_TCollection_somfTestFunction;
  367. /*
  368.  *  Return the test function.  This is usually either IsSame or IsEqual.
  369.  */
  370. #define somMD_somf_TCollection_somfTestFunction "::somf_TCollection::somfTestFunction"
  371. #define somf_TCollection_somfTestFunction(somSelf,ev) \
  372.     (SOM_Resolve(somSelf, somf_TCollection, somfTestFunction) \
  373.     (somSelf,ev))
  374. #ifndef SOMGD_somfTestFunction
  375.     #if (defined(_somfTestFunction) || defined(__somfTestFunction))
  376.         #undef _somfTestFunction
  377.         #undef __somfTestFunction
  378.         #define SOMGD_somfTestFunction 1
  379.     #else
  380.         #define _somfTestFunction somf_TCollection_somfTestFunction
  381.     #endif /* _somfTestFunction */
  382. #endif /* SOMGD_somfTestFunction */
  383.  
  384. /*
  385.  * New Method: somfSetTestFunction
  386.  */
  387. typedef void   SOMLINK somTP_somf_TCollection_somfSetTestFunction(somf_TCollection *somSelf, Environment *ev, 
  388.         somf_MCollectible_somf_MCollectibleCompareFn testfn);
  389. #pragma linkage(somTP_somf_TCollection_somfSetTestFunction, system)
  390. typedef somTP_somf_TCollection_somfSetTestFunction *somTD_somf_TCollection_somfSetTestFunction;
  391. /*
  392.  *  Set the test function.
  393.  */
  394. #define somMD_somf_TCollection_somfSetTestFunction "::somf_TCollection::somfSetTestFunction"
  395. #define somf_TCollection_somfSetTestFunction(somSelf,ev,testfn) \
  396.     (SOM_Resolve(somSelf, somf_TCollection, somfSetTestFunction) \
  397.     (somSelf,ev,testfn))
  398. #ifndef SOMGD_somfSetTestFunction
  399.     #if (defined(_somfSetTestFunction) || defined(__somfSetTestFunction))
  400.         #undef _somfSetTestFunction
  401.         #undef __somfSetTestFunction
  402.         #define SOMGD_somfSetTestFunction 1
  403.     #else
  404.         #define _somfSetTestFunction somf_TCollection_somfSetTestFunction
  405.     #endif /* _somfSetTestFunction */
  406. #endif /* SOMGD_somfSetTestFunction */
  407.  
  408. /*
  409.  * New Method: somfTCollectionInit
  410.  */
  411. typedef somf_TCollection*   SOMLINK somTP_somf_TCollection_somfTCollectionInit(somf_TCollection *somSelf, Environment *ev, 
  412.         somf_MCollectible_somf_MCollectibleCompareFn testfn);
  413. #pragma linkage(somTP_somf_TCollection_somfTCollectionInit, system)
  414. typedef somTP_somf_TCollection_somfTCollectionInit *somTD_somf_TCollection_somfTCollectionInit;
  415. /*
  416.  *  Initialize the somf_TCollection test function to testfn.
  417.  */
  418. #define somMD_somf_TCollection_somfTCollectionInit "::somf_TCollection::somfTCollectionInit"
  419. #define somf_TCollection_somfTCollectionInit(somSelf,ev,testfn) \
  420.     (SOM_Resolve(somSelf, somf_TCollection, somfTCollectionInit) \
  421.     (somSelf,ev,testfn))
  422. #ifndef SOMGD_somfTCollectionInit
  423.     #if (defined(_somfTCollectionInit) || defined(__somfTCollectionInit))
  424.         #undef _somfTCollectionInit
  425.         #undef __somfTCollectionInit
  426.         #define SOMGD_somfTCollectionInit 1
  427.     #else
  428.         #define _somfTCollectionInit somf_TCollection_somfTCollectionInit
  429.     #endif /* _somfTCollectionInit */
  430. #endif /* SOMGD_somfTCollectionInit */
  431. #ifndef SOM_DONT_USE_INHERITED_MACROS
  432. #define somf_TCollection_somfClone somf_MCollectible_somfClone
  433. #define somf_TCollection_somfClonePointer somf_MCollectible_somfClonePointer
  434. #define somf_TCollection_somfHash somf_MCollectible_somfHash
  435. #define somf_TCollection_somfIsSame somf_MCollectible_somfIsSame
  436. #define somf_TCollection_somfIsNotEqual somf_MCollectible_somfIsNotEqual
  437. #define somf_TCollection_somDefaultInit SOMObject_somDefaultInit
  438. #define somf_TCollection_somDestruct SOMObject_somDestruct
  439. #define somf_TCollection_somDefaultCopyInit SOMObject_somDefaultCopyInit
  440. #define somf_TCollection_somDefaultAssign SOMObject_somDefaultAssign
  441. #define somf_TCollection_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  442. #define somf_TCollection_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  443. #define somf_TCollection_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  444. #define somf_TCollection_somDefaultConstAssign SOMObject_somDefaultConstAssign
  445. #define somf_TCollection_somDefaultVAssign SOMObject_somDefaultVAssign
  446. #define somf_TCollection_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  447. #define somf_TCollection_somInit SOMObject_somInit
  448. #define somf_TCollection_somFree SOMObject_somFree
  449. #define somf_TCollection_somUninit SOMObject_somUninit
  450. #define somf_TCollection_somGetClass SOMObject_somGetClass
  451. #define somf_TCollection_somGetClassName SOMObject_somGetClassName
  452. #define somf_TCollection_somGetSize SOMObject_somGetSize
  453. #define somf_TCollection_somIsA SOMObject_somIsA
  454. #define somf_TCollection_somIsInstanceOf SOMObject_somIsInstanceOf
  455. #define somf_TCollection_somRespondsTo SOMObject_somRespondsTo
  456. #define somf_TCollection_somDispatch SOMObject_somDispatch
  457. #define somf_TCollection_somClassDispatch SOMObject_somClassDispatch
  458. #define somf_TCollection_somCastObj SOMObject_somCastObj
  459. #define somf_TCollection_somResetObj SOMObject_somResetObj
  460. #define somf_TCollection_somDispatchV SOMObject_somDispatchV
  461. #define somf_TCollection_somDispatchL SOMObject_somDispatchL
  462. #define somf_TCollection_somDispatchA SOMObject_somDispatchA
  463. #define somf_TCollection_somDispatchD SOMObject_somDispatchD
  464. #define somf_TCollection_somPrintSelf SOMObject_somPrintSelf
  465. #define somf_TCollection_somDumpSelf SOMObject_somDumpSelf
  466. #define somf_TCollection_somDumpSelfInt SOMObject_somDumpSelfInt
  467. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  468.  
  469. #endif       /* SOM_somf_TCollection_h */
  470.