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

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