home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / sombacls.xh < prev    next >
Text File  |  1999-02-22  |  58KB  |  1,750 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: sombacls.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 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_xh
  26. #define SOM_SOMMBeforeAfter_xh
  27.  
  28. class SOMMBeforeAfter;
  29.  
  30. #define SOMMBeforeAfter_MajorVersion 2
  31. #define SOMMBeforeAfter_MinorVersion 1
  32.  
  33. /* C++ SOM defs */
  34. #include <somcls.xh>
  35. #include <somcm.xh>
  36.  
  37. /* C++ parent defs */
  38. #ifndef SOM_SOMClass_xh
  39. #include <somcls.xh>
  40. #endif
  41.  
  42. #ifndef SOMMBeforeAfter_API
  43. #define SOMMBeforeAfter_API
  44. /*
  45.  * -- The Class API
  46.  */
  47.  
  48. /*
  49.  * Start of bindings for IDL types
  50.  */
  51.  
  52. class SOMClass;
  53. class SOMObject;
  54.  
  55. /*
  56.  * End of bindings for IDL types.
  57.  */
  58.  
  59. /* A procedure to create the SOMMBeforeAfter Class */
  60. SOMEXTERN SOMClass * SOMLINK SOMMBeforeAfterNewClass(
  61.         integer4 majorVersion,
  62.         integer4 minorVersion);
  63.  
  64. /* The API to the SOMMBeforeAfter class object, and the methods it introduces. */
  65. SOMEXTERN struct SOMMBeforeAfterClassDataStructure {
  66.     SOMClass *classObject;
  67.     somMToken sommBeforeMethod;
  68.     somMToken sommAfterMethod;
  69. } SOMDLINK SOMMBeforeAfterClassData;
  70. #define _SOMMBeforeAfter SOMMBeforeAfterClassData.classObject
  71.  
  72. /* The API to parentMtabs for SOMMBeforeAfter, and the instance data it introduces. */
  73. SOMEXTERN struct SOMMBeforeAfterCClassDataStructure {
  74.     somMethodTabs parentMtab;
  75.     somDToken              instanceDataToken;
  76. } SOMDLINK SOMMBeforeAfterCClassData;
  77.  
  78. /*
  79.  * -- Typedefs for SOMMBeforeAfter Method Procedures
  80.  */
  81. SOMEXTERN {
  82. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_sommBeforeMethod(SOMMBeforeAfter *somSelf, Environment *ev, 
  83.         SOMObject* object, 
  84.         somId methodId, 
  85.         va_list ap);
  86. typedef somTP_SOMMBeforeAfter_sommBeforeMethod *somTD_SOMMBeforeAfter_sommBeforeMethod;
  87. typedef void   SOMLINK somTP_SOMMBeforeAfter_sommAfterMethod(SOMMBeforeAfter *somSelf, Environment *ev, 
  88.         SOMObject* object, 
  89.         somId methodId, 
  90.         somToken returnedvalue, 
  91.         va_list ap);
  92. typedef somTP_SOMMBeforeAfter_sommAfterMethod *somTD_SOMMBeforeAfter_sommAfterMethod;
  93.  
  94. /*
  95.  * -- Typedefs for Reintroduced Wrapper Methods
  96.  */
  97. typedef long   SOMLINK somTP_SOMMBeforeAfter__get_somDataAlignment(SOMMBeforeAfter *somSelf);
  98. typedef somTP_SOMMBeforeAfter__get_somDataAlignment *somTD_SOMMBeforeAfter__get_somDataAlignment;
  99. typedef SOMClass_somOffsets   SOMLINK somTP_SOMMBeforeAfter__get_somInstanceDataOffsets(SOMMBeforeAfter *somSelf);
  100. typedef somTP_SOMMBeforeAfter__get_somInstanceDataOffsets *somTD_SOMMBeforeAfter__get_somInstanceDataOffsets;
  101. typedef SOMClass_SOMClassSequence   SOMLINK somTP_SOMMBeforeAfter__get_somDirectInitClasses(SOMMBeforeAfter *somSelf);
  102. typedef somTP_SOMMBeforeAfter__get_somDirectInitClasses *somTD_SOMMBeforeAfter__get_somDirectInitClasses;
  103. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somNew(SOMMBeforeAfter *somSelf);
  104. typedef somTP_SOMMBeforeAfter_somNew *somTD_SOMMBeforeAfter_somNew;
  105. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somNewNoInit(SOMMBeforeAfter *somSelf);
  106. typedef somTP_SOMMBeforeAfter_somNewNoInit *somTD_SOMMBeforeAfter_somNewNoInit;
  107. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somRenew(SOMMBeforeAfter *somSelf, 
  108.         void* obj);
  109. typedef somTP_SOMMBeforeAfter_somRenew *somTD_SOMMBeforeAfter_somRenew;
  110. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somRenewNoInit(SOMMBeforeAfter *somSelf, 
  111.         void* obj);
  112. typedef somTP_SOMMBeforeAfter_somRenewNoInit *somTD_SOMMBeforeAfter_somRenewNoInit;
  113. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somRenewNoZero(SOMMBeforeAfter *somSelf, 
  114.         void* obj);
  115. typedef somTP_SOMMBeforeAfter_somRenewNoZero *somTD_SOMMBeforeAfter_somRenewNoZero;
  116. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somRenewNoInitNoZero(SOMMBeforeAfter *somSelf, 
  117.         void* obj);
  118. typedef somTP_SOMMBeforeAfter_somRenewNoInitNoZero *somTD_SOMMBeforeAfter_somRenewNoInitNoZero;
  119. typedef somToken   SOMLINK somTP_SOMMBeforeAfter_somAllocate(SOMMBeforeAfter *somSelf, 
  120.         long size);
  121. typedef somTP_SOMMBeforeAfter_somAllocate *somTD_SOMMBeforeAfter_somAllocate;
  122. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDeallocate(SOMMBeforeAfter *somSelf, 
  123.         somToken memptr);
  124. typedef somTP_SOMMBeforeAfter_somDeallocate *somTD_SOMMBeforeAfter_somDeallocate;
  125. typedef void   SOMLINK somTP_SOMMBeforeAfter_somInitClass(SOMMBeforeAfter *somSelf, 
  126.         string className, 
  127.         SOMClass* parentClass, 
  128.         long dataSize, 
  129.         long maxStaticMethods, 
  130.         long majorVersion, 
  131.         long minorVersion);
  132. typedef somTP_SOMMBeforeAfter_somInitClass *somTD_SOMMBeforeAfter_somInitClass;
  133. typedef void   SOMLINK somTP_SOMMBeforeAfter_somInitMIClass(SOMMBeforeAfter *somSelf, 
  134.         long inherit_vars, 
  135.         string className, 
  136.         SOMClass_SOMClassSequence* parentClasses, 
  137.         long dataSize, 
  138.         long dataAlignment, 
  139.         long maxStaticMethods, 
  140.         long majorVersion, 
  141.         long minorVersion);
  142. typedef somTP_SOMMBeforeAfter_somInitMIClass *somTD_SOMMBeforeAfter_somInitMIClass;
  143. typedef somMToken   SOMLINK somTP_SOMMBeforeAfter_somAddStaticMethod(SOMMBeforeAfter *somSelf, 
  144.         somId methodId, 
  145.         somId methodDescriptor, 
  146.         somMethodPtr method, 
  147.         somMethodPtr redispatchStub, 
  148.         somMethodPtr applyStub);
  149. typedef somTP_SOMMBeforeAfter_somAddStaticMethod *somTD_SOMMBeforeAfter_somAddStaticMethod;
  150. typedef void   SOMLINK somTP_SOMMBeforeAfter_somAddDynamicMethod(SOMMBeforeAfter *somSelf, 
  151.         somId methodId, 
  152.         somId methodDescriptor, 
  153.         somMethodPtr method, 
  154.         somMethodPtr applyStub);
  155. typedef somTP_SOMMBeforeAfter_somAddDynamicMethod *somTD_SOMMBeforeAfter_somAddDynamicMethod;
  156. typedef void   SOMLINK somTP_SOMMBeforeAfter_somOverrideSMethod(SOMMBeforeAfter *somSelf, 
  157.         somId methodId, 
  158.         somMethodPtr method);
  159. typedef somTP_SOMMBeforeAfter_somOverrideSMethod *somTD_SOMMBeforeAfter_somOverrideSMethod;
  160. typedef void   SOMLINK somTP_SOMMBeforeAfter_somClassReady(SOMMBeforeAfter *somSelf);
  161. typedef somTP_SOMMBeforeAfter_somClassReady *somTD_SOMMBeforeAfter_somClassReady;
  162. typedef somMethodPtr   SOMLINK somTP_SOMMBeforeAfter_somGetApplyStub(SOMMBeforeAfter *somSelf, 
  163.         somId methodId);
  164. typedef somTP_SOMMBeforeAfter_somGetApplyStub *somTD_SOMMBeforeAfter_somGetApplyStub;
  165. typedef somClassDataStructure*   SOMLINK somTP_SOMMBeforeAfter_somGetClassData(SOMMBeforeAfter *somSelf);
  166. typedef somTP_SOMMBeforeAfter_somGetClassData *somTD_SOMMBeforeAfter_somGetClassData;
  167. typedef void   SOMLINK somTP_SOMMBeforeAfter_somSetClassData(SOMMBeforeAfter *somSelf, 
  168.         somClassDataStructure* cds);
  169. typedef somTP_SOMMBeforeAfter_somSetClassData *somTD_SOMMBeforeAfter_somSetClassData;
  170. typedef somMethodTab*   SOMLINK somTP_SOMMBeforeAfter_somGetClassMtab(SOMMBeforeAfter *somSelf);
  171. typedef somTP_SOMMBeforeAfter_somGetClassMtab *somTD_SOMMBeforeAfter_somGetClassMtab;
  172. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetInstanceOffset(SOMMBeforeAfter *somSelf);
  173. typedef somTP_SOMMBeforeAfter_somGetInstanceOffset *somTD_SOMMBeforeAfter_somGetInstanceOffset;
  174. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetInstancePartSize(SOMMBeforeAfter *somSelf);
  175. typedef somTP_SOMMBeforeAfter_somGetInstancePartSize *somTD_SOMMBeforeAfter_somGetInstancePartSize;
  176. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetInstanceSize(SOMMBeforeAfter *somSelf);
  177. typedef somTP_SOMMBeforeAfter_somGetInstanceSize *somTD_SOMMBeforeAfter_somGetInstanceSize;
  178. typedef somDToken   SOMLINK somTP_SOMMBeforeAfter_somGetInstanceToken(SOMMBeforeAfter *somSelf);
  179. typedef somTP_SOMMBeforeAfter_somGetInstanceToken *somTD_SOMMBeforeAfter_somGetInstanceToken;
  180. typedef somDToken   SOMLINK somTP_SOMMBeforeAfter_somGetMemberToken(SOMMBeforeAfter *somSelf, 
  181.         long memberOffset, 
  182.         somDToken instanceToken);
  183. typedef somTP_SOMMBeforeAfter_somGetMemberToken *somTD_SOMMBeforeAfter_somGetMemberToken;
  184. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somGetMethodData(SOMMBeforeAfter *somSelf, 
  185.         somId methodId, 
  186.         somMethodData* md);
  187. typedef somTP_SOMMBeforeAfter_somGetMethodData *somTD_SOMMBeforeAfter_somGetMethodData;
  188. typedef somMethodProc*   SOMLINK somTP_SOMMBeforeAfter_somGetRdStub(SOMMBeforeAfter *somSelf, 
  189.         somId methodId);
  190. typedef somTP_SOMMBeforeAfter_somGetRdStub *somTD_SOMMBeforeAfter_somGetRdStub;
  191. typedef somId   SOMLINK somTP_SOMMBeforeAfter_somGetMethodDescriptor(SOMMBeforeAfter *somSelf, 
  192.         somId methodId);
  193. typedef somTP_SOMMBeforeAfter_somGetMethodDescriptor *somTD_SOMMBeforeAfter_somGetMethodDescriptor;
  194. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetMethodIndex(SOMMBeforeAfter *somSelf, 
  195.         somId id);
  196. typedef somTP_SOMMBeforeAfter_somGetMethodIndex *somTD_SOMMBeforeAfter_somGetMethodIndex;
  197. typedef somMToken   SOMLINK somTP_SOMMBeforeAfter_somGetMethodToken(SOMMBeforeAfter *somSelf, 
  198.         somId methodId);
  199. typedef somTP_SOMMBeforeAfter_somGetMethodToken *somTD_SOMMBeforeAfter_somGetMethodToken;
  200. typedef string   SOMLINK somTP_SOMMBeforeAfter_somGetName(SOMMBeforeAfter *somSelf);
  201. typedef somTP_SOMMBeforeAfter_somGetName *somTD_SOMMBeforeAfter_somGetName;
  202. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somGetNthMethodData(SOMMBeforeAfter *somSelf, 
  203.         long n, 
  204.         somMethodData* md);
  205. typedef somTP_SOMMBeforeAfter_somGetNthMethodData *somTD_SOMMBeforeAfter_somGetNthMethodData;
  206. typedef somId   SOMLINK somTP_SOMMBeforeAfter_somGetNthMethodInfo(SOMMBeforeAfter *somSelf, 
  207.         long n, 
  208.         somId* descriptor);
  209. typedef somTP_SOMMBeforeAfter_somGetNthMethodInfo *somTD_SOMMBeforeAfter_somGetNthMethodInfo;
  210. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetNumMethods(SOMMBeforeAfter *somSelf);
  211. typedef somTP_SOMMBeforeAfter_somGetNumMethods *somTD_SOMMBeforeAfter_somGetNumMethods;
  212. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetNumStaticMethods(SOMMBeforeAfter *somSelf);
  213. typedef somTP_SOMMBeforeAfter_somGetNumStaticMethods *somTD_SOMMBeforeAfter_somGetNumStaticMethods;
  214. typedef SOMClass*   SOMLINK somTP_SOMMBeforeAfter_somGetParent(SOMMBeforeAfter *somSelf);
  215. typedef somTP_SOMMBeforeAfter_somGetParent *somTD_SOMMBeforeAfter_somGetParent;
  216. typedef SOMClass_SOMClassSequence   SOMLINK somTP_SOMMBeforeAfter_somGetParents(SOMMBeforeAfter *somSelf);
  217. typedef somTP_SOMMBeforeAfter_somGetParents *somTD_SOMMBeforeAfter_somGetParents;
  218. typedef void   SOMLINK somTP_SOMMBeforeAfter_somGetVersionNumbers(SOMMBeforeAfter *somSelf, 
  219.         long* majorVersion, 
  220.         long* minorVersion);
  221. typedef somTP_SOMMBeforeAfter_somGetVersionNumbers *somTD_SOMMBeforeAfter_somGetVersionNumbers;
  222. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somFindMethod(SOMMBeforeAfter *somSelf, 
  223.         somId methodId, 
  224.         somMethodPtr* m);
  225. typedef somTP_SOMMBeforeAfter_somFindMethod *somTD_SOMMBeforeAfter_somFindMethod;
  226. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somFindMethodOk(SOMMBeforeAfter *somSelf, 
  227.         somId methodId, 
  228.         somMethodPtr* m);
  229. typedef somTP_SOMMBeforeAfter_somFindMethodOk *somTD_SOMMBeforeAfter_somFindMethodOk;
  230. typedef somMethodPtr   SOMLINK somTP_SOMMBeforeAfter_somFindSMethod(SOMMBeforeAfter *somSelf, 
  231.         somId methodId);
  232. typedef somTP_SOMMBeforeAfter_somFindSMethod *somTD_SOMMBeforeAfter_somFindSMethod;
  233. typedef somMethodPtr   SOMLINK somTP_SOMMBeforeAfter_somFindSMethodOk(SOMMBeforeAfter *somSelf, 
  234.         somId methodId);
  235. typedef somTP_SOMMBeforeAfter_somFindSMethodOk *somTD_SOMMBeforeAfter_somFindSMethodOk;
  236. typedef somMethodPtr   SOMLINK somTP_SOMMBeforeAfter_somLookupMethod(SOMMBeforeAfter *somSelf, 
  237.         somId methodId);
  238. typedef somTP_SOMMBeforeAfter_somLookupMethod *somTD_SOMMBeforeAfter_somLookupMethod;
  239. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somCheckVersion(SOMMBeforeAfter *somSelf, 
  240.         long majorVersion, 
  241.         long minorVersion);
  242. typedef somTP_SOMMBeforeAfter_somCheckVersion *somTD_SOMMBeforeAfter_somCheckVersion;
  243. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somDescendedFrom(SOMMBeforeAfter *somSelf, 
  244.         SOMClass* aClassObj);
  245. typedef somTP_SOMMBeforeAfter_somDescendedFrom *somTD_SOMMBeforeAfter_somDescendedFrom;
  246. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somSupportsMethod(SOMMBeforeAfter *somSelf, 
  247.         somId mId);
  248. typedef somTP_SOMMBeforeAfter_somSupportsMethod *somTD_SOMMBeforeAfter_somSupportsMethod;
  249. typedef somMethodPtr   SOMLINK somTP_SOMMBeforeAfter_somDefinedMethod(SOMMBeforeAfter *somSelf, 
  250.         somMToken method);
  251. typedef somTP_SOMMBeforeAfter_somDefinedMethod *somTD_SOMMBeforeAfter_somDefinedMethod;
  252. typedef void   SOMLINK somTP_SOMMBeforeAfter_somOverrideMtab(SOMMBeforeAfter *somSelf);
  253. typedef somTP_SOMMBeforeAfter_somOverrideMtab *somTD_SOMMBeforeAfter_somOverrideMtab;
  254. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDefaultInit(SOMMBeforeAfter *somSelf, 
  255.         som3InitCtrl* ctrl);
  256. typedef somTP_SOMMBeforeAfter_somDefaultInit *somTD_SOMMBeforeAfter_somDefaultInit;
  257. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDestruct(SOMMBeforeAfter *somSelf, 
  258.         octet doFree, 
  259.         som3DestructCtrl* ctrl);
  260. typedef somTP_SOMMBeforeAfter_somDestruct *somTD_SOMMBeforeAfter_somDestruct;
  261. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDefaultCopyInit(SOMMBeforeAfter *somSelf, 
  262.         som3InitCtrl* ctrl, 
  263.         SOMObject* fromObj);
  264. typedef somTP_SOMMBeforeAfter_somDefaultCopyInit *somTD_SOMMBeforeAfter_somDefaultCopyInit;
  265. typedef SOMMBeforeAfter*   SOMLINK somTP_SOMMBeforeAfter_somDefaultAssign(SOMMBeforeAfter *somSelf, 
  266.         som3AssignCtrl* ctrl, 
  267.         SOMObject* fromObj);
  268. typedef somTP_SOMMBeforeAfter_somDefaultAssign *somTD_SOMMBeforeAfter_somDefaultAssign;
  269. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDefaultConstCopyInit(SOMMBeforeAfter *somSelf, 
  270.         som3InitCtrl* ctrl, 
  271.         SOMObject* fromObj);
  272. typedef somTP_SOMMBeforeAfter_somDefaultConstCopyInit *somTD_SOMMBeforeAfter_somDefaultConstCopyInit;
  273. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDefaultVCopyInit(SOMMBeforeAfter *somSelf, 
  274.         som3InitCtrl* ctrl, 
  275.         SOMObject* fromObj);
  276. typedef somTP_SOMMBeforeAfter_somDefaultVCopyInit *somTD_SOMMBeforeAfter_somDefaultVCopyInit;
  277. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDefaultConstVCopyInit(SOMMBeforeAfter *somSelf, 
  278.         som3InitCtrl* ctrl, 
  279.         SOMObject* fromObj);
  280. typedef somTP_SOMMBeforeAfter_somDefaultConstVCopyInit *somTD_SOMMBeforeAfter_somDefaultConstVCopyInit;
  281. typedef SOMMBeforeAfter*   SOMLINK somTP_SOMMBeforeAfter_somDefaultConstAssign(SOMMBeforeAfter *somSelf, 
  282.         som3AssignCtrl* ctrl, 
  283.         SOMObject* fromObj);
  284. typedef somTP_SOMMBeforeAfter_somDefaultConstAssign *somTD_SOMMBeforeAfter_somDefaultConstAssign;
  285. typedef SOMMBeforeAfter*   SOMLINK somTP_SOMMBeforeAfter_somDefaultVAssign(SOMMBeforeAfter *somSelf, 
  286.         som3AssignCtrl* ctrl, 
  287.         SOMObject* fromObj);
  288. typedef somTP_SOMMBeforeAfter_somDefaultVAssign *somTD_SOMMBeforeAfter_somDefaultVAssign;
  289. typedef SOMMBeforeAfter*   SOMLINK somTP_SOMMBeforeAfter_somDefaultConstVAssign(SOMMBeforeAfter *somSelf, 
  290.         som3AssignCtrl* ctrl, 
  291.         SOMObject* fromObj);
  292. typedef somTP_SOMMBeforeAfter_somDefaultConstVAssign *somTD_SOMMBeforeAfter_somDefaultConstVAssign;
  293. typedef void   SOMLINK somTP_SOMMBeforeAfter_somInit(SOMMBeforeAfter *somSelf);
  294. typedef somTP_SOMMBeforeAfter_somInit *somTD_SOMMBeforeAfter_somInit;
  295. typedef void   SOMLINK somTP_SOMMBeforeAfter_somFree(SOMMBeforeAfter *somSelf);
  296. typedef somTP_SOMMBeforeAfter_somFree *somTD_SOMMBeforeAfter_somFree;
  297. typedef void   SOMLINK somTP_SOMMBeforeAfter_somUninit(SOMMBeforeAfter *somSelf);
  298. typedef somTP_SOMMBeforeAfter_somUninit *somTD_SOMMBeforeAfter_somUninit;
  299. typedef SOMClass*   SOMLINK somTP_SOMMBeforeAfter_somGetClass(SOMMBeforeAfter *somSelf);
  300. typedef somTP_SOMMBeforeAfter_somGetClass *somTD_SOMMBeforeAfter_somGetClass;
  301. typedef string   SOMLINK somTP_SOMMBeforeAfter_somGetClassName(SOMMBeforeAfter *somSelf);
  302. typedef somTP_SOMMBeforeAfter_somGetClassName *somTD_SOMMBeforeAfter_somGetClassName;
  303. typedef long   SOMLINK somTP_SOMMBeforeAfter_somGetSize(SOMMBeforeAfter *somSelf);
  304. typedef somTP_SOMMBeforeAfter_somGetSize *somTD_SOMMBeforeAfter_somGetSize;
  305. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somIsA(SOMMBeforeAfter *somSelf, 
  306.         SOMClass* aClassObj);
  307. typedef somTP_SOMMBeforeAfter_somIsA *somTD_SOMMBeforeAfter_somIsA;
  308. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somIsInstanceOf(SOMMBeforeAfter *somSelf, 
  309.         SOMClass* aClassObj);
  310. typedef somTP_SOMMBeforeAfter_somIsInstanceOf *somTD_SOMMBeforeAfter_somIsInstanceOf;
  311. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somRespondsTo(SOMMBeforeAfter *somSelf, 
  312.         somId mId);
  313. typedef somTP_SOMMBeforeAfter_somRespondsTo *somTD_SOMMBeforeAfter_somRespondsTo;
  314. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somDispatch(SOMMBeforeAfter *somSelf, 
  315.         somToken* retValue, 
  316.         somId methodId, 
  317.         va_list ap);
  318. typedef somTP_SOMMBeforeAfter_somDispatch *somTD_SOMMBeforeAfter_somDispatch;
  319. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somClassDispatch(SOMMBeforeAfter *somSelf, 
  320.         SOMClass* clsObj, 
  321.         somToken* retValue, 
  322.         somId methodId, 
  323.         va_list ap);
  324. typedef somTP_SOMMBeforeAfter_somClassDispatch *somTD_SOMMBeforeAfter_somClassDispatch;
  325. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somCastObj(SOMMBeforeAfter *somSelf, 
  326.         SOMClass* cls);
  327. typedef somTP_SOMMBeforeAfter_somCastObj *somTD_SOMMBeforeAfter_somCastObj;
  328. typedef boolean   SOMLINK somTP_SOMMBeforeAfter_somResetObj(SOMMBeforeAfter *somSelf);
  329. typedef somTP_SOMMBeforeAfter_somResetObj *somTD_SOMMBeforeAfter_somResetObj;
  330. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDispatchV(SOMMBeforeAfter *somSelf, 
  331.         somId methodId, 
  332.         somId descriptor, 
  333.         va_list ap);
  334. typedef somTP_SOMMBeforeAfter_somDispatchV *somTD_SOMMBeforeAfter_somDispatchV;
  335. typedef long   SOMLINK somTP_SOMMBeforeAfter_somDispatchL(SOMMBeforeAfter *somSelf, 
  336.         somId methodId, 
  337.         somId descriptor, 
  338.         va_list ap);
  339. typedef somTP_SOMMBeforeAfter_somDispatchL *somTD_SOMMBeforeAfter_somDispatchL;
  340. typedef void*   SOMLINK somTP_SOMMBeforeAfter_somDispatchA(SOMMBeforeAfter *somSelf, 
  341.         somId methodId, 
  342.         somId descriptor, 
  343.         va_list ap);
  344. typedef somTP_SOMMBeforeAfter_somDispatchA *somTD_SOMMBeforeAfter_somDispatchA;
  345. typedef double   SOMLINK somTP_SOMMBeforeAfter_somDispatchD(SOMMBeforeAfter *somSelf, 
  346.         somId methodId, 
  347.         somId descriptor, 
  348.         va_list ap);
  349. typedef somTP_SOMMBeforeAfter_somDispatchD *somTD_SOMMBeforeAfter_somDispatchD;
  350. typedef SOMObject*   SOMLINK somTP_SOMMBeforeAfter_somPrintSelf(SOMMBeforeAfter *somSelf);
  351. typedef somTP_SOMMBeforeAfter_somPrintSelf *somTD_SOMMBeforeAfter_somPrintSelf;
  352. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDumpSelf(SOMMBeforeAfter *somSelf, 
  353.         long level);
  354. typedef somTP_SOMMBeforeAfter_somDumpSelf *somTD_SOMMBeforeAfter_somDumpSelf;
  355. typedef void   SOMLINK somTP_SOMMBeforeAfter_somDumpSelfInt(SOMMBeforeAfter *somSelf, 
  356.         long level);
  357. typedef somTP_SOMMBeforeAfter_somDumpSelfInt *somTD_SOMMBeforeAfter_somDumpSelfInt;
  358. }
  359.  
  360. #endif /* SOMMBeforeAfter_API */
  361.  
  362.  
  363. /*
  364.  * -- This emitter treats Method Tokens as Thunks by default.
  365.  * -- Use the sc modifier "nothunks" to change this default
  366.  */
  367. #undef somresolve_
  368. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  369.  
  370. /*
  371.  * -- The C++ Wrapper Class for SOMMBeforeAfter
  372.  */
  373. class SOMMBeforeAfter : public SOMClass
  374. {
  375. public:
  376.  
  377. // SOMMBeforeAfter::new creates the class object if necessary, and then uses somNewNoInit
  378. // to allocate memory and create the object. Initialization is in ctors.
  379. void *operator new(size_t)
  380. {
  381.    if (!_SOMMBeforeAfter) SOMMBeforeAfterNewClass(SOMMBeforeAfter_MajorVersion,SOMMBeforeAfter_MinorVersion);
  382.    return (void*)
  383.       SOM_Resolve(_SOMMBeforeAfter,SOMClass,somNewNoInit)
  384.          ((SOMClass *)((void*)_SOMMBeforeAfter));
  385. }
  386.  
  387. // SOMMBeforeAfter::delete uses somDestruct.
  388. void operator delete(void * obj)
  389. {
  390.    if (obj && *(void**)obj) {
  391.       SOM_Resolve(obj,SOMObject,somFree)
  392.          ((SOMObject*)obj);
  393.    }
  394. }
  395.  
  396. SOMMBeforeAfter& operator=(SOMMBeforeAfter& fromObj)
  397. {
  398.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  399.    return *this;
  400. }
  401.  
  402. SOMMBeforeAfter()
  403. {
  404.    if (*(void**)this != 
  405.        ((somParentMtabStructPtr)
  406.         (SOMMBeforeAfterCClassData.parentMtab))->mtab)
  407.       return;
  408.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  409. }
  410.  
  411. SOMMBeforeAfter(SOMMBeforeAfter* fromObj)
  412. {
  413.    if (*(void**)this != 
  414.        ((somParentMtabStructPtr)
  415.         (SOMMBeforeAfterCClassData.parentMtab))->mtab)
  416.       return;
  417.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  418. }
  419.  
  420. #ifdef __IBMCPP__
  421. #pragma info(nocnv,nopar)
  422. #endif
  423. SOMMBeforeAfter(const SOMMBeforeAfter* fromObj)
  424. {
  425.    if (*(void**)this != 
  426.        ((somParentMtabStructPtr)
  427.         (SOMMBeforeAfterCClassData.parentMtab))->mtab)
  428.       return;
  429.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  430. }
  431. #ifdef __IBMCPP__
  432. #pragma info(restore)
  433. #endif
  434.  
  435.  
  436. /* va_list method: sommBeforeMethod */
  437.  
  438. /*
  439.  *  returns one of the following values:
  440.  *       TRUE  --  continue Before/After processing
  441.  *       FALSE --  skip to executing the corresponding After method
  442.  *                 (this includes skipping the requested method)
  443.  */
  444. /* the va_list invocation form */
  445. boolean   SOMMBeforeAfter_sommBeforeMethod(Environment *ev, 
  446.         SOMObject* object, 
  447.         somId methodId, 
  448.         va_list ap)
  449. {return SOM_ResolveD(this,SOMMBeforeAfter,SOMMBeforeAfter,sommBeforeMethod)
  450.     (this, ev,object,methodId,ap);
  451. }
  452.  
  453. /* the varargs invocation form */
  454. boolean   sommBeforeMethod(Environment *ev, 
  455.         SOMObject* object, 
  456.         somId methodId, 
  457.         ...)
  458. {
  459. /*
  460.  *  returns one of the following values:
  461.  *       TRUE  --  continue Before/After processing
  462.  *       FALSE --  skip to executing the corresponding After method
  463.  *                 (this includes skipping the requested method)
  464.  */
  465.    va_list ap;
  466.    va_start(ap, methodId);
  467.    boolean __somResult = 
  468.       SOM_ResolveD(this,SOMMBeforeAfter,SOMMBeforeAfter,sommBeforeMethod)
  469.     (this, ev,object,methodId,ap);
  470.    va_end(ap);
  471.    return __somResult;
  472. }
  473.  
  474.  
  475. /* va_list method: sommAfterMethod */
  476.  
  477. /* the va_list invocation form */
  478. void   SOMMBeforeAfter_sommAfterMethod(Environment *ev, 
  479.         SOMObject* object, 
  480.         somId methodId, 
  481.         somToken returnedvalue, 
  482.         va_list ap)
  483. {   SOM_ResolveD(this,SOMMBeforeAfter,SOMMBeforeAfter,sommAfterMethod)
  484.     (this, ev,object,methodId,returnedvalue,ap);
  485. }
  486.  
  487. /* the varargs invocation form */
  488. void   sommAfterMethod(Environment *ev, 
  489.         SOMObject* object, 
  490.         somId methodId, 
  491.         somToken returnedvalue, 
  492.         ...)
  493. {
  494.    va_list ap;
  495.    va_start(ap, returnedvalue);
  496.    SOM_ResolveD(this,SOMMBeforeAfter,SOMMBeforeAfter,sommAfterMethod)
  497.     (this, ev,object,methodId,returnedvalue,ap);
  498.    va_end(ap);
  499. }
  500.  
  501.  
  502. /*
  503.  * Reintroduce inherited methods
  504.  */
  505.  
  506. /* method: _get_somDataAlignment */
  507. long   _get_somDataAlignment()
  508. {
  509. /*
  510.  *  The alignment required for the instance data structure
  511.  *  introduced by the receiving class.
  512.  */
  513.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,_get_somDataAlignment)
  514.     (this);
  515. }
  516.  
  517.  
  518. /* nonstatic method: _get_somInstanceDataOffsets */
  519. SOMClass_somOffsets   _get_somInstanceDataOffsets()
  520. {
  521. /*
  522.  *  A sequence of the instance data offsets for all classes used in
  523.  *  the derivation of the receiving class (including the receiver).
  524.  */
  525.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,_get_somInstanceDataOffsets)
  526.     (this);
  527. }
  528.  
  529.  
  530. /* nonstatic method: _get_somDirectInitClasses */
  531. SOMClass_SOMClassSequence   _get_somDirectInitClasses()
  532. {
  533. /*
  534.  *  The ancestors whose initializers the receiving
  535.  *  class wants to directly invoke.
  536.  */
  537.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,_get_somDirectInitClasses)
  538.     (this);
  539. }
  540.  
  541.  
  542. /* method: somNew */
  543. SOMObject*   somNew()
  544. {
  545. /*
  546.  *  Uses SOMMalloc to allocate storage for a new instance of the
  547.  *  receiving class, and then calls somRenewNoInitNoZero to load the
  548.  *  new object's method table pointer. Then somDefaultInit is called to
  549.  *  initialize the new object.  Note: If the instance is a class object,
  550.  *  somInitMIClass must then be invoked to declare parents and
  551.  *  initialize the class's instance method table. Upon failure, NULL
  552.  *  is returned.
  553.  */
  554.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somNew)
  555.     (this);
  556. }
  557.  
  558.  
  559. /* method: somNewNoInit */
  560. SOMObject*   somNewNoInit()
  561. {
  562. /*
  563.  *  Equivalent to somNew except that somDefaultInit is not called.
  564.  */
  565.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somNewNoInit)
  566.     (this);
  567. }
  568.  
  569.  
  570. /* method: somRenew */
  571. SOMObject*   somRenew(void* obj)
  572. {
  573. /*
  574.  *  Equivalent to somNew except that storage is not allocated.
  575.  *  <obj> is taken as the address of the new object.
  576.  */
  577.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somRenew)
  578.     (this,obj);
  579. }
  580.  
  581.  
  582. /* method: somRenewNoInit */
  583. SOMObject*   somRenewNoInit(void* obj)
  584. {
  585. /*
  586.  *  Equivalent to somRenew except that somDefaultInit is not called.
  587.  */
  588.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somRenewNoInit)
  589.     (this,obj);
  590. }
  591.  
  592.  
  593. /* method: somRenewNoZero */
  594. SOMObject*   somRenewNoZero(void* obj)
  595. {
  596. /*
  597.  *  Equivalent to somRenew except that memory is not zeroed out.
  598.  */
  599.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somRenewNoZero)
  600.     (this,obj);
  601. }
  602.  
  603.  
  604. /* method: somRenewNoInitNoZero */
  605. SOMObject*   somRenewNoInitNoZero(void* obj)
  606. {
  607. /*
  608.  *  The purpose of this method is to load an object's method table.
  609.  *  The SOM API requires that somRenewNoInitNoZero always be
  610.  *  called when creating a new object whose metaclass is not SOMClass.
  611.  *  This is because metaclasses must be guaranteed that they can use
  612.  *  somRenewNoInitNoZero to track object creation if this is desired.
  613.  */
  614.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somRenewNoInitNoZero)
  615.     (this,obj);
  616. }
  617.  
  618.  
  619. /* nonstatic method: somAllocate */
  620. somToken   somAllocate(long size)
  621. {
  622. /*
  623.  *  Allocates memory to hold an object and returns a pointer to this memory.
  624.  *  This is a nonstatic method, and cannot be overridden. The default
  625.  *  implementation calls SOMMalloc, but a class designer can specify a
  626.  *  different implementation using the somallocate modifier in IDL. The
  627.  *  allocator takes the same parameters as this method.
  628.  */
  629.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somAllocate)
  630.     (this,size);
  631. }
  632.  
  633.  
  634. /* nonstatic method: somDeallocate */
  635. void   somDeallocate(somToken memptr)
  636. {
  637. /*
  638.  *  Zeros out the method table pointer stored in the word pointed to by
  639.  *  memptr, and then deallocates the block of memory pointed to by memptr.
  640.  *  This is a nonstatic method and cannot be overridden. The default
  641.  *  deallocator called is SOMFree, but a class designer can specify a
  642.  *  different deallocator using the somdeallocate modifier in IDL. The
  643.  *  deallocator takes a char* (memptr) and a long (size) as arguments.
  644.  */
  645.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somDeallocate)
  646.     (this,memptr);
  647. }
  648.  
  649.  
  650. /* method: somInitClass */
  651. void   somInitClass(string className, 
  652.         SOMClass* parentClass, 
  653.         long dataSize, 
  654.         long maxStaticMethods, 
  655.         long majorVersion, 
  656.         long minorVersion)
  657. {
  658. /*
  659.  *  somInitClass is obsolete, and should no longer be used. The SOM 2.0
  660.  *  kernel provides special handling for redispatch stubs in the case
  661.  *  of SOM 1.0 classes, and use of this method is what tells the kernel
  662.  *  that old-style redispatch stubs will be registered.
  663.  */
  664.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somInitClass)
  665.     (this,className,parentClass,dataSize,maxStaticMethods,majorVersion,minorVersion);
  666. }
  667.  
  668.  
  669. /* method: somInitMIClass */
  670. void   somInitMIClass(long inherit_vars, 
  671.         string className, 
  672.         SOMClass_SOMClassSequence* parentClasses, 
  673.         long dataSize, 
  674.         long dataAlignment, 
  675.         long maxStaticMethods, 
  676.         long majorVersion, 
  677.         long minorVersion)
  678. {
  679. /*
  680.  *  somInitMIClass implements the second phase of dynamic class creation:
  681.  *  inheritance of interface and possibly implementation (instance
  682.  *  variables) by suitable initialization of <self> (a class object).
  683.  * 
  684.  *  For somInitMIClass, the inherit_vars argument controls whether abstract
  685.  *  or implementation inheritance is used. Inherit_vars is a 32 bit
  686.  *  bit-vector. Implementation is inherited from parent i iff the bit
  687.  *  1<<i is on, or i>=32.
  688.  *  On a class-by-class basis, for each class ancestor, implementation
  689.  *  inheritance always takes precidence over abstract inheritance. This is
  690.  *  necessary to guarantee that procedures supporting parent method calls
  691.  *  (available on non-abstract parents) are always supported by parent
  692.  *  instance variables.
  693.  * 
  694.  *  <className> is a string containing the class name. A copy is made, so
  695.  *  the string may be freed upon return to the caller if this is desired.
  696.  * 
  697.  *  <parentClasses> is a SOMClassSequence containing pointers to the
  698.  *  parent classes. somInitMIClass makes a copy of this, so it may
  699.  *  be freed upon return to the caller if this is desired.
  700.  * 
  701.  *  <dataSize> is the space needed for the instance variables
  702.  *  introduced by this class.
  703.  * 
  704.  *  <dataAlignment> specifies the desired byte alignment for instance
  705.  *  data introduced by this class. A value of 0 selects a system-wide default;
  706.  *  any other argument is taken as the desired byte alignment multiple. Thus,
  707.  *  for example, even if a byte multiple of 8 is needed for double precision
  708.  *  values on a given system (so 8 is the default), a class whose instance data
  709.  *  doesn't require this can indicate otherwise. If A is the next memory
  710.  *  address available for holding instance data, the address that will be
  711.  *  used is A + (A mod byte-alignment).
  712.  * 
  713.  *  <maxStaticMethods> is the maximum number of static methods that will be
  714.  *  added to the initialized class using addStaticMethod.
  715.  * 
  716.  *  <majorVersion> indicates the major version number for this
  717.  *  implementation of the class definition, and <minorVersion>
  718.  *  indicates the minor version number.
  719.  */
  720.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somInitMIClass)
  721.     (this,inherit_vars,className,parentClasses,dataSize,dataAlignment,maxStaticMethods,majorVersion,minorVersion);
  722. }
  723.  
  724.  
  725. /* method: somAddStaticMethod */
  726. somMToken   somAddStaticMethod(somId methodId, 
  727.         somId methodDescriptor, 
  728.         somMethodPtr method, 
  729.         somMethodPtr redispatchStub, 
  730.         somMethodPtr applyStub)
  731. {
  732. /*
  733.  *  Adds the indicated method, creating and returning a new method token.
  734.  * 
  735.  *  <methodDescriptor> is the somId for an identifier that can be used
  736.  *  to access signature information about the method from an interface
  737.  *  repository.
  738.  * 
  739.  *  <method> is the actual method procedure for this method
  740.  * 
  741.  *  <redispatchStub> is a procedure with the same calling sequence as
  742.  *  <method> that invokes somDispatch for the method.
  743.  * 
  744.  *  <applyStub> is a procedure used to support somApply.
  745.  */
  746.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somAddStaticMethod)
  747.     (this,methodId,methodDescriptor,method,redispatchStub,applyStub);
  748. }
  749.  
  750.  
  751. /* method: somAddDynamicMethod */
  752. void   somAddDynamicMethod(somId methodId, 
  753.         somId methodDescriptor, 
  754.         somMethodPtr method, 
  755.         somMethodPtr applyStub)
  756. {
  757. /*
  758.  *  Adds the indicated method to the class's name lookup list.
  759.  *  If this happens to override a static method then this operation is
  760.  *  equivalent to <somOverrideSMethod> and the <methodDescriptor> and
  761.  *  <applyStub> arguments are ignored (the overridden method's values
  762.  *  will be used).
  763.  * 
  764.  *  <methodDescriptor> is the somId for an identifier that can be used
  765.  *  to access signature information about the method from an interface
  766.  *  repository.
  767.  * 
  768.  *  <method> is the actual method procedure for this method
  769.  * 
  770.  *  <applyStub> is a procedure that takes a standard variable argument
  771.  *  list data structure applies it to its target object by calling
  772.  *  <method> with arguments derived from the data structure.  Its
  773.  *  calling sequence is the same as the calling sequence of the
  774.  *  dispatch methods defined in SOMObject.  This stub is used in the
  775.  *  support of the dispatch methods used in some classes.  In classes
  776.  *  where the dispatch functions do not need such a function this
  777.  *  parameter may be null.
  778.  */
  779.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somAddDynamicMethod)
  780.     (this,methodId,methodDescriptor,method,applyStub);
  781. }
  782.  
  783.  
  784. /* method: somOverrideSMethod */
  785. void   somOverrideSMethod(somId methodId, 
  786.         somMethodPtr method)
  787. {
  788. /*
  789.  *  This method can be used instead of <somAddStaticMethod> or
  790.  *  <somAddDynamicMethod> when it is known that the class' parent
  791.  *  class already supports this method.  This call does not require the
  792.  *  method descriptor and stub methods that the others do.
  793.  */
  794.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somOverrideSMethod)
  795.     (this,methodId,method);
  796. }
  797.  
  798.  
  799. /* method: somClassReady */
  800. void   somClassReady()
  801. {
  802. /*
  803.  *  This method is invoked when all of the static initialization for
  804.  *  the class has been finished.  The default implementation simply
  805.  *  registers the newly constructed class with the SOMClassMgr.
  806.  */
  807.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somClassReady)
  808.     (this);
  809. }
  810.  
  811.  
  812. /* method: somGetApplyStub */
  813. somMethodPtr   somGetApplyStub(somId methodId)
  814. {
  815. /*
  816.  *  Returns the apply stub associated with the specified method,
  817.  *  if one exists; otherwise NULL is returned. This method is obsolete,
  818.  *  and retained for binary compatability. In SOMr2, users never access
  819.  *  apply stubs directly; The function somApply is used to invoke apply
  820.  *  stubs. See somApply documentation for further information on apply
  821.  *  stubs, and see somAddStaticMethod documentation for information
  822.  *  on how apply stubs are registered by class implementations.
  823.  */
  824.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetApplyStub)
  825.     (this,methodId);
  826. }
  827.  
  828.  
  829. /* method: somGetClassData */
  830. somClassDataStructure*   somGetClassData()
  831. {
  832.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetClassData)
  833.     (this);
  834. }
  835.  
  836.  
  837. /* method: somSetClassData */
  838. void   somSetClassData(somClassDataStructure* cds)
  839. {
  840. /*
  841.  *  The class' pointer to the static <className>ClassData structure.
  842.  */
  843.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somSetClassData)
  844.     (this,cds);
  845. }
  846.  
  847.  
  848. /* method: somGetClassMtab */
  849. somMethodTab*   somGetClassMtab()
  850. {
  851. /*
  852.  *  A pointer to the method table used by instances of this class. This
  853.  *  method was misnamed; it should have been called somGetInstanceMtab.
  854.  */
  855.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetClassMtab)
  856.     (this);
  857. }
  858.  
  859.  
  860. /* method: somGetInstanceOffset */
  861. long   somGetInstanceOffset()
  862. {
  863. /*
  864.  *  Returns the offset of instance data introduced by the receiver in
  865.  *  an instance of the receiver. This method is obsolete and not useful in
  866.  *  multiple-inheritance situations. The attribute somInstanceDataOffsets
  867.  *  replaces this method.
  868.  */
  869.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetInstanceOffset)
  870.     (this);
  871. }
  872.  
  873.  
  874. /* method: somGetInstancePartSize */
  875. long   somGetInstancePartSize()
  876. {
  877. /*
  878.  *  The size in bytes of the instance data introduced by the receiving
  879.  *  class.
  880.  */
  881.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetInstancePartSize)
  882.     (this);
  883. }
  884.  
  885.  
  886. /* method: somGetInstanceSize */
  887. long   somGetInstanceSize()
  888. {
  889. /*
  890.  *  The total size of an instance of the receiving class.
  891.  */
  892.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetInstanceSize)
  893.     (this);
  894. }
  895.  
  896.  
  897. /* method: somGetInstanceToken */
  898. somDToken   somGetInstanceToken()
  899. {
  900. /*
  901.  *  A data token that identifies the introduced portion of this class
  902.  *  within itself or any derived class.  This token can be subsequently
  903.  *  passed to the run-time somDataResolve function to locate the instance
  904.  *  data introduced by this class in any object derived from this class.
  905.  */
  906.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetInstanceToken)
  907.     (this);
  908. }
  909.  
  910.  
  911. /* method: somGetMemberToken */
  912. somDToken   somGetMemberToken(long memberOffset, 
  913.         somDToken instanceToken)
  914. {
  915. /*
  916.  *  Returns a data token that for the data member at offset
  917.  *  "memberOffset" within the introduced portion of the class identified
  918.  *  by instanceToken.  The instance token must have been obtained from a
  919.  *  previous invocation of somGetInstanceToken.  The returned member
  920.  *  token can be subsequently passed to the run-time somDataResolve
  921.  *  function to locate the data member.
  922.  */
  923.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetMemberToken)
  924.     (this,memberOffset,instanceToken);
  925. }
  926.  
  927.  
  928. /* method: somGetMethodData */
  929. boolean   somGetMethodData(somId methodId, 
  930.         somMethodData* md)
  931. {
  932. /*
  933.  *  If a method with id <methodId> is supported by the target class,
  934.  *  the structure pointed to by <md> is loaded with method information
  935.  *  and the value 1 is returned. In this case, if the method is not
  936.  *  dynamic, md->method is loaded with the result of somClassResolve on
  937.  *  the target class for the method. If the method is not supported,
  938.  *  md->id is loaded with 0, and the value 0 is returned.
  939.  */
  940.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetMethodData)
  941.     (this,methodId,md);
  942. }
  943.  
  944.  
  945. /* method: somGetRdStub */
  946. somMethodProc*   somGetRdStub(somId methodId)
  947. {
  948. /*
  949.  *  Returns a redispatch stub for the indicated method, if possible.
  950.  *  If not possible (because a valid redispatch stub has not been
  951.  *  registered, and there is insufficient information to dynamically
  952.  *  construct one), then a NULL is returned.
  953.  */
  954.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetRdStub)
  955.     (this,methodId);
  956. }
  957.  
  958.  
  959. /* method: somGetMethodDescriptor */
  960. somId   somGetMethodDescriptor(somId methodId)
  961. {
  962. /*
  963.  *  Returns the method descriptor for the indicated method.    If
  964.  *  this object does not support the indicated method then NULL is
  965.  *  returned.
  966.  */
  967.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetMethodDescriptor)
  968.     (this,methodId);
  969. }
  970.  
  971.  
  972. /* method: somGetMethodIndex */
  973. long   somGetMethodIndex(somId id)
  974. {
  975. /*
  976.  *  Returns the index for the specified method. (A number that may
  977.  *  change if any methods are added or deleted to this class object or
  978.  *  any of its ancestors).  This number is the basis for other calls to
  979.  *  get info about the method. Indexes start at 0. A -1 is returned if
  980.  *  the method cannot be found.
  981.  */
  982.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetMethodIndex)
  983.     (this,id);
  984. }
  985.  
  986.  
  987. /* method: somGetMethodToken */
  988. somMToken   somGetMethodToken(somId methodId)
  989. {
  990. /*
  991.  *  Returns the specified method's access token. This token can then
  992.  *  be passed to method resolution routines, which use the token
  993.  *  to select a method pointer from a method table.
  994.  */
  995.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetMethodToken)
  996.     (this,methodId);
  997. }
  998.  
  999.  
  1000. /* method: somGetName */
  1001. string   somGetName()
  1002. {
  1003. /*
  1004.  *  This object's class name as a NULL terminated string.
  1005.  */
  1006.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetName)
  1007.     (this);
  1008. }
  1009.  
  1010.  
  1011. /* method: somGetNthMethodData */
  1012. boolean   somGetNthMethodData(long n, 
  1013.         somMethodData* md)
  1014. {
  1015. /*
  1016.  *  loads *md with the method data associated with the the nth method,
  1017.  *  or NULL if there is no such method. Returns true is successful;
  1018.  *  false otherwise.
  1019.  */
  1020.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetNthMethodData)
  1021.     (this,n,md);
  1022. }
  1023.  
  1024.  
  1025. /* method: somGetNthMethodInfo */
  1026. somId   somGetNthMethodInfo(long n, 
  1027.         somId* descriptor)
  1028. {
  1029. /*
  1030.  *  Returns the id of the <n>th method if one exists and NULL
  1031.  *  otherwise.
  1032.  * 
  1033.  *  The ordering of the methods is unpredictable, but will not change
  1034.  *  unless some change is made to the class or one of its ancestor classes.
  1035.  * 
  1036.  *  See CORBA documentation for info on method descriptors.
  1037.  */
  1038.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetNthMethodInfo)
  1039.     (this,n,descriptor);
  1040. }
  1041.  
  1042.  
  1043. /* method: somGetNumMethods */
  1044. long   somGetNumMethods()
  1045. {
  1046. /*
  1047.  *  The number of methods currently supported by this class,
  1048.  *  including inherited methods (both static and dynamic).
  1049.  */
  1050.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetNumMethods)
  1051.     (this);
  1052. }
  1053.  
  1054.  
  1055. /* method: somGetNumStaticMethods */
  1056. long   somGetNumStaticMethods()
  1057. {
  1058. /*
  1059.  *  The number of static methods that this class has.  Can
  1060.  *  be used by a child class when initializing its method table.
  1061.  */
  1062.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetNumStaticMethods)
  1063.     (this);
  1064. }
  1065.  
  1066.  
  1067. /* method: somGetParent */
  1068. SOMClass*   somGetParent()
  1069. {
  1070. /*
  1071.  *  Returns the parent class of self (along its "left-hand" derivation
  1072.  *  path), if one exists and NULL otherwise.
  1073.  */
  1074.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetParent)
  1075.     (this);
  1076. }
  1077.  
  1078.  
  1079. /* method: somGetParents */
  1080. SOMClass_SOMClassSequence   somGetParents()
  1081. {
  1082. /*
  1083.  *  The parent classes of self.
  1084.  */
  1085.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetParents)
  1086.     (this);
  1087. }
  1088.  
  1089.  
  1090. /* method: somGetVersionNumbers */
  1091. void   somGetVersionNumbers(long* majorVersion, 
  1092.         long* minorVersion)
  1093. {
  1094. /*
  1095.  *  Returns the class' major and minor version numbers in the corresponding
  1096.  *  output parameters.
  1097.  */
  1098.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somGetVersionNumbers)
  1099.     (this,majorVersion,minorVersion);
  1100. }
  1101.  
  1102.  
  1103. /* method: somFindMethod */
  1104. boolean   somFindMethod(somId methodId, 
  1105.         somMethodPtr* m)
  1106. {
  1107. /*
  1108.  *  Finds the method procedure associated with <methodId> for this
  1109.  *  class and sets <m> to it.  1 (true) is returned when the
  1110.  *  method procedure is a static method and 0 (false) is returned
  1111.  *  when the method procedure is dynamic method.
  1112.  * 
  1113.  *  If the class does not support the specified method then
  1114.  *  <m> is set to NULL and the return value is meaningless.
  1115.  * 
  1116.  */
  1117.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somFindMethod)
  1118.     (this,methodId,m);
  1119. }
  1120.  
  1121.  
  1122. /* method: somFindMethodOk */
  1123. boolean   somFindMethodOk(somId methodId, 
  1124.         somMethodPtr* m)
  1125. {
  1126. /*
  1127.  *  Just like <somFindMethod> except that if the method is not
  1128.  *  supported then an error is raised and execution is halted.
  1129.  */
  1130.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somFindMethodOk)
  1131.     (this,methodId,m);
  1132. }
  1133.  
  1134.  
  1135. /* method: somFindSMethod */
  1136. somMethodPtr   somFindSMethod(somId methodId)
  1137. {
  1138. /*
  1139.  *  Finds the indicated method, which must be a static method supported
  1140.  *  by this class, and returns a pointer to its method procedure.
  1141.  *  If the method is not supported by the receiver (as a static method
  1142.  *  or at all) then a NULL pointer is returned.
  1143.  */
  1144.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somFindSMethod)
  1145.     (this,methodId);
  1146. }
  1147.  
  1148.  
  1149. /* method: somFindSMethodOk */
  1150. somMethodPtr   somFindSMethodOk(somId methodId)
  1151. {
  1152. /*
  1153.  *  Uses <somFindSMethod>, and raises an error if the result is NULL.
  1154.  */
  1155.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somFindSMethodOk)
  1156.     (this,methodId);
  1157. }
  1158.  
  1159.  
  1160. /* method: somLookupMethod */
  1161. somMethodPtr   somLookupMethod(somId methodId)
  1162. {
  1163. /*
  1164.  *  Like <somFindSMethodOK>, but without restriction to static methods.
  1165.  */
  1166.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somLookupMethod)
  1167.     (this,methodId);
  1168. }
  1169.  
  1170.  
  1171. /* method: somCheckVersion */
  1172. boolean   somCheckVersion(long majorVersion, 
  1173.         long minorVersion)
  1174. {
  1175. /*
  1176.  *  Returns 1 (true) if the implementation of this class is
  1177.  *  compatible with the specified major and minor version number and
  1178.  *  false (0) otherwise.  An implementation is compatible with the
  1179.  *  specified version numbers if it has the same major version number
  1180.  *  and a minor version number that is equal to or greater than
  1181.  *  <minorVersion>.    The major, minor version number pair (0,0) is
  1182.  *  considered to match any version.  This method is usually called
  1183.  *  immediately after creating the class object to verify that a
  1184.  *  dynamically loaded class definition is compatible with a using
  1185.  *  application.
  1186.  */
  1187.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somCheckVersion)
  1188.     (this,majorVersion,minorVersion);
  1189. }
  1190.  
  1191.  
  1192. /* method: somDescendedFrom */
  1193. boolean   somDescendedFrom(SOMClass* aClassObj)
  1194. {
  1195. /*
  1196.  *  Returns 1 (true) if <self> is a descendent class of <aClassObj> and
  1197.  *  0 (false) otherwise.  Note: a class object is considered to be
  1198.  *  descended itself for the purposes of this method.
  1199.  */
  1200.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somDescendedFrom)
  1201.     (this,aClassObj);
  1202. }
  1203.  
  1204.  
  1205. /* method: somSupportsMethod */
  1206. boolean   somSupportsMethod(somId mId)
  1207. {
  1208. /*
  1209.  *  Returns 1 (true) if the indicated method is supported by this
  1210.  *  class and 0 (false) otherwise.
  1211.  */
  1212.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somSupportsMethod)
  1213.     (this,mId);
  1214. }
  1215.  
  1216.  
  1217. /* method: somDefinedMethod */
  1218. somMethodPtr   somDefinedMethod(somMToken method)
  1219. {
  1220. /*
  1221.  *  if the receiving class either introduces or overrides the
  1222.  *  indicated method, then its somMethodPtr is returned, otherwise
  1223.  *  NULL is returned.
  1224.  */
  1225.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somDefinedMethod)
  1226.     (this,method);
  1227. }
  1228.  
  1229.  
  1230. /* method: somOverrideMtab */
  1231. void   somOverrideMtab()
  1232. {
  1233. /*
  1234.  *  Overrides the method table pointers to point to the redispatch stubs.
  1235.  *  All the methods except somDispatch methods are overriden.
  1236.  */
  1237.    SOM_ResolveD(this,SOMMBeforeAfter,SOMClass,somOverrideMtab)
  1238.     (this);
  1239. }
  1240.  
  1241.  
  1242. /* initializer method: somDefaultInit */
  1243. void   somDefaultInit(som3InitCtrl* ctrl)
  1244. {
  1245. /*
  1246.  *  A default initializer for a SOM object. Passing a null ctrl
  1247.  *  indicates to the receiver that its class is the class of the
  1248.  *  object being initialized, whereby the initializer will determine
  1249.  *  an appropriate control structure.
  1250.  */
  1251.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultInit)
  1252.     (this,ctrl);
  1253. }
  1254.  
  1255.  
  1256. /* method: somDestruct */
  1257. void   somDestruct(octet doFree, 
  1258.         som3DestructCtrl* ctrl)
  1259. {
  1260. /*
  1261.  *  The default destructor for a SOM object. A nonzero <doFree>
  1262.  *  indicates that the object storage should be freed by the
  1263.  *  object's class (via somDeallocate) after uninitialization.
  1264.  *  As with somDefaultInit, a null ctrl can be passed.
  1265.  */
  1266.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDestruct)
  1267.     (this,doFree,ctrl);
  1268. }
  1269.  
  1270.  
  1271. /* initializer method: somDefaultCopyInit */
  1272. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  1273.         SOMObject* fromObj)
  1274. {
  1275. /*
  1276.  *  A default copy constructor. Use this to make copies of objects for
  1277.  *  calling methods with "by-value" argument semantics.
  1278.  */
  1279.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultCopyInit)
  1280.     (this,ctrl,fromObj);
  1281. }
  1282.  
  1283.  
  1284. /* method: somDefaultAssign */
  1285. SOMMBeforeAfter*  somDefaultAssign(som3AssignCtrl* ctrl, 
  1286.         SOMObject* fromObj)
  1287. {
  1288. /*
  1289.  *  A default assignment operator. Use this to "assign" the state of one
  1290.  *  object to another.
  1291.  */
  1292.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultAssign)
  1293.     (this,ctrl,fromObj);
  1294. }
  1295.  
  1296.  
  1297. /* initializer method: somDefaultConstCopyInit */
  1298. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  1299.         SOMObject* fromObj)
  1300. {
  1301. /*
  1302.  *  A default copy constructor that uses a const fromObj.
  1303.  */
  1304.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultConstCopyInit)
  1305.     (this,ctrl,fromObj);
  1306. }
  1307.  
  1308.  
  1309. /* initializer method: somDefaultVCopyInit */
  1310. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  1311.         SOMObject* fromObj)
  1312. {
  1313. /*
  1314.  *  A default copy constructor that uses a volatile fromObj.
  1315.  */
  1316.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultVCopyInit)
  1317.     (this,ctrl,fromObj);
  1318. }
  1319.  
  1320.  
  1321. /* initializer method: somDefaultConstVCopyInit */
  1322. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  1323.         SOMObject* fromObj)
  1324. {
  1325. /*
  1326.  *  A default copy constructor that uses a const volatile fromObj.
  1327.  */
  1328.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultConstVCopyInit)
  1329.     (this,ctrl,fromObj);
  1330. }
  1331.  
  1332.  
  1333. /* method: somDefaultConstAssign */
  1334. SOMMBeforeAfter*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  1335.         SOMObject* fromObj)
  1336. {
  1337. /*
  1338.  *  A default assignment operator that uses a const fromObj.
  1339.  */
  1340.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultConstAssign)
  1341.     (this,ctrl,fromObj);
  1342. }
  1343.  
  1344.  
  1345. /* method: somDefaultVAssign */
  1346. SOMMBeforeAfter*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  1347.         SOMObject* fromObj)
  1348. {
  1349. /*
  1350.  *  A default assignment operator that uses a volatile fromObj.
  1351.  */
  1352.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultVAssign)
  1353.     (this,ctrl,fromObj);
  1354. }
  1355.  
  1356.  
  1357. /* method: somDefaultConstVAssign */
  1358. SOMMBeforeAfter*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  1359.         SOMObject* fromObj)
  1360. {
  1361. /*
  1362.  *  A default assignment operator that uses a const volatile fromObj.
  1363.  */
  1364.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDefaultConstVAssign)
  1365.     (this,ctrl,fromObj);
  1366. }
  1367.  
  1368.  
  1369. /* method: somInit */
  1370. void   somInit()
  1371. {
  1372. /*
  1373.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  1374.  */
  1375.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somInit)
  1376.     (this);
  1377. }
  1378.  
  1379.  
  1380. /* method: somFree */
  1381. void   somFree()
  1382. {
  1383. /*
  1384.  *  Use as directed by framework implementations.
  1385.  */
  1386.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somFree)
  1387.     (this);
  1388. }
  1389.  
  1390.  
  1391. /* method: somUninit */
  1392. void   somUninit()
  1393. {
  1394. /*
  1395.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  1396.  */
  1397.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somUninit)
  1398.     (this);
  1399. }
  1400.  
  1401.  
  1402. /* method: somGetClass */
  1403. SOMClass*   somGetClass()
  1404. {
  1405. /*
  1406.  *  Return the receiver's class.
  1407.  */
  1408.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somGetClass)
  1409.     (this);
  1410. }
  1411.  
  1412.  
  1413. /* method: somGetClassName */
  1414. string   somGetClassName()
  1415. {
  1416. /*
  1417.  *  Return the name of the receiver's class.
  1418.  */
  1419.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somGetClassName)
  1420.     (this);
  1421. }
  1422.  
  1423.  
  1424. /* method: somGetSize */
  1425. long   somGetSize()
  1426. {
  1427. /*
  1428.  *  Return the size of the receiver.
  1429.  */
  1430.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somGetSize)
  1431.     (this);
  1432. }
  1433.  
  1434.  
  1435. /* method: somIsA */
  1436. boolean   somIsA(SOMClass* aClassObj)
  1437. {
  1438. /*
  1439.  *  Returns 1 (true) if the receiver responds to methods
  1440.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  1441.  */
  1442.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somIsA)
  1443.     (this,aClassObj);
  1444. }
  1445.  
  1446.  
  1447. /* method: somIsInstanceOf */
  1448. boolean   somIsInstanceOf(SOMClass* aClassObj)
  1449. {
  1450. /*
  1451.  *  Returns 1 (true) if the receiver is an instance of
  1452.  *  <aClassObj> and 0 (false) otherwise.
  1453.  */
  1454.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somIsInstanceOf)
  1455.     (this,aClassObj);
  1456. }
  1457.  
  1458.  
  1459. /* method: somRespondsTo */
  1460. boolean   somRespondsTo(somId mId)
  1461. {
  1462. /*
  1463.  *  Returns 1 (true) if the indicated method can be invoked
  1464.  *  on the receiver and 0 (false) otherwise.
  1465.  */
  1466.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somRespondsTo)
  1467.     (this,mId);
  1468. }
  1469.  
  1470.  
  1471. /* va_list method: somDispatch */
  1472.  
  1473. /*
  1474.  *  This method provides a generic, class-specific dispatch mechanism.
  1475.  *  It accepts as input <retValue> a pointer to the memory area to be
  1476.  *  loaded with the result of dispatching the method indicated by
  1477.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  1478.  *  on which the method is to be invoked as the first argument.
  1479.  */
  1480. /* the va_list invocation form */
  1481. boolean   SOMMBeforeAfter_somDispatch(somToken* retValue, 
  1482.         somId methodId, 
  1483.         va_list ap)
  1484. {return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatch)
  1485.     (this,retValue,methodId,ap);
  1486. }
  1487.  
  1488. /* the varargs invocation form */
  1489. boolean   somDispatch(somToken* retValue, 
  1490.         somId methodId, 
  1491.         ...)
  1492. {
  1493. /*
  1494.  *  This method provides a generic, class-specific dispatch mechanism.
  1495.  *  It accepts as input <retValue> a pointer to the memory area to be
  1496.  *  loaded with the result of dispatching the method indicated by
  1497.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  1498.  *  on which the method is to be invoked as the first argument.
  1499.  */
  1500.    va_list ap;
  1501.    va_start(ap, methodId);
  1502.    boolean __somResult = 
  1503.       SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatch)
  1504.     (this,retValue,methodId,ap);
  1505.    va_end(ap);
  1506.    return __somResult;
  1507. }
  1508.  
  1509.  
  1510. /* va_list method: somClassDispatch */
  1511.  
  1512. /*
  1513.  *  Like somDispatch, but method resolution for static methods is done
  1514.  *  according to the clsObj instance method table.
  1515.  */
  1516. /* the va_list invocation form */
  1517. boolean   SOMMBeforeAfter_somClassDispatch(SOMClass* clsObj, 
  1518.         somToken* retValue, 
  1519.         somId methodId, 
  1520.         va_list ap)
  1521. {return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somClassDispatch)
  1522.     (this,clsObj,retValue,methodId,ap);
  1523. }
  1524.  
  1525. /* the varargs invocation form */
  1526. boolean   somClassDispatch(SOMClass* clsObj, 
  1527.         somToken* retValue, 
  1528.         somId methodId, 
  1529.         ...)
  1530. {
  1531. /*
  1532.  *  Like somDispatch, but method resolution for static methods is done
  1533.  *  according to the clsObj instance method table.
  1534.  */
  1535.    va_list ap;
  1536.    va_start(ap, methodId);
  1537.    boolean __somResult = 
  1538.       SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somClassDispatch)
  1539.     (this,clsObj,retValue,methodId,ap);
  1540.    va_end(ap);
  1541.    return __somResult;
  1542. }
  1543.  
  1544.  
  1545. /* method: somCastObj */
  1546. boolean   somCastObj(SOMClass* cls)
  1547. {
  1548. /*
  1549.  *  cast the receiving object to cls (which must be an ancestor of the
  1550.  *  objects true class. Returns true on success.
  1551.  */
  1552.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somCastObj)
  1553.     (this,cls);
  1554. }
  1555.  
  1556.  
  1557. /* method: somResetObj */
  1558. boolean   somResetObj()
  1559. {
  1560. /*
  1561.  *  reset an object to its true class. Returns true always.
  1562.  */
  1563.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somResetObj)
  1564.     (this);
  1565. }
  1566.  
  1567.  
  1568. /* va_list method: somDispatchV */
  1569.  
  1570. /*
  1571.  *  Obsolete. Use somDispatch instead.
  1572.  */
  1573. /* the va_list invocation form */
  1574. void   SOMMBeforeAfter_somDispatchV(somId methodId, 
  1575.         somId descriptor, 
  1576.         va_list ap)
  1577. {   SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchV)
  1578.     (this,methodId,descriptor,ap);
  1579. }
  1580.  
  1581. /* the varargs invocation form */
  1582. void   somDispatchV(somId methodId, 
  1583.         somId descriptor, 
  1584.         ...)
  1585. {
  1586. /*
  1587.  *  Obsolete. Use somDispatch instead.
  1588.  */
  1589.    va_list ap;
  1590.    va_start(ap, descriptor);
  1591.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchV)
  1592.     (this,methodId,descriptor,ap);
  1593.    va_end(ap);
  1594. }
  1595.  
  1596.  
  1597. /* va_list method: somDispatchL */
  1598.  
  1599. /*
  1600.  *  Obsolete. Use somDispatch instead.
  1601.  */
  1602. /* the va_list invocation form */
  1603. long   SOMMBeforeAfter_somDispatchL(somId methodId, 
  1604.         somId descriptor, 
  1605.         va_list ap)
  1606. {return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchL)
  1607.     (this,methodId,descriptor,ap);
  1608. }
  1609.  
  1610. /* the varargs invocation form */
  1611. long   somDispatchL(somId methodId, 
  1612.         somId descriptor, 
  1613.         ...)
  1614. {
  1615. /*
  1616.  *  Obsolete. Use somDispatch instead.
  1617.  */
  1618.    va_list ap;
  1619.    va_start(ap, descriptor);
  1620.    long __somResult = 
  1621.       SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchL)
  1622.     (this,methodId,descriptor,ap);
  1623.    va_end(ap);
  1624.    return __somResult;
  1625. }
  1626.  
  1627.  
  1628. /* va_list method: somDispatchA */
  1629.  
  1630. /*
  1631.  *  Obsolete. Use somDispatch instead.
  1632.  */
  1633. /* the va_list invocation form */
  1634. void*   SOMMBeforeAfter_somDispatchA(somId methodId, 
  1635.         somId descriptor, 
  1636.         va_list ap)
  1637. {return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchA)
  1638.     (this,methodId,descriptor,ap);
  1639. }
  1640.  
  1641. /* the varargs invocation form */
  1642. void*   somDispatchA(somId methodId, 
  1643.         somId descriptor, 
  1644.         ...)
  1645. {
  1646. /*
  1647.  *  Obsolete. Use somDispatch instead.
  1648.  */
  1649.    va_list ap;
  1650.    va_start(ap, descriptor);
  1651.    void* __somResult = 
  1652.       SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchA)
  1653.     (this,methodId,descriptor,ap);
  1654.    va_end(ap);
  1655.    return __somResult;
  1656. }
  1657.  
  1658.  
  1659. /* va_list method: somDispatchD */
  1660.  
  1661. /*
  1662.  *  Obsolete. Use somDispatch instead.
  1663.  */
  1664. /* the va_list invocation form */
  1665. double   SOMMBeforeAfter_somDispatchD(somId methodId, 
  1666.         somId descriptor, 
  1667.         va_list ap)
  1668. {return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchD)
  1669.     (this,methodId,descriptor,ap);
  1670. }
  1671.  
  1672. /* the varargs invocation form */
  1673. double   somDispatchD(somId methodId, 
  1674.         somId descriptor, 
  1675.         ...)
  1676. {
  1677. /*
  1678.  *  Obsolete. Use somDispatch instead.
  1679.  */
  1680.    va_list ap;
  1681.    va_start(ap, descriptor);
  1682.    double __somResult = 
  1683.       SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDispatchD)
  1684.     (this,methodId,descriptor,ap);
  1685.    va_end(ap);
  1686.    return __somResult;
  1687. }
  1688.  
  1689.  
  1690. /* method: somPrintSelf */
  1691. SOMObject*   somPrintSelf()
  1692. {
  1693. /*
  1694.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  1695.  *  information about this object.  The default implementation just gives
  1696.  *  the object's class name and its address in memory.
  1697.  *  <self> is returned.
  1698.  */
  1699.    return SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somPrintSelf)
  1700.     (this);
  1701. }
  1702.  
  1703.  
  1704. /* method: somDumpSelf */
  1705. void   somDumpSelf(long level)
  1706. {
  1707. /*
  1708.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  1709.  *  and its current state.
  1710.  * 
  1711.  *  <level> indicates the nesting level for describing compound objects
  1712.  *  it must be greater than or equal to zero.  All lines in the
  1713.  *  description will be preceeded by <2*level> spaces.
  1714.  * 
  1715.  *  This routine only actually writes the data that concerns the object
  1716.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  1717.  *  the object's current state.  This approach allows readable
  1718.  *  descriptions of compound objects to be constructed.
  1719.  * 
  1720.  *  Generally it is not necessary to override this method, if it is
  1721.  *  overriden it generally must be completely replaced.
  1722.  */
  1723.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDumpSelf)
  1724.     (this,level);
  1725. }
  1726.  
  1727.  
  1728. /* method: somDumpSelfInt */
  1729. void   somDumpSelfInt(long level)
  1730. {
  1731. /*
  1732.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  1733.  *  Generally this method will need to be overridden.  When overriding
  1734.  *  it, begin by calling the parent class form of this method and then
  1735.  *  write in a description of your class's instance data. This will
  1736.  *  result in a description of all the object's instance data going
  1737.  *  from its root ancestor class to its specific class.
  1738.  */
  1739.    SOM_ResolveD(this,SOMMBeforeAfter,SOMObject,somDumpSelfInt)
  1740.     (this,level);
  1741. }
  1742.  
  1743.  
  1744.  
  1745. };   /* SOMMBeforeAfter */
  1746.  
  1747.  
  1748.  
  1749. #endif       /* SOM_SOMMBeforeAfter_xh */
  1750.