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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: sombacls.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emith: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somu
  12.  * 
  13.  *    ORIGINS: 27
  14.  * 
  15.  * 
  16.  *    10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  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_SOMMBeforeAfter_h
  26. #define SOM_SOMMBeforeAfter_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 SOMMBeforeAfter
  42. #define SOMMBeforeAfter SOMObject
  43. #endif
  44. #include <somcls.h>
  45.  
  46. /*
  47.  * Start of bindings for IDL types
  48.  */
  49.  
  50. #ifndef SOMClass
  51.     #define SOMClass SOMObject
  52. #endif /* SOMClass */
  53.  
  54. /*
  55.  * End of bindings for IDL types.
  56.  */
  57.  
  58. #define SOMMBeforeAfter_MajorVersion 2
  59. #define SOMMBeforeAfter_MinorVersion 1
  60.  
  61. /*
  62.  * External name shortening if required
  63.  */
  64. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  65. #define SOMMBeforeAfterNewClass c
  66. #pragma linkage(c, system)
  67. #define SOMMBeforeAfterClassData d
  68. #define SOMMBeforeAfterCClassData x
  69. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  70. /*--------------Migration------------*/
  71. #define SOMMBeforeAfter_classObj SOMMBeforeAfterClassData.classObject
  72. #define _SOMMBeforeAfter SOMMBeforeAfter_classObj
  73.  
  74. /*
  75.  * Declare the class creation procedure
  76.  */
  77. SOMEXTERN SOMClass * SOMLINK SOMMBeforeAfterNewClass(integer4 somtmajorVersion,
  78.         integer4 somtminorVersion);
  79. #pragma linkage(SOMMBeforeAfterNewClass, system)
  80.  
  81. /*
  82.  * Declare the class data structure
  83.  */
  84. SOMEXTERN struct SOMMBeforeAfterClassDataStructure {
  85.     SOMClass *classObject;
  86.     somMToken sommBeforeMethod;
  87.     somMToken sommAfterMethod;
  88. } SOMDLINK SOMMBeforeAfterClassData;
  89.  
  90. /*
  91.  * Declare the C specific class data structure
  92.  */
  93. SOMEXTERN struct SOMMBeforeAfterCClassDataStructure {
  94.     somMethodTabs parentMtab;
  95.     somDToken instanceDataToken;
  96.     somMethodProc *sommBeforeMethod;
  97.     somMethodProc *sommAfterMethod;
  98. } SOMDLINK SOMMBeforeAfterCClassData;
  99.  
  100. /*
  101.  * New and Renew macros for SOMMBeforeAfter
  102.  */
  103. #define SOMMBeforeAfterNew() \
  104.    ( _SOMMBeforeAfter ? \
  105.     _somNew(_SOMMBeforeAfter) \
  106.     : ( SOMMBeforeAfterNewClass(\
  107.         SOMMBeforeAfter_MajorVersion, \
  108.         SOMMBeforeAfter_MinorVersion),\
  109.        _somNew(_SOMMBeforeAfter)))
  110. #define SOMMBeforeAfterRenew(buf) \
  111.    ( _SOMMBeforeAfter ? \
  112.     _somRenew(_SOMMBeforeAfter, buf) \
  113.     : ( SOMMBeforeAfterNewClass(\
  114.         SOMMBeforeAfter_MajorVersion, \
  115.         SOMMBeforeAfter_MinorVersion),\
  116.        _somRenew(_SOMMBeforeAfter, buf)))
  117.  
  118. /*
  119.  * Override method: somDefaultInit
  120.  */
  121. #define SOMMBeforeAfter_somDefaultInit(somSelf,ctrl) \
  122.     SOMObject_somDefaultInit(somSelf,ctrl)
  123.  
  124. /*
  125.  * Override method: somInitMIClass
  126.  */
  127. #define SOMMBeforeAfter_somInitMIClass(somSelf,inherit_vars,className,parentClasses,dataSize,dataAlignment,maxStaticMethods,majorVersion,minorVersion) \
  128.     SOMClass_somInitMIClass(somSelf,inherit_vars,className,parentClasses,dataSize,dataAlignment,maxStaticMethods,majorVersion,minorVersion)
  129.  
  130. /*
  131.  * New Method: sommBeforeMethod
  132.  */
  133. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_sommBeforeMethod(SOMMBeforeAfter *somSelf, Environment *ev, 
  134.         SOMObject* object, 
  135.         somId methodId, 
  136.         va_list ap);
  137. #pragma linkage(somTP_SOMMBeforeAfter_sommBeforeMethod, system)
  138. typedef somTP_SOMMBeforeAfter_sommBeforeMethod *somTD_SOMMBeforeAfter_sommBeforeMethod;
  139. /*
  140.  *  returns one of the following values:
  141.  *       TRUE  --  continue Before/After processing
  142.  *       FALSE --  skip to executing the corresponding After method
  143.  *                 (this includes skipping the requested method)
  144.  */
  145. #define somMD_SOMMBeforeAfter_sommBeforeMethod "::SOMMBeforeAfter::sommBeforeMethod"
  146. #define SOMMBeforeAfter_sommBeforeMethod(somSelf,ev,object,methodId,ap) \
  147.     (SOM_Resolve(somSelf, SOMMBeforeAfter, sommBeforeMethod) \
  148.     (somSelf,ev,object,methodId,ap))
  149.  
  150. /*
  151.  * legacy support for non-system-linkage vararg stub
  152.  * use -mnolegacy to avoid generating this stub.
  153.  */
  154. #ifdef SOMMBeforeAfter_VA_EXTERN
  155.     SOMEXTERN
  156. #else
  157.     static
  158. #endif
  159. boolean   va_SOMMBeforeAfter_sommBeforeMethod(SOMMBeforeAfter *somSelf, Environment *ev,
  160.         SOMObject* object,
  161.         somId methodId,
  162.         ...)
  163. #if (defined(SOMMBeforeAfter_VA_STUBS)||!defined(SOMMBeforeAfter_VA_EXTERN))
  164. {
  165.     boolean result;
  166.     va_list ap;
  167.     va_start(ap, methodId);
  168.     result = SOMMBeforeAfter_sommBeforeMethod(somSelf,ev,object,methodId,ap);
  169.     va_end(ap);
  170.     return (result);
  171. }    
  172. #else
  173.     ;
  174. #endif
  175.  
  176. /*
  177.  * normal vararg stubs
  178.  */
  179. #ifndef SOMGD_va_sommBeforeMethod
  180.    #ifdef va_sommBeforeMethod
  181.       #undef va_sommBeforeMethod
  182.       #define SOMGD_va_sommBeforeMethod 1
  183.    #else
  184.       #define va_sommBeforeMethod somva_SOMMBeforeAfter_sommBeforeMethod
  185.    #endif /* va_sommBeforeMethod */
  186. #endif /* SOMGD_va_sommBeforeMethod */
  187. #ifndef SOMGD_sommBeforeMethod
  188.     #if (defined(_sommBeforeMethod) || defined(__sommBeforeMethod))
  189.         #undef _sommBeforeMethod
  190.         #undef __sommBeforeMethod
  191.         #define SOMGD_sommBeforeMethod 1
  192.     #else
  193.         #define _sommBeforeMethod somva_SOMMBeforeAfter_sommBeforeMethod
  194.     #endif /* _sommBeforeMethod */
  195. #endif /* SOMGD_sommBeforeMethod */
  196. #ifdef SOMMBeforeAfter_VA_EXTERN
  197. #pragma linkage(somva_SOMMBeforeAfter_sommBeforeMethod, system)
  198.     SOMEXTERN
  199. #else
  200.     static
  201. #endif
  202. boolean  SOMLINK somva_SOMMBeforeAfter_sommBeforeMethod(SOMMBeforeAfter *somSelf, Environment *ev,
  203.         SOMObject* object,
  204.         somId methodId,
  205.         ...)
  206. #if (defined(SOMMBeforeAfter_VA_STUBS)||!defined(SOMMBeforeAfter_VA_EXTERN))
  207. {
  208.     boolean result;
  209.     va_list ap;
  210.     va_start(ap, methodId);
  211.     result = SOMMBeforeAfter_sommBeforeMethod(somSelf,ev,object,methodId,ap);
  212.     va_end(ap);
  213.     return (result);
  214. }    
  215. #else
  216.     ;
  217. #endif
  218.  
  219. /*
  220.  * New Method: sommAfterMethod
  221.  */
  222. typedef void   SOMLINK somTP_SOMMBeforeAfter_sommAfterMethod(SOMMBeforeAfter *somSelf, Environment *ev, 
  223.         SOMObject* object, 
  224.         somId methodId, 
  225.         somToken returnedvalue, 
  226.         va_list ap);
  227. #pragma linkage(somTP_SOMMBeforeAfter_sommAfterMethod, system)
  228. typedef somTP_SOMMBeforeAfter_sommAfterMethod *somTD_SOMMBeforeAfter_sommAfterMethod;
  229. #define somMD_SOMMBeforeAfter_sommAfterMethod "::SOMMBeforeAfter::sommAfterMethod"
  230. #define SOMMBeforeAfter_sommAfterMethod(somSelf,ev,object,methodId,returnedvalue,ap) \
  231.     (SOM_Resolve(somSelf, SOMMBeforeAfter, sommAfterMethod) \
  232.     (somSelf,ev,object,methodId,returnedvalue,ap))
  233.  
  234. /*
  235.  * legacy support for non-system-linkage vararg stub
  236.  * use -mnolegacy to avoid generating this stub.
  237.  */
  238. #ifdef SOMMBeforeAfter_VA_EXTERN
  239.     SOMEXTERN
  240. #else
  241.     static
  242. #endif
  243. void   va_SOMMBeforeAfter_sommAfterMethod(SOMMBeforeAfter *somSelf, Environment *ev,
  244.         SOMObject* object,
  245.         somId methodId,
  246.         somToken returnedvalue,
  247.         ...)
  248. #if (defined(SOMMBeforeAfter_VA_STUBS)||!defined(SOMMBeforeAfter_VA_EXTERN))
  249. {
  250.     va_list ap;
  251.     va_start(ap, returnedvalue);
  252.     SOMMBeforeAfter_sommAfterMethod(somSelf,ev,object,methodId,returnedvalue,ap);
  253.     va_end(ap);
  254. }    
  255. #else
  256.     ;
  257. #endif
  258.  
  259. /*
  260.  * normal vararg stubs
  261.  */
  262. #ifndef SOMGD_va_sommAfterMethod
  263.    #ifdef va_sommAfterMethod
  264.       #undef va_sommAfterMethod
  265.       #define SOMGD_va_sommAfterMethod 1
  266.    #else
  267.       #define va_sommAfterMethod somva_SOMMBeforeAfter_sommAfterMethod
  268.    #endif /* va_sommAfterMethod */
  269. #endif /* SOMGD_va_sommAfterMethod */
  270. #ifndef SOMGD_sommAfterMethod
  271.     #if (defined(_sommAfterMethod) || defined(__sommAfterMethod))
  272.         #undef _sommAfterMethod
  273.         #undef __sommAfterMethod
  274.         #define SOMGD_sommAfterMethod 1
  275.     #else
  276.         #define _sommAfterMethod somva_SOMMBeforeAfter_sommAfterMethod
  277.     #endif /* _sommAfterMethod */
  278. #endif /* SOMGD_sommAfterMethod */
  279. #ifdef SOMMBeforeAfter_VA_EXTERN
  280. #pragma linkage(somva_SOMMBeforeAfter_sommAfterMethod, system)
  281.     SOMEXTERN
  282. #else
  283.     static
  284. #endif
  285. void  SOMLINK somva_SOMMBeforeAfter_sommAfterMethod(SOMMBeforeAfter *somSelf, Environment *ev,
  286.         SOMObject* object,
  287.         somId methodId,
  288.         somToken returnedvalue,
  289.         ...)
  290. #if (defined(SOMMBeforeAfter_VA_STUBS)||!defined(SOMMBeforeAfter_VA_EXTERN))
  291. {
  292.     va_list ap;
  293.     va_start(ap, returnedvalue);
  294.     SOMMBeforeAfter_sommAfterMethod(somSelf,ev,object,methodId,returnedvalue,ap);
  295.     va_end(ap);
  296. }    
  297. #else
  298.     ;
  299. #endif
  300. #ifndef SOM_DONT_USE_INHERITED_MACROS
  301. #define SOMMBeforeAfter__get_somDataAlignment SOMClass__get_somDataAlignment
  302. #define SOMMBeforeAfter__get_somInstanceDataOffsets SOMClass__get_somInstanceDataOffsets
  303. #define SOMMBeforeAfter__get_somDirectInitClasses SOMClass__get_somDirectInitClasses
  304. #define SOMMBeforeAfter_somNew SOMClass_somNew
  305. #define SOMMBeforeAfter_somNewNoInit SOMClass_somNewNoInit
  306. #define SOMMBeforeAfter_somRenew SOMClass_somRenew
  307. #define SOMMBeforeAfter_somRenewNoInit SOMClass_somRenewNoInit
  308. #define SOMMBeforeAfter_somRenewNoZero SOMClass_somRenewNoZero
  309. #define SOMMBeforeAfter_somRenewNoInitNoZero SOMClass_somRenewNoInitNoZero
  310. #define SOMMBeforeAfter_somAllocate SOMClass_somAllocate
  311. #define SOMMBeforeAfter_somDeallocate SOMClass_somDeallocate
  312. #define SOMMBeforeAfter_somInitClass SOMClass_somInitClass
  313. #define SOMMBeforeAfter_somAddStaticMethod SOMClass_somAddStaticMethod
  314. #define SOMMBeforeAfter_somAddDynamicMethod SOMClass_somAddDynamicMethod
  315. #define SOMMBeforeAfter_somOverrideSMethod SOMClass_somOverrideSMethod
  316. #define SOMMBeforeAfter_somClassReady SOMClass_somClassReady
  317. #define SOMMBeforeAfter_somGetApplyStub SOMClass_somGetApplyStub
  318. #define SOMMBeforeAfter_somGetClassData SOMClass_somGetClassData
  319. #define SOMMBeforeAfter_somSetClassData SOMClass_somSetClassData
  320. #define SOMMBeforeAfter_somGetClassMtab SOMClass_somGetClassMtab
  321. #define SOMMBeforeAfter_somGetInstanceOffset SOMClass_somGetInstanceOffset
  322. #define SOMMBeforeAfter_somGetInstancePartSize SOMClass_somGetInstancePartSize
  323. #define SOMMBeforeAfter_somGetInstanceSize SOMClass_somGetInstanceSize
  324. #define SOMMBeforeAfter_somGetInstanceToken SOMClass_somGetInstanceToken
  325. #define SOMMBeforeAfter_somGetMemberToken SOMClass_somGetMemberToken
  326. #define SOMMBeforeAfter_somGetMethodData SOMClass_somGetMethodData
  327. #define SOMMBeforeAfter_somGetRdStub SOMClass_somGetRdStub
  328. #define SOMMBeforeAfter_somGetMethodDescriptor SOMClass_somGetMethodDescriptor
  329. #define SOMMBeforeAfter_somGetMethodIndex SOMClass_somGetMethodIndex
  330. #define SOMMBeforeAfter_somGetMethodToken SOMClass_somGetMethodToken
  331. #define SOMMBeforeAfter_somGetName SOMClass_somGetName
  332. #define SOMMBeforeAfter_somGetNthMethodData SOMClass_somGetNthMethodData
  333. #define SOMMBeforeAfter_somGetNthMethodInfo SOMClass_somGetNthMethodInfo
  334. #define SOMMBeforeAfter_somGetNumMethods SOMClass_somGetNumMethods
  335. #define SOMMBeforeAfter_somGetNumStaticMethods SOMClass_somGetNumStaticMethods
  336. #define SOMMBeforeAfter_somGetParent SOMClass_somGetParent
  337. #define SOMMBeforeAfter_somGetParents SOMClass_somGetParents
  338. #define SOMMBeforeAfter_somGetVersionNumbers SOMClass_somGetVersionNumbers
  339. #define SOMMBeforeAfter_somFindMethod SOMClass_somFindMethod
  340. #define SOMMBeforeAfter_somFindMethodOk SOMClass_somFindMethodOk
  341. #define SOMMBeforeAfter_somFindSMethod SOMClass_somFindSMethod
  342. #define SOMMBeforeAfter_somFindSMethodOk SOMClass_somFindSMethodOk
  343. #define SOMMBeforeAfter_somLookupMethod SOMClass_somLookupMethod
  344. #define SOMMBeforeAfter_somCheckVersion SOMClass_somCheckVersion
  345. #define SOMMBeforeAfter_somDescendedFrom SOMClass_somDescendedFrom
  346. #define SOMMBeforeAfter_somSupportsMethod SOMClass_somSupportsMethod
  347. #define SOMMBeforeAfter_somDefinedMethod SOMClass_somDefinedMethod
  348. #define SOMMBeforeAfter_somOverrideMtab SOMClass_somOverrideMtab
  349. #define SOMMBeforeAfter_somDestruct SOMObject_somDestruct
  350. #define SOMMBeforeAfter_somDefaultCopyInit SOMObject_somDefaultCopyInit
  351. #define SOMMBeforeAfter_somDefaultAssign SOMObject_somDefaultAssign
  352. #define SOMMBeforeAfter_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  353. #define SOMMBeforeAfter_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  354. #define SOMMBeforeAfter_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  355. #define SOMMBeforeAfter_somDefaultConstAssign SOMObject_somDefaultConstAssign
  356. #define SOMMBeforeAfter_somDefaultVAssign SOMObject_somDefaultVAssign
  357. #define SOMMBeforeAfter_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  358. #define SOMMBeforeAfter_somInit SOMObject_somInit
  359. #define SOMMBeforeAfter_somFree SOMObject_somFree
  360. #define SOMMBeforeAfter_somUninit SOMObject_somUninit
  361. #define SOMMBeforeAfter_somGetClass SOMObject_somGetClass
  362. #define SOMMBeforeAfter_somGetClassName SOMObject_somGetClassName
  363. #define SOMMBeforeAfter_somGetSize SOMObject_somGetSize
  364. #define SOMMBeforeAfter_somIsA SOMObject_somIsA
  365. #define SOMMBeforeAfter_somIsInstanceOf SOMObject_somIsInstanceOf
  366. #define SOMMBeforeAfter_somRespondsTo SOMObject_somRespondsTo
  367. #define SOMMBeforeAfter_somDispatch SOMObject_somDispatch
  368. #define SOMMBeforeAfter_somClassDispatch SOMObject_somClassDispatch
  369. #define SOMMBeforeAfter_somCastObj SOMObject_somCastObj
  370. #define SOMMBeforeAfter_somResetObj SOMObject_somResetObj
  371. #define SOMMBeforeAfter_somDispatchV SOMObject_somDispatchV
  372. #define SOMMBeforeAfter_somDispatchL SOMObject_somDispatchL
  373. #define SOMMBeforeAfter_somDispatchA SOMObject_somDispatchA
  374. #define SOMMBeforeAfter_somDispatchD SOMObject_somDispatchD
  375. #define SOMMBeforeAfter_somPrintSelf SOMObject_somPrintSelf
  376. #define SOMMBeforeAfter_somDumpSelf SOMObject_somDumpSelf
  377. #define SOMMBeforeAfter_somDumpSelfInt SOMObject_somDumpSelfInt
  378. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  379.  
  380. #endif       /* SOM_SOMMBeforeAfter_h */
  381.