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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: mcollect.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somuc
  12.  * 
  13.  *    ORIGINS: 82, 81, 27
  14.  * 
  15.  * 
  16.  *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996
  17.  *    All Rights Reserved
  18.  *    Licensed Materials - Property of IBM
  19.  *    US Government Users Restricted Rights - Use, duplication or
  20.  *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  21.  * 
  22.  *    Copyright ⌐ 1988-92 Apple Computer, Inc.  All rights reserved.
  23.  * 
  24.  * CLASS_NAME: somf_MCollectible
  25.  * 
  26.  * DESCRIPTION: The class somf_MCollectible defines the generic object class
  27.  *              from which all other classes are derived.  It is an abstract
  28.  *              class in that many subclasses will define some or all of the
  29.  *              methods presented below.
  30.  * 
  31.  * 
  32.  *  This file was generated by the SOM Compiler.
  33.  *  FileName: MCollect.id2.
  34.  *  Generated using:
  35.  *      SOM Precompiler spc: 6.13
  36.  *      SOM Emitter emitidl.dll: 6.18
  37.  */
  38.  
  39.  
  40. #ifndef SOM_somf_MCollectible_xh
  41. #define SOM_somf_MCollectible_xh
  42.  
  43. class somf_MCollectible;
  44.  
  45. #define somf_MCollectible_MajorVersion 2
  46. #define somf_MCollectible_MinorVersion 1
  47.  
  48. /* C++ SOM defs */
  49. #include <somcls.xh>
  50. #include <somcm.xh>
  51.  
  52. /* C++ parent defs */
  53. #ifndef SOM_SOMObject_xh
  54. #include <somobj.xh>
  55. #endif
  56.  
  57. #ifndef somf_MCollectible_API
  58. #define somf_MCollectible_API
  59. /*
  60.  * -- The Class API
  61.  */
  62.  
  63. /*
  64.  * Start of bindings for IDL types
  65.  */
  66.  
  67. class SOMClass;
  68. class SOMObject;
  69. #define somf_MCollectible_kReasonableLowerBound 5 /* 5 */
  70. typedef
  71. somMToken somf_MCollectible_somf_MCollectibleCompareFn;
  72. typedef
  73. somMToken somf_MCollectible_somf_MCollectibleHashFn;
  74.  
  75. #ifndef SOM_DONT_USE_SHORT_NAMES
  76. #ifndef SOMTGD_kReasonableLowerBound
  77.     #ifdef kReasonableLowerBound
  78.         #undef kReasonableLowerBound
  79.         #define SOMTGD_kReasonableLowerBound 1
  80.     #else
  81.         #define kReasonableLowerBound somf_MCollectible_kReasonableLowerBound
  82.     #endif /* kReasonableLowerBound */
  83. #endif /* SOMTGD_kReasonableLowerBound */
  84.  
  85. #ifndef SOM_DONT_USE_SHORT_NAMES
  86. #ifndef SOMTGD_somf_MCollectibleCompareFn
  87.     #ifdef somf_MCollectibleCompareFn
  88.         #undef somf_MCollectibleCompareFn
  89.         #define SOMTGD_somf_MCollectibleCompareFn 1
  90.     #else
  91.         #define somf_MCollectibleCompareFn somf_MCollectible_somf_MCollectibleCompareFn
  92.     #endif /* somf_MCollectibleCompareFn */
  93. #endif /* SOMTGD_somf_MCollectibleCompareFn */
  94. #endif /* SOM_DONT_USE_SHORT_NAMES */
  95.  
  96. #ifndef SOM_DONT_USE_SHORT_NAMES
  97. #ifndef SOMTGD_somf_MCollectibleHashFn
  98.     #ifdef somf_MCollectibleHashFn
  99.         #undef somf_MCollectibleHashFn
  100.         #define SOMTGD_somf_MCollectibleHashFn 1
  101.     #else
  102.         #define somf_MCollectibleHashFn somf_MCollectible_somf_MCollectibleHashFn
  103.     #endif /* somf_MCollectibleHashFn */
  104. #endif /* SOMTGD_somf_MCollectibleHashFn */
  105. #endif /* SOM_DONT_USE_SHORT_NAMES */
  106. #endif /* SOM_DONT_USE_SHORT_NAMES */
  107.  
  108. /*
  109.  * End of bindings for IDL types.
  110.  */
  111.  
  112. /*
  113.  * Passthru lines: File: "C.xh", "after"
  114.  */
  115.  
  116.  
  117. #define SOMF_NIL 0
  118.  
  119. #define SOMF_CALL_COMPARE_FN(obj,token,parameter) (((somTD_somf_MCollectible_somfIsEqual) somResolve(obj,token))(obj, ev, parameter))
  120.  
  121. #define SOMF_CALL_HASH_FN(obj,token) (((somTD_somf_MCollectible_somfHash) somResolve(obj,token))(obj, ev))
  122.  
  123. #define kDeleted (somf_MCollectible*) 0xFFFFFFFF
  124.  
  125. /* A procedure to create the somf_MCollectible Class */
  126. SOMEXTERN SOMClass * SOMLINK somf_MCollectibleNewClass(
  127.         integer4 majorVersion,
  128.         integer4 minorVersion);
  129.  
  130. /* The API to the somf_MCollectible class object, and the methods it introduces. */
  131. SOMEXTERN struct somf_MCollectibleClassDataStructure {
  132.     SOMClass *classObject;
  133.     somMToken somfClone;
  134.     somMToken somfClonePointer;
  135.     somMToken somfHash;
  136.     somMToken somfIsEqual;
  137.     somMToken somfIsSame;
  138.     somMToken somfIsNotEqual;
  139. } SOMDLINK somf_MCollectibleClassData;
  140. #define _somf_MCollectible somf_MCollectibleClassData.classObject
  141.  
  142. /* The API to parentMtabs for somf_MCollectible, and the instance data it introduces. */
  143. SOMEXTERN struct somf_MCollectibleCClassDataStructure {
  144.     somMethodTabs parentMtab;
  145.     somDToken              instanceDataToken;
  146. } SOMDLINK somf_MCollectibleCClassData;
  147.  
  148. /*
  149.  * -- Typedefs for somf_MCollectible Method Procedures
  150.  */
  151. SOMEXTERN {
  152. typedef somf_MCollectible*   SOMLINK somTP_somf_MCollectible_somfClone(somf_MCollectible *somSelf, Environment *ev);
  153. typedef somTP_somf_MCollectible_somfClone *somTD_somf_MCollectible_somfClone;
  154. typedef somf_MCollectible*   SOMLINK somTP_somf_MCollectible_somfClonePointer(somf_MCollectible *somSelf, Environment *ev, 
  155.         somf_MCollectible* clonee);
  156. typedef somTP_somf_MCollectible_somfClonePointer *somTD_somf_MCollectible_somfClonePointer;
  157. typedef long   SOMLINK somTP_somf_MCollectible_somfHash(somf_MCollectible *somSelf, Environment *ev);
  158. typedef somTP_somf_MCollectible_somfHash *somTD_somf_MCollectible_somfHash;
  159. typedef boolean   SOMLINK somTP_somf_MCollectible_somfIsEqual(somf_MCollectible *somSelf, Environment *ev, 
  160.         somf_MCollectible* obj);
  161. typedef somTP_somf_MCollectible_somfIsEqual *somTD_somf_MCollectible_somfIsEqual;
  162. typedef boolean   SOMLINK somTP_somf_MCollectible_somfIsSame(somf_MCollectible *somSelf, Environment *ev, 
  163.         somf_MCollectible* obj);
  164. typedef somTP_somf_MCollectible_somfIsSame *somTD_somf_MCollectible_somfIsSame;
  165. typedef boolean   SOMLINK somTP_somf_MCollectible_somfIsNotEqual(somf_MCollectible *somSelf, Environment *ev, 
  166.         somf_MCollectible* obj);
  167. typedef somTP_somf_MCollectible_somfIsNotEqual *somTD_somf_MCollectible_somfIsNotEqual;
  168.  
  169. /*
  170.  * -- Typedefs for Reintroduced Wrapper Methods
  171.  */
  172. typedef void   SOMLINK somTP_somf_MCollectible_somDefaultInit(somf_MCollectible *somSelf, 
  173.         som3InitCtrl* ctrl);
  174. typedef somTP_somf_MCollectible_somDefaultInit *somTD_somf_MCollectible_somDefaultInit;
  175. typedef void   SOMLINK somTP_somf_MCollectible_somDestruct(somf_MCollectible *somSelf, 
  176.         octet doFree, 
  177.         som3DestructCtrl* ctrl);
  178. typedef somTP_somf_MCollectible_somDestruct *somTD_somf_MCollectible_somDestruct;
  179. typedef void   SOMLINK somTP_somf_MCollectible_somDefaultCopyInit(somf_MCollectible *somSelf, 
  180.         som3InitCtrl* ctrl, 
  181.         SOMObject* fromObj);
  182. typedef somTP_somf_MCollectible_somDefaultCopyInit *somTD_somf_MCollectible_somDefaultCopyInit;
  183. typedef somf_MCollectible*   SOMLINK somTP_somf_MCollectible_somDefaultAssign(somf_MCollectible *somSelf, 
  184.         som3AssignCtrl* ctrl, 
  185.         SOMObject* fromObj);
  186. typedef somTP_somf_MCollectible_somDefaultAssign *somTD_somf_MCollectible_somDefaultAssign;
  187. typedef void   SOMLINK somTP_somf_MCollectible_somDefaultConstCopyInit(somf_MCollectible *somSelf, 
  188.         som3InitCtrl* ctrl, 
  189.         SOMObject* fromObj);
  190. typedef somTP_somf_MCollectible_somDefaultConstCopyInit *somTD_somf_MCollectible_somDefaultConstCopyInit;
  191. typedef void   SOMLINK somTP_somf_MCollectible_somDefaultVCopyInit(somf_MCollectible *somSelf, 
  192.         som3InitCtrl* ctrl, 
  193.         SOMObject* fromObj);
  194. typedef somTP_somf_MCollectible_somDefaultVCopyInit *somTD_somf_MCollectible_somDefaultVCopyInit;
  195. typedef void   SOMLINK somTP_somf_MCollectible_somDefaultConstVCopyInit(somf_MCollectible *somSelf, 
  196.         som3InitCtrl* ctrl, 
  197.         SOMObject* fromObj);
  198. typedef somTP_somf_MCollectible_somDefaultConstVCopyInit *somTD_somf_MCollectible_somDefaultConstVCopyInit;
  199. typedef somf_MCollectible*   SOMLINK somTP_somf_MCollectible_somDefaultConstAssign(somf_MCollectible *somSelf, 
  200.         som3AssignCtrl* ctrl, 
  201.         SOMObject* fromObj);
  202. typedef somTP_somf_MCollectible_somDefaultConstAssign *somTD_somf_MCollectible_somDefaultConstAssign;
  203. typedef somf_MCollectible*   SOMLINK somTP_somf_MCollectible_somDefaultVAssign(somf_MCollectible *somSelf, 
  204.         som3AssignCtrl* ctrl, 
  205.         SOMObject* fromObj);
  206. typedef somTP_somf_MCollectible_somDefaultVAssign *somTD_somf_MCollectible_somDefaultVAssign;
  207. typedef somf_MCollectible*   SOMLINK somTP_somf_MCollectible_somDefaultConstVAssign(somf_MCollectible *somSelf, 
  208.         som3AssignCtrl* ctrl, 
  209.         SOMObject* fromObj);
  210. typedef somTP_somf_MCollectible_somDefaultConstVAssign *somTD_somf_MCollectible_somDefaultConstVAssign;
  211. typedef void   SOMLINK somTP_somf_MCollectible_somInit(somf_MCollectible *somSelf);
  212. typedef somTP_somf_MCollectible_somInit *somTD_somf_MCollectible_somInit;
  213. typedef void   SOMLINK somTP_somf_MCollectible_somFree(somf_MCollectible *somSelf);
  214. typedef somTP_somf_MCollectible_somFree *somTD_somf_MCollectible_somFree;
  215. typedef void   SOMLINK somTP_somf_MCollectible_somUninit(somf_MCollectible *somSelf);
  216. typedef somTP_somf_MCollectible_somUninit *somTD_somf_MCollectible_somUninit;
  217. typedef SOMClass*   SOMLINK somTP_somf_MCollectible_somGetClass(somf_MCollectible *somSelf);
  218. typedef somTP_somf_MCollectible_somGetClass *somTD_somf_MCollectible_somGetClass;
  219. typedef string   SOMLINK somTP_somf_MCollectible_somGetClassName(somf_MCollectible *somSelf);
  220. typedef somTP_somf_MCollectible_somGetClassName *somTD_somf_MCollectible_somGetClassName;
  221. typedef long   SOMLINK somTP_somf_MCollectible_somGetSize(somf_MCollectible *somSelf);
  222. typedef somTP_somf_MCollectible_somGetSize *somTD_somf_MCollectible_somGetSize;
  223. typedef boolean   SOMLINK somTP_somf_MCollectible_somIsA(somf_MCollectible *somSelf, 
  224.         SOMClass* aClassObj);
  225. typedef somTP_somf_MCollectible_somIsA *somTD_somf_MCollectible_somIsA;
  226. typedef boolean   SOMLINK somTP_somf_MCollectible_somIsInstanceOf(somf_MCollectible *somSelf, 
  227.         SOMClass* aClassObj);
  228. typedef somTP_somf_MCollectible_somIsInstanceOf *somTD_somf_MCollectible_somIsInstanceOf;
  229. typedef boolean   SOMLINK somTP_somf_MCollectible_somRespondsTo(somf_MCollectible *somSelf, 
  230.         somId mId);
  231. typedef somTP_somf_MCollectible_somRespondsTo *somTD_somf_MCollectible_somRespondsTo;
  232. typedef boolean   SOMLINK somTP_somf_MCollectible_somDispatch(somf_MCollectible *somSelf, 
  233.         somToken* retValue, 
  234.         somId methodId, 
  235.         va_list ap);
  236. typedef somTP_somf_MCollectible_somDispatch *somTD_somf_MCollectible_somDispatch;
  237. typedef boolean   SOMLINK somTP_somf_MCollectible_somClassDispatch(somf_MCollectible *somSelf, 
  238.         SOMClass* clsObj, 
  239.         somToken* retValue, 
  240.         somId methodId, 
  241.         va_list ap);
  242. typedef somTP_somf_MCollectible_somClassDispatch *somTD_somf_MCollectible_somClassDispatch;
  243. typedef boolean   SOMLINK somTP_somf_MCollectible_somCastObj(somf_MCollectible *somSelf, 
  244.         SOMClass* cls);
  245. typedef somTP_somf_MCollectible_somCastObj *somTD_somf_MCollectible_somCastObj;
  246. typedef boolean   SOMLINK somTP_somf_MCollectible_somResetObj(somf_MCollectible *somSelf);
  247. typedef somTP_somf_MCollectible_somResetObj *somTD_somf_MCollectible_somResetObj;
  248. typedef void   SOMLINK somTP_somf_MCollectible_somDispatchV(somf_MCollectible *somSelf, 
  249.         somId methodId, 
  250.         somId descriptor, 
  251.         va_list ap);
  252. typedef somTP_somf_MCollectible_somDispatchV *somTD_somf_MCollectible_somDispatchV;
  253. typedef long   SOMLINK somTP_somf_MCollectible_somDispatchL(somf_MCollectible *somSelf, 
  254.         somId methodId, 
  255.         somId descriptor, 
  256.         va_list ap);
  257. typedef somTP_somf_MCollectible_somDispatchL *somTD_somf_MCollectible_somDispatchL;
  258. typedef void*   SOMLINK somTP_somf_MCollectible_somDispatchA(somf_MCollectible *somSelf, 
  259.         somId methodId, 
  260.         somId descriptor, 
  261.         va_list ap);
  262. typedef somTP_somf_MCollectible_somDispatchA *somTD_somf_MCollectible_somDispatchA;
  263. typedef double   SOMLINK somTP_somf_MCollectible_somDispatchD(somf_MCollectible *somSelf, 
  264.         somId methodId, 
  265.         somId descriptor, 
  266.         va_list ap);
  267. typedef somTP_somf_MCollectible_somDispatchD *somTD_somf_MCollectible_somDispatchD;
  268. typedef SOMObject*   SOMLINK somTP_somf_MCollectible_somPrintSelf(somf_MCollectible *somSelf);
  269. typedef somTP_somf_MCollectible_somPrintSelf *somTD_somf_MCollectible_somPrintSelf;
  270. typedef void   SOMLINK somTP_somf_MCollectible_somDumpSelf(somf_MCollectible *somSelf, 
  271.         long level);
  272. typedef somTP_somf_MCollectible_somDumpSelf *somTD_somf_MCollectible_somDumpSelf;
  273. typedef void   SOMLINK somTP_somf_MCollectible_somDumpSelfInt(somf_MCollectible *somSelf, 
  274.         long level);
  275. typedef somTP_somf_MCollectible_somDumpSelfInt *somTD_somf_MCollectible_somDumpSelfInt;
  276. }
  277.  
  278. #endif /* somf_MCollectible_API */
  279.  
  280.  
  281. /*
  282.  * -- This emitter treats Method Tokens as Thunks by default.
  283.  * -- Use the sc modifier "nothunks" to change this default
  284.  */
  285. #undef somresolve_
  286. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  287.  
  288. /*
  289.  * -- The C++ Wrapper Class for somf_MCollectible
  290.  */
  291. class somf_MCollectible : public SOMObject
  292. {
  293. public:
  294.  
  295. // somf_MCollectible::new creates the class object if necessary, and then uses somNewNoInit
  296. // to allocate memory and create the object. Initialization is in ctors.
  297. void *operator new(size_t)
  298. {
  299.    if (!_somf_MCollectible) somf_MCollectibleNewClass(somf_MCollectible_MajorVersion,somf_MCollectible_MinorVersion);
  300.    return (void*)
  301.       SOM_Resolve(_somf_MCollectible,SOMClass,somNewNoInit)
  302.          ((SOMClass *)((void*)_somf_MCollectible));
  303. }
  304.  
  305. // somf_MCollectible::delete uses somDestruct.
  306. void operator delete(void * obj)
  307. {
  308.    if (obj && *(void**)obj) {
  309.       SOM_Resolve(obj,SOMObject,somFree)
  310.          ((SOMObject*)obj);
  311.    }
  312. }
  313.  
  314. somf_MCollectible& operator=(somf_MCollectible& fromObj)
  315. {
  316.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  317.    return *this;
  318. }
  319.  
  320. somf_MCollectible()
  321. {
  322.    if (*(void**)this != 
  323.        ((somParentMtabStructPtr)
  324.         (somf_MCollectibleCClassData.parentMtab))->mtab)
  325.       return;
  326.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  327. }
  328.  
  329. somf_MCollectible(somf_MCollectible* fromObj)
  330. {
  331.    if (*(void**)this != 
  332.        ((somParentMtabStructPtr)
  333.         (somf_MCollectibleCClassData.parentMtab))->mtab)
  334.       return;
  335.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  336. }
  337.  
  338. #ifdef __IBMCPP__
  339. #pragma info(nocnv,nopar)
  340. #endif
  341. somf_MCollectible(const somf_MCollectible* fromObj)
  342. {
  343.    if (*(void**)this != 
  344.        ((somParentMtabStructPtr)
  345.         (somf_MCollectibleCClassData.parentMtab))->mtab)
  346.       return;
  347.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  348. }
  349. #ifdef __IBMCPP__
  350. #pragma info(restore)
  351. #endif
  352.  
  353.  
  354. /* method: somfClone */
  355. somf_MCollectible*   somfClone(Environment *ev)
  356. {
  357. /*
  358.  *  somfClone provides a general function for creating a new instance of this.
  359.  */
  360.    return SOM_ResolveD(this,somf_MCollectible,somf_MCollectible,somfClone)
  361.     (this, ev);
  362. }
  363.  
  364.  
  365. /* method: somfClonePointer */
  366. somf_MCollectible*   somfClonePointer(Environment *ev, 
  367.         somf_MCollectible* clonee)
  368. {
  369. /*
  370.  *  somfClonePointer returns a pointer to a Clone
  371.  */
  372.    return SOM_ResolveD(this,somf_MCollectible,somf_MCollectible,somfClonePointer)
  373.     (this, ev,clonee);
  374. }
  375.  
  376.  
  377. /* method: somfHash */
  378. long   somfHash(Environment *ev)
  379. {
  380. /*
  381.  *  somfHash returns a value suitable for use as a hashing probe for this.
  382.  *  The default function will simply return the address of the object.
  383.  *  The default function is almost certainly not adequate if you are overriding
  384.  *  somfIsEqual because you need to make sure that all objects that "are equal"
  385.  *  to each other return the same hash value.  For example, a TText object would
  386.  *  return a hash value computed using the characters in the string instead of
  387.  *  the address of the string.
  388.  */
  389.    return SOM_ResolveD(this,somf_MCollectible,somf_MCollectible,somfHash)
  390.     (this, ev);
  391. }
  392.  
  393.  
  394. /* method: somfIsEqual */
  395. boolean   somfIsEqual(Environment *ev, 
  396.         somf_MCollectible* obj)
  397. {
  398. /*
  399.  *  somfIsEqual returns TRUE if obj is isomorphic to this.  The default function
  400.  *  will give you a nasty message.  For example, the somfIsEqual method
  401.  *  for TText objects will do a string comparison.  All of the utility classes
  402.  *  allow you to specify what methods to use when comparing objects for
  403.  *  insertion, deletion, etc.
  404.  */
  405.    return SOM_ResolveD(this,somf_MCollectible,somf_MCollectible,somfIsEqual)
  406.     (this, ev,obj);
  407. }
  408.  
  409.  
  410. /* method: somfIsSame */
  411. boolean   somfIsSame(Environment *ev, 
  412.         somf_MCollectible* obj)
  413. {
  414. /*
  415.  *  The default function for somfIsSame is a pointer comparison
  416.  */
  417.    return SOM_ResolveD(this,somf_MCollectible,somf_MCollectible,somfIsSame)
  418.     (this, ev,obj);
  419. }
  420.  
  421.  
  422. /* method: somfIsNotEqual */
  423. boolean   somfIsNotEqual(Environment *ev, 
  424.         somf_MCollectible* obj)
  425. {
  426. /*
  427.  *  somfIsNotEqual returns TRUE if obj is NOT isomorphic to this.  It uses
  428.  *  somfIsEqual, so overriding somfIsEqual will handle the logic of somfIsNotEqual too.
  429.  */
  430.    return SOM_ResolveD(this,somf_MCollectible,somf_MCollectible,somfIsNotEqual)
  431.     (this, ev,obj);
  432. }
  433.  
  434.  
  435. /*
  436.  * Reintroduce inherited methods
  437.  */
  438.  
  439. /* initializer method: somDefaultInit */
  440. void   somDefaultInit(som3InitCtrl* ctrl)
  441. {
  442. /*
  443.  *  A default initializer for a SOM object. Passing a null ctrl
  444.  *  indicates to the receiver that its class is the class of the
  445.  *  object being initialized, whereby the initializer will determine
  446.  *  an appropriate control structure.
  447.  */
  448.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultInit)
  449.     (this,ctrl);
  450. }
  451.  
  452.  
  453. /* method: somDestruct */
  454. void   somDestruct(octet doFree, 
  455.         som3DestructCtrl* ctrl)
  456. {
  457. /*
  458.  *  The default destructor for a SOM object. A nonzero <doFree>
  459.  *  indicates that the object storage should be freed by the
  460.  *  object's class (via somDeallocate) after uninitialization.
  461.  *  As with somDefaultInit, a null ctrl can be passed.
  462.  */
  463.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDestruct)
  464.     (this,doFree,ctrl);
  465. }
  466.  
  467.  
  468. /* initializer method: somDefaultCopyInit */
  469. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  470.         SOMObject* fromObj)
  471. {
  472. /*
  473.  *  A default copy constructor. Use this to make copies of objects for
  474.  *  calling methods with "by-value" argument semantics.
  475.  */
  476.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultCopyInit)
  477.     (this,ctrl,fromObj);
  478. }
  479.  
  480.  
  481. /* method: somDefaultAssign */
  482. somf_MCollectible*  somDefaultAssign(som3AssignCtrl* ctrl, 
  483.         SOMObject* fromObj)
  484. {
  485. /*
  486.  *  A default assignment operator. Use this to "assign" the state of one
  487.  *  object to another.
  488.  */
  489.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultAssign)
  490.     (this,ctrl,fromObj);
  491. }
  492.  
  493.  
  494. /* initializer method: somDefaultConstCopyInit */
  495. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  496.         SOMObject* fromObj)
  497. {
  498. /*
  499.  *  A default copy constructor that uses a const fromObj.
  500.  */
  501.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultConstCopyInit)
  502.     (this,ctrl,fromObj);
  503. }
  504.  
  505.  
  506. /* initializer method: somDefaultVCopyInit */
  507. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  508.         SOMObject* fromObj)
  509. {
  510. /*
  511.  *  A default copy constructor that uses a volatile fromObj.
  512.  */
  513.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultVCopyInit)
  514.     (this,ctrl,fromObj);
  515. }
  516.  
  517.  
  518. /* initializer method: somDefaultConstVCopyInit */
  519. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  520.         SOMObject* fromObj)
  521. {
  522. /*
  523.  *  A default copy constructor that uses a const volatile fromObj.
  524.  */
  525.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultConstVCopyInit)
  526.     (this,ctrl,fromObj);
  527. }
  528.  
  529.  
  530. /* method: somDefaultConstAssign */
  531. somf_MCollectible*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  532.         SOMObject* fromObj)
  533. {
  534. /*
  535.  *  A default assignment operator that uses a const fromObj.
  536.  */
  537.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultConstAssign)
  538.     (this,ctrl,fromObj);
  539. }
  540.  
  541.  
  542. /* method: somDefaultVAssign */
  543. somf_MCollectible*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  544.         SOMObject* fromObj)
  545. {
  546. /*
  547.  *  A default assignment operator that uses a volatile fromObj.
  548.  */
  549.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultVAssign)
  550.     (this,ctrl,fromObj);
  551. }
  552.  
  553.  
  554. /* method: somDefaultConstVAssign */
  555. somf_MCollectible*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  556.         SOMObject* fromObj)
  557. {
  558. /*
  559.  *  A default assignment operator that uses a const volatile fromObj.
  560.  */
  561.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDefaultConstVAssign)
  562.     (this,ctrl,fromObj);
  563. }
  564.  
  565.  
  566. /* method: somInit */
  567. void   somInit()
  568. {
  569. /*
  570.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  571.  */
  572.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somInit)
  573.     (this);
  574. }
  575.  
  576.  
  577. /* method: somFree */
  578. void   somFree()
  579. {
  580. /*
  581.  *  Use as directed by framework implementations.
  582.  */
  583.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somFree)
  584.     (this);
  585. }
  586.  
  587.  
  588. /* method: somUninit */
  589. void   somUninit()
  590. {
  591. /*
  592.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  593.  */
  594.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somUninit)
  595.     (this);
  596. }
  597.  
  598.  
  599. /* method: somGetClass */
  600. SOMClass*   somGetClass()
  601. {
  602. /*
  603.  *  Return the receiver's class.
  604.  */
  605.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somGetClass)
  606.     (this);
  607. }
  608.  
  609.  
  610. /* method: somGetClassName */
  611. string   somGetClassName()
  612. {
  613. /*
  614.  *  Return the name of the receiver's class.
  615.  */
  616.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somGetClassName)
  617.     (this);
  618. }
  619.  
  620.  
  621. /* method: somGetSize */
  622. long   somGetSize()
  623. {
  624. /*
  625.  *  Return the size of the receiver.
  626.  */
  627.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somGetSize)
  628.     (this);
  629. }
  630.  
  631.  
  632. /* method: somIsA */
  633. boolean   somIsA(SOMClass* aClassObj)
  634. {
  635. /*
  636.  *  Returns 1 (true) if the receiver responds to methods
  637.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  638.  */
  639.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somIsA)
  640.     (this,aClassObj);
  641. }
  642.  
  643.  
  644. /* method: somIsInstanceOf */
  645. boolean   somIsInstanceOf(SOMClass* aClassObj)
  646. {
  647. /*
  648.  *  Returns 1 (true) if the receiver is an instance of
  649.  *  <aClassObj> and 0 (false) otherwise.
  650.  */
  651.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somIsInstanceOf)
  652.     (this,aClassObj);
  653. }
  654.  
  655.  
  656. /* method: somRespondsTo */
  657. boolean   somRespondsTo(somId mId)
  658. {
  659. /*
  660.  *  Returns 1 (true) if the indicated method can be invoked
  661.  *  on the receiver and 0 (false) otherwise.
  662.  */
  663.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somRespondsTo)
  664.     (this,mId);
  665. }
  666.  
  667.  
  668. /* va_list method: somDispatch */
  669.  
  670. /*
  671.  *  This method provides a generic, class-specific dispatch mechanism.
  672.  *  It accepts as input <retValue> a pointer to the memory area to be
  673.  *  loaded with the result of dispatching the method indicated by
  674.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  675.  *  on which the method is to be invoked as the first argument.
  676.  */
  677. /* the va_list invocation form */
  678. boolean   somf_MCollectible_somDispatch(somToken* retValue, 
  679.         somId methodId, 
  680.         va_list ap)
  681. {return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatch)
  682.     (this,retValue,methodId,ap);
  683. }
  684.  
  685. /* the varargs invocation form */
  686. boolean   somDispatch(somToken* retValue, 
  687.         somId methodId, 
  688.         ...)
  689. {
  690. /*
  691.  *  This method provides a generic, class-specific dispatch mechanism.
  692.  *  It accepts as input <retValue> a pointer to the memory area to be
  693.  *  loaded with the result of dispatching the method indicated by
  694.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  695.  *  on which the method is to be invoked as the first argument.
  696.  */
  697.    va_list ap;
  698.    va_start(ap, methodId);
  699.    boolean __somResult = 
  700.       SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatch)
  701.     (this,retValue,methodId,ap);
  702.    va_end(ap);
  703.    return __somResult;
  704. }
  705.  
  706.  
  707. /* va_list method: somClassDispatch */
  708.  
  709. /*
  710.  *  Like somDispatch, but method resolution for static methods is done
  711.  *  according to the clsObj instance method table.
  712.  */
  713. /* the va_list invocation form */
  714. boolean   somf_MCollectible_somClassDispatch(SOMClass* clsObj, 
  715.         somToken* retValue, 
  716.         somId methodId, 
  717.         va_list ap)
  718. {return SOM_ResolveD(this,somf_MCollectible,SOMObject,somClassDispatch)
  719.     (this,clsObj,retValue,methodId,ap);
  720. }
  721.  
  722. /* the varargs invocation form */
  723. boolean   somClassDispatch(SOMClass* clsObj, 
  724.         somToken* retValue, 
  725.         somId methodId, 
  726.         ...)
  727. {
  728. /*
  729.  *  Like somDispatch, but method resolution for static methods is done
  730.  *  according to the clsObj instance method table.
  731.  */
  732.    va_list ap;
  733.    va_start(ap, methodId);
  734.    boolean __somResult = 
  735.       SOM_ResolveD(this,somf_MCollectible,SOMObject,somClassDispatch)
  736.     (this,clsObj,retValue,methodId,ap);
  737.    va_end(ap);
  738.    return __somResult;
  739. }
  740.  
  741.  
  742. /* method: somCastObj */
  743. boolean   somCastObj(SOMClass* cls)
  744. {
  745. /*
  746.  *  cast the receiving object to cls (which must be an ancestor of the
  747.  *  objects true class. Returns true on success.
  748.  */
  749.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somCastObj)
  750.     (this,cls);
  751. }
  752.  
  753.  
  754. /* method: somResetObj */
  755. boolean   somResetObj()
  756. {
  757. /*
  758.  *  reset an object to its true class. Returns true always.
  759.  */
  760.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somResetObj)
  761.     (this);
  762. }
  763.  
  764.  
  765. /* va_list method: somDispatchV */
  766.  
  767. /*
  768.  *  Obsolete. Use somDispatch instead.
  769.  */
  770. /* the va_list invocation form */
  771. void   somf_MCollectible_somDispatchV(somId methodId, 
  772.         somId descriptor, 
  773.         va_list ap)
  774. {   SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchV)
  775.     (this,methodId,descriptor,ap);
  776. }
  777.  
  778. /* the varargs invocation form */
  779. void   somDispatchV(somId methodId, 
  780.         somId descriptor, 
  781.         ...)
  782. {
  783. /*
  784.  *  Obsolete. Use somDispatch instead.
  785.  */
  786.    va_list ap;
  787.    va_start(ap, descriptor);
  788.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchV)
  789.     (this,methodId,descriptor,ap);
  790.    va_end(ap);
  791. }
  792.  
  793.  
  794. /* va_list method: somDispatchL */
  795.  
  796. /*
  797.  *  Obsolete. Use somDispatch instead.
  798.  */
  799. /* the va_list invocation form */
  800. long   somf_MCollectible_somDispatchL(somId methodId, 
  801.         somId descriptor, 
  802.         va_list ap)
  803. {return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchL)
  804.     (this,methodId,descriptor,ap);
  805. }
  806.  
  807. /* the varargs invocation form */
  808. long   somDispatchL(somId methodId, 
  809.         somId descriptor, 
  810.         ...)
  811. {
  812. /*
  813.  *  Obsolete. Use somDispatch instead.
  814.  */
  815.    va_list ap;
  816.    va_start(ap, descriptor);
  817.    long __somResult = 
  818.       SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchL)
  819.     (this,methodId,descriptor,ap);
  820.    va_end(ap);
  821.    return __somResult;
  822. }
  823.  
  824.  
  825. /* va_list method: somDispatchA */
  826.  
  827. /*
  828.  *  Obsolete. Use somDispatch instead.
  829.  */
  830. /* the va_list invocation form */
  831. void*   somf_MCollectible_somDispatchA(somId methodId, 
  832.         somId descriptor, 
  833.         va_list ap)
  834. {return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchA)
  835.     (this,methodId,descriptor,ap);
  836. }
  837.  
  838. /* the varargs invocation form */
  839. void*   somDispatchA(somId methodId, 
  840.         somId descriptor, 
  841.         ...)
  842. {
  843. /*
  844.  *  Obsolete. Use somDispatch instead.
  845.  */
  846.    va_list ap;
  847.    va_start(ap, descriptor);
  848.    void* __somResult = 
  849.       SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchA)
  850.     (this,methodId,descriptor,ap);
  851.    va_end(ap);
  852.    return __somResult;
  853. }
  854.  
  855.  
  856. /* va_list method: somDispatchD */
  857.  
  858. /*
  859.  *  Obsolete. Use somDispatch instead.
  860.  */
  861. /* the va_list invocation form */
  862. double   somf_MCollectible_somDispatchD(somId methodId, 
  863.         somId descriptor, 
  864.         va_list ap)
  865. {return SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchD)
  866.     (this,methodId,descriptor,ap);
  867. }
  868.  
  869. /* the varargs invocation form */
  870. double   somDispatchD(somId methodId, 
  871.         somId descriptor, 
  872.         ...)
  873. {
  874. /*
  875.  *  Obsolete. Use somDispatch instead.
  876.  */
  877.    va_list ap;
  878.    va_start(ap, descriptor);
  879.    double __somResult = 
  880.       SOM_ResolveD(this,somf_MCollectible,SOMObject,somDispatchD)
  881.     (this,methodId,descriptor,ap);
  882.    va_end(ap);
  883.    return __somResult;
  884. }
  885.  
  886.  
  887. /* method: somPrintSelf */
  888. SOMObject*   somPrintSelf()
  889. {
  890. /*
  891.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  892.  *  information about this object.  The default implementation just gives
  893.  *  the object's class name and its address in memory.
  894.  *  <self> is returned.
  895.  */
  896.    return SOM_ResolveD(this,somf_MCollectible,SOMObject,somPrintSelf)
  897.     (this);
  898. }
  899.  
  900.  
  901. /* method: somDumpSelf */
  902. void   somDumpSelf(long level)
  903. {
  904. /*
  905.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  906.  *  and its current state.
  907.  * 
  908.  *  <level> indicates the nesting level for describing compound objects
  909.  *  it must be greater than or equal to zero.  All lines in the
  910.  *  description will be preceeded by <2*level> spaces.
  911.  * 
  912.  *  This routine only actually writes the data that concerns the object
  913.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  914.  *  the object's current state.  This approach allows readable
  915.  *  descriptions of compound objects to be constructed.
  916.  * 
  917.  *  Generally it is not necessary to override this method, if it is
  918.  *  overriden it generally must be completely replaced.
  919.  */
  920.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDumpSelf)
  921.     (this,level);
  922. }
  923.  
  924.  
  925. /* method: somDumpSelfInt */
  926. void   somDumpSelfInt(long level)
  927. {
  928. /*
  929.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  930.  *  Generally this method will need to be overridden.  When overriding
  931.  *  it, begin by calling the parent class form of this method and then
  932.  *  write in a description of your class's instance data. This will
  933.  *  result in a description of all the object's instance data going
  934.  *  from its root ancestor class to its specific class.
  935.  */
  936.    SOM_ResolveD(this,somf_MCollectible,SOMObject,somDumpSelfInt)
  937.     (this,level);
  938. }
  939.  
  940.  
  941.  
  942. };   /* somf_MCollectible */
  943.  
  944.  
  945.  
  946. #endif       /* SOM_somf_MCollectible_xh */
  947.