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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: iogrp.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emith: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somp
  12.  * 
  13.  *    ORIGINS: 27
  14.  * 
  15.  * 
  16.  *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,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.  */
  23.  
  24.  
  25. #ifndef SOM_SOMPIOGroup_h
  26. #define SOM_SOMPIOGroup_h
  27.  
  28.  
  29. #include <som.h>
  30.  
  31. /*
  32.  * -- This emitter treats Method Tokens as Thunks by default.
  33.  * -- Use the sc modifier "nothunks" to change this default
  34.  */
  35. #undef somresolve_
  36. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  37.  
  38. /*
  39.  * Define the class name as an object type
  40.  */
  41. #ifndef SOMPIOGroup
  42. #define SOMPIOGroup SOMObject
  43. #endif
  44. /*
  45.  *  An IOGroup is a collection of objects which have been grouped
  46.  *  together with the intention that they will be written/read to/from
  47.  *  a storage media at the same time. For example, the group of objects
  48.  *  could be stored in the same file.
  49.  * 
  50.  *  Objects are added, located and removed from the group via an integer
  51.  *  key.
  52.  */
  53. #include <srkset.h>
  54.  
  55. /*
  56.  * Start of bindings for IDL types
  57.  */
  58.  
  59. #ifndef SOMClass
  60.     #define SOMClass SOMObject
  61. #endif /* SOMClass */
  62. #ifndef SOMPPersistentId
  63.     #define SOMPPersistentId SOMObject
  64. #endif /* SOMPPersistentId */
  65. #ifndef SOMPPersistentObject
  66.     #define SOMPPersistentObject SOMObject
  67. #endif /* SOMPPersistentObject */
  68. #ifndef SOMPIteratorHandle
  69.     #define SOMPIteratorHandle SOMObject
  70. #endif /* SOMPIteratorHandle */
  71. typedef
  72. long  SOMPIOGroup_SOMPIOGroupKey;
  73.  
  74. #ifndef SOM_DONT_USE_SHORT_NAMES
  75. #ifndef SOMTGD_SOMPIOGroupKey
  76.     #ifdef SOMPIOGroupKey
  77.         #undef SOMPIOGroupKey
  78.         #define SOMTGD_SOMPIOGroupKey 1
  79.     #else
  80.         #define SOMPIOGroupKey SOMPIOGroup_SOMPIOGroupKey
  81.     #endif /* SOMPIOGroupKey */
  82. #endif /* SOMTGD_SOMPIOGroupKey */
  83. #endif /* SOM_DONT_USE_SHORT_NAMES */
  84.  
  85. /*
  86.  * End of bindings for IDL types.
  87.  */
  88.  
  89. #define SOMPIOGroup_MajorVersion 2
  90. #define SOMPIOGroup_MinorVersion 1
  91.  
  92. /*
  93.  * External name shortening if required
  94.  */
  95. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  96. #define SOMPIOGroupNewClass c
  97. #pragma linkage(c, system)
  98. #define SOMPIOGroupClassData d
  99. #define SOMPIOGroupCClassData x
  100. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  101. /*--------------Migration------------*/
  102. #define SOMPIOGroup_classObj SOMPIOGroupClassData.classObject
  103. #define _SOMPIOGroup SOMPIOGroup_classObj
  104.  
  105. /*
  106.  * Declare the class creation procedure
  107.  */
  108. SOMEXTERN SOMClass * SOMLINK SOMPIOGroupNewClass(integer4 somtmajorVersion,
  109.         integer4 somtminorVersion);
  110. #pragma linkage(SOMPIOGroupNewClass, system)
  111.  
  112. /*
  113.  * Declare the class data structure
  114.  */
  115. SOMEXTERN struct SOMPIOGroupClassDataStructure {
  116.     SOMClass *classObject;
  117.     somMToken sompGetLastOffset;
  118.     somMToken sompGetNextAvailableOffset;
  119.     somMToken sompSetLastOffset;
  120.     somMToken sompFindById;
  121.     somMToken sompSetGroupName;
  122.     somMToken sompGetGroupName;
  123.     somMToken sompCount;
  124.     somMToken sompFirst;
  125.     somMToken sompNewIterator;
  126.     somMToken sompNextObjectInGroup;
  127.     somMToken sompFreeIterator;
  128.     somMToken sompAddToGroup;
  129.     somMToken sompRemoveFromGroup;
  130.     somMToken sompFindByKey;
  131. } SOMDLINK SOMPIOGroupClassData;
  132.  
  133. /*
  134.  * Declare the C specific class data structure
  135.  */
  136. SOMEXTERN struct SOMPIOGroupCClassDataStructure {
  137.     somMethodTabs parentMtab;
  138.     somDToken instanceDataToken;
  139. } SOMDLINK SOMPIOGroupCClassData;
  140.  
  141. /*
  142.  * New and Renew macros for SOMPIOGroup
  143.  */
  144. #define SOMPIOGroupNew() \
  145.    ( _SOMPIOGroup ? \
  146.     _somNew(_SOMPIOGroup) \
  147.     : ( SOMPIOGroupNewClass(\
  148.         SOMPIOGroup_MajorVersion, \
  149.         SOMPIOGroup_MinorVersion),\
  150.        _somNew(_SOMPIOGroup)))
  151. #define SOMPIOGroupRenew(buf) \
  152.    ( _SOMPIOGroup ? \
  153.     _somRenew(_SOMPIOGroup, buf) \
  154.     : ( SOMPIOGroupNewClass(\
  155.         SOMPIOGroup_MajorVersion, \
  156.         SOMPIOGroup_MinorVersion),\
  157.        _somRenew(_SOMPIOGroup, buf)))
  158.  
  159. /*
  160.  * Override method: somInit
  161.  */
  162. #define SOMPIOGroup_somInit(somSelf) \
  163.     SOMObject_somInit(somSelf)
  164.  
  165. /*
  166.  * Override method: somUninit
  167.  */
  168. #define SOMPIOGroup_somUninit(somSelf) \
  169.     SOMObject_somUninit(somSelf)
  170.  
  171. /*
  172.  * Override method: somDumpSelfInt
  173.  */
  174. #define SOMPIOGroup_somDumpSelfInt(somSelf,level) \
  175.     SOMObject_somDumpSelfInt(somSelf,level)
  176.  
  177. /*
  178.  * New Method: sompCount
  179.  */
  180. typedef long   SOMLINK somTP_SOMPIOGroup_sompCount(SOMPIOGroup *somSelf, Environment *ev);
  181. #pragma linkage(somTP_SOMPIOGroup_sompCount, system)
  182. typedef somTP_SOMPIOGroup_sompCount *somTD_SOMPIOGroup_sompCount;
  183. /*
  184.  *  Returns the number of objects in this group
  185.  */
  186. #define somMD_SOMPIOGroup_sompCount "::SOMPIOGroup::sompCount"
  187. #define SOMPIOGroup_sompCount(somSelf,ev) \
  188.     (SOM_Resolve(somSelf, SOMPIOGroup, sompCount) \
  189.     (somSelf,ev))
  190. #ifndef SOMGD_sompCount
  191.     #if (defined(_sompCount) || defined(__sompCount))
  192.         #undef _sompCount
  193.         #undef __sompCount
  194.         #define SOMGD_sompCount 1
  195.     #else
  196.         #define _sompCount SOMPIOGroup_sompCount
  197.     #endif /* _sompCount */
  198. #endif /* SOMGD_sompCount */
  199.  
  200. /*
  201.  * New Method: sompFirst
  202.  */
  203. typedef SOMObject*   SOMLINK somTP_SOMPIOGroup_sompFirst(SOMPIOGroup *somSelf, Environment *ev);
  204. #pragma linkage(somTP_SOMPIOGroup_sompFirst, system)
  205. typedef somTP_SOMPIOGroup_sompFirst *somTD_SOMPIOGroup_sompFirst;
  206. /*
  207.  *  Returns the first available object in the group. The object returned
  208.  *  is not based on any ordering, it is simply the one closest at hand.
  209.  */
  210. #define somMD_SOMPIOGroup_sompFirst "::SOMPIOGroup::sompFirst"
  211. #define SOMPIOGroup_sompFirst(somSelf,ev) \
  212.     (SOM_Resolve(somSelf, SOMPIOGroup, sompFirst) \
  213.     (somSelf,ev))
  214. #ifndef SOMGD_sompFirst
  215.     #if (defined(_sompFirst) || defined(__sompFirst))
  216.         #undef _sompFirst
  217.         #undef __sompFirst
  218.         #define SOMGD_sompFirst 1
  219.     #else
  220.         #define _sompFirst SOMPIOGroup_sompFirst
  221.     #endif /* _sompFirst */
  222. #endif /* SOMGD_sompFirst */
  223.  
  224. /*
  225.  * New Method: sompNewIterator
  226.  */
  227. typedef SOMPIteratorHandle*   SOMLINK somTP_SOMPIOGroup_sompNewIterator(SOMPIOGroup *somSelf, Environment *ev);
  228. #pragma linkage(somTP_SOMPIOGroup_sompNewIterator, system)
  229. typedef somTP_SOMPIOGroup_sompNewIterator *somTD_SOMPIOGroup_sompNewIterator;
  230. /*
  231.  *  Returns a handle which can be used with the sompNextObjectInGroup
  232.  *  method of this class to iterate through all the objects contained
  233.  *  by an instance of this class.
  234.  */
  235. #define somMD_SOMPIOGroup_sompNewIterator "::SOMPIOGroup::sompNewIterator"
  236. #define SOMPIOGroup_sompNewIterator(somSelf,ev) \
  237.     (SOM_Resolve(somSelf, SOMPIOGroup, sompNewIterator) \
  238.     (somSelf,ev))
  239. #ifndef SOMGD_sompNewIterator
  240.     #if (defined(_sompNewIterator) || defined(__sompNewIterator))
  241.         #undef _sompNewIterator
  242.         #undef __sompNewIterator
  243.         #define SOMGD_sompNewIterator 1
  244.     #else
  245.         #define _sompNewIterator SOMPIOGroup_sompNewIterator
  246.     #endif /* _sompNewIterator */
  247. #endif /* SOMGD_sompNewIterator */
  248.  
  249. /*
  250.  * New Method: sompNextObjectInGroup
  251.  */
  252. typedef SOMObject*   SOMLINK somTP_SOMPIOGroup_sompNextObjectInGroup(SOMPIOGroup *somSelf, Environment *ev, 
  253.         SOMPIteratorHandle* iteratorHandle);
  254. #pragma linkage(somTP_SOMPIOGroup_sompNextObjectInGroup, system)
  255. typedef somTP_SOMPIOGroup_sompNextObjectInGroup *somTD_SOMPIOGroup_sompNextObjectInGroup;
  256. /*
  257.  *  Return the next object in the group. If there are no more objects left,
  258.  *  it returns NULL.
  259.  * 
  260.  *  Example use:
  261.  * 
  262.  *  hit = _sompNewIterator(myGroup)
  263.  *  while (obj = _sompNextObjectInGroup(hit)) {
  264.  *     ...
  265.  *     use obj
  266.  *     ...
  267.  *     }
  268.  *  _sompFreeIterator(hit);
  269.  */
  270. #define somMD_SOMPIOGroup_sompNextObjectInGroup "::SOMPIOGroup::sompNextObjectInGroup"
  271. #define SOMPIOGroup_sompNextObjectInGroup(somSelf,ev,iteratorHandle) \
  272.     (SOM_Resolve(somSelf, SOMPIOGroup, sompNextObjectInGroup) \
  273.     (somSelf,ev,iteratorHandle))
  274. #ifndef SOMGD_sompNextObjectInGroup
  275.     #if (defined(_sompNextObjectInGroup) || defined(__sompNextObjectInGroup))
  276.         #undef _sompNextObjectInGroup
  277.         #undef __sompNextObjectInGroup
  278.         #define SOMGD_sompNextObjectInGroup 1
  279.     #else
  280.         #define _sompNextObjectInGroup SOMPIOGroup_sompNextObjectInGroup
  281.     #endif /* _sompNextObjectInGroup */
  282. #endif /* SOMGD_sompNextObjectInGroup */
  283.  
  284. /*
  285.  * New Method: sompFreeIterator
  286.  */
  287. typedef void   SOMLINK somTP_SOMPIOGroup_sompFreeIterator(SOMPIOGroup *somSelf, Environment *ev, 
  288.         SOMPIteratorHandle* iteratorHandle);
  289. #pragma linkage(somTP_SOMPIOGroup_sompFreeIterator, system)
  290. typedef somTP_SOMPIOGroup_sompFreeIterator *somTD_SOMPIOGroup_sompFreeIterator;
  291. /*
  292.  *  Free the resources used by the given iterator.
  293.  */
  294. #define somMD_SOMPIOGroup_sompFreeIterator "::SOMPIOGroup::sompFreeIterator"
  295. #define SOMPIOGroup_sompFreeIterator(somSelf,ev,iteratorHandle) \
  296.     (SOM_Resolve(somSelf, SOMPIOGroup, sompFreeIterator) \
  297.     (somSelf,ev,iteratorHandle))
  298. #ifndef SOMGD_sompFreeIterator
  299.     #if (defined(_sompFreeIterator) || defined(__sompFreeIterator))
  300.         #undef _sompFreeIterator
  301.         #undef __sompFreeIterator
  302.         #define SOMGD_sompFreeIterator 1
  303.     #else
  304.         #define _sompFreeIterator SOMPIOGroup_sompFreeIterator
  305.     #endif /* _sompFreeIterator */
  306. #endif /* SOMGD_sompFreeIterator */
  307.  
  308. /*
  309.  * New Method: sompAddToGroup
  310.  */
  311. typedef void   SOMLINK somTP_SOMPIOGroup_sompAddToGroup(SOMPIOGroup *somSelf, Environment *ev, 
  312.         SOMObject* newObject, 
  313.         SOMPIOGroup_SOMPIOGroupKey key);
  314. #pragma linkage(somTP_SOMPIOGroup_sompAddToGroup, system)
  315. typedef somTP_SOMPIOGroup_sompAddToGroup *somTD_SOMPIOGroup_sompAddToGroup;
  316. /*
  317.  *  Adds the given object to this group of objects. The given key for
  318.  *  the new object must be unique among all the other objects in
  319.  *  this group.
  320.  */
  321. #define somMD_SOMPIOGroup_sompAddToGroup "::SOMPIOGroup::sompAddToGroup"
  322. #define SOMPIOGroup_sompAddToGroup(somSelf,ev,newObject,key) \
  323.     (SOM_Resolve(somSelf, SOMPIOGroup, sompAddToGroup) \
  324.     (somSelf,ev,newObject,key))
  325. #ifndef SOMGD_sompAddToGroup
  326.     #if (defined(_sompAddToGroup) || defined(__sompAddToGroup))
  327.         #undef _sompAddToGroup
  328.         #undef __sompAddToGroup
  329.         #define SOMGD_sompAddToGroup 1
  330.     #else
  331.         #define _sompAddToGroup SOMPIOGroup_sompAddToGroup
  332.     #endif /* _sompAddToGroup */
  333. #endif /* SOMGD_sompAddToGroup */
  334.  
  335. /*
  336.  * New Method: sompRemoveFromGroup
  337.  */
  338. typedef SOMObject*   SOMLINK somTP_SOMPIOGroup_sompRemoveFromGroup(SOMPIOGroup *somSelf, Environment *ev, 
  339.         SOMPIOGroup_SOMPIOGroupKey key);
  340. #pragma linkage(somTP_SOMPIOGroup_sompRemoveFromGroup, system)
  341. typedef somTP_SOMPIOGroup_sompRemoveFromGroup *somTD_SOMPIOGroup_sompRemoveFromGroup;
  342. /*
  343.  *  Remove from the group and return the object with the given key value.
  344.  */
  345. #define somMD_SOMPIOGroup_sompRemoveFromGroup "::SOMPIOGroup::sompRemoveFromGroup"
  346. #define SOMPIOGroup_sompRemoveFromGroup(somSelf,ev,key) \
  347.     (SOM_Resolve(somSelf, SOMPIOGroup, sompRemoveFromGroup) \
  348.     (somSelf,ev,key))
  349. #ifndef SOMGD_sompRemoveFromGroup
  350.     #if (defined(_sompRemoveFromGroup) || defined(__sompRemoveFromGroup))
  351.         #undef _sompRemoveFromGroup
  352.         #undef __sompRemoveFromGroup
  353.         #define SOMGD_sompRemoveFromGroup 1
  354.     #else
  355.         #define _sompRemoveFromGroup SOMPIOGroup_sompRemoveFromGroup
  356.     #endif /* _sompRemoveFromGroup */
  357. #endif /* SOMGD_sompRemoveFromGroup */
  358.  
  359. /*
  360.  * New Method: sompFindByKey
  361.  */
  362. typedef SOMObject*   SOMLINK somTP_SOMPIOGroup_sompFindByKey(SOMPIOGroup *somSelf, Environment *ev, 
  363.         SOMPIOGroup_SOMPIOGroupKey key);
  364. #pragma linkage(somTP_SOMPIOGroup_sompFindByKey, system)
  365. typedef somTP_SOMPIOGroup_sompFindByKey *somTD_SOMPIOGroup_sompFindByKey;
  366. /*
  367.  *  Return the object with the given key value.
  368.  */
  369. #define somMD_SOMPIOGroup_sompFindByKey "::SOMPIOGroup::sompFindByKey"
  370. #define SOMPIOGroup_sompFindByKey(somSelf,ev,key) \
  371.     (SOM_Resolve(somSelf, SOMPIOGroup, sompFindByKey) \
  372.     (somSelf,ev,key))
  373. #ifndef SOMGD_sompFindByKey
  374.     #if (defined(_sompFindByKey) || defined(__sompFindByKey))
  375.         #undef _sompFindByKey
  376.         #undef __sompFindByKey
  377.         #define SOMGD_sompFindByKey 1
  378.     #else
  379.         #define _sompFindByKey SOMPIOGroup_sompFindByKey
  380.     #endif /* _sompFindByKey */
  381. #endif /* SOMGD_sompFindByKey */
  382. #ifndef SOM_DONT_USE_INHERITED_MACROS
  383. #define SOMPIOGroup_sompGetFirstObject SOMPKeyedSet_sompGetFirstObject
  384. #define SOMPIOGroup_somDefaultInit SOMObject_somDefaultInit
  385. #define SOMPIOGroup_somDestruct SOMObject_somDestruct
  386. #define SOMPIOGroup_somDefaultCopyInit SOMObject_somDefaultCopyInit
  387. #define SOMPIOGroup_somDefaultAssign SOMObject_somDefaultAssign
  388. #define SOMPIOGroup_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  389. #define SOMPIOGroup_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  390. #define SOMPIOGroup_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  391. #define SOMPIOGroup_somDefaultConstAssign SOMObject_somDefaultConstAssign
  392. #define SOMPIOGroup_somDefaultVAssign SOMObject_somDefaultVAssign
  393. #define SOMPIOGroup_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  394. #define SOMPIOGroup_somFree SOMObject_somFree
  395. #define SOMPIOGroup_somGetClass SOMObject_somGetClass
  396. #define SOMPIOGroup_somGetClassName SOMObject_somGetClassName
  397. #define SOMPIOGroup_somGetSize SOMObject_somGetSize
  398. #define SOMPIOGroup_somIsA SOMObject_somIsA
  399. #define SOMPIOGroup_somIsInstanceOf SOMObject_somIsInstanceOf
  400. #define SOMPIOGroup_somRespondsTo SOMObject_somRespondsTo
  401. #define SOMPIOGroup_somDispatch SOMObject_somDispatch
  402. #define SOMPIOGroup_somClassDispatch SOMObject_somClassDispatch
  403. #define SOMPIOGroup_somCastObj SOMObject_somCastObj
  404. #define SOMPIOGroup_somResetObj SOMObject_somResetObj
  405. #define SOMPIOGroup_somDispatchV SOMObject_somDispatchV
  406. #define SOMPIOGroup_somDispatchL SOMObject_somDispatchL
  407. #define SOMPIOGroup_somDispatchA SOMObject_somDispatchA
  408. #define SOMPIOGroup_somDispatchD SOMObject_somDispatchD
  409. #define SOMPIOGroup_somPrintSelf SOMObject_somPrintSelf
  410. #define SOMPIOGroup_somDumpSelf SOMObject_somDumpSelf
  411. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  412.  
  413. #endif       /* SOM_SOMPIOGroup_h */
  414.