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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: somsid.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_SOMUTStringId_xh
  26. #define SOM_SOMUTStringId_xh
  27.  
  28. class SOMUTStringId;
  29.  
  30. /*
  31.  *  This is the abstract base class for an ASCIIZ string (an ASCII string
  32.  *  terminated with a zero) based ID. Refer to derived classes for details.
  33.  * 
  34.  *  Intances of classes derived from this one should represent a string
  35.  *  value which can be used to identify something... such as an object,
  36.  *  a file, a network node, etc, etc...
  37.  * 
  38.  */
  39.  
  40. #define SOMUTStringId_MajorVersion 2
  41. #define SOMUTStringId_MinorVersion 1
  42.  
  43. /* C++ SOM defs */
  44. #include <somcls.xh>
  45. #include <somcm.xh>
  46.  
  47. /* C++ parent defs */
  48. #ifndef SOM_SOMUTId_xh
  49. #include <somida.xh>
  50. #endif
  51.  
  52. #ifndef SOMUTStringId_API
  53. #define SOMUTStringId_API
  54. /*
  55.  * -- The Class API
  56.  */
  57.  
  58. /*
  59.  * Start of bindings for IDL types
  60.  */
  61.  
  62. class SOMClass;
  63. class SOMObject;
  64.  
  65. /*
  66.  * End of bindings for IDL types.
  67.  */
  68.  
  69. /* A procedure to create the SOMUTStringId Class */
  70. SOMEXTERN SOMClass * SOMLINK SOMUTStringIdNewClass(
  71.         integer4 majorVersion,
  72.         integer4 minorVersion);
  73.  
  74. /* The API to the SOMUTStringId class object, and the methods it introduces. */
  75. SOMEXTERN struct SOMUTStringIdClassDataStructure {
  76.     SOMClass *classObject;
  77.     somMToken somutSetIdString;
  78.     somMToken somutGetIdString;
  79.     somMToken somutGetIdStringLen;
  80.     somMToken somutEqualsString;
  81.     somMToken somutCompareString;
  82. } SOMDLINK SOMUTStringIdClassData;
  83. #define _SOMUTStringId SOMUTStringIdClassData.classObject
  84.  
  85. /* The API to parentMtabs for SOMUTStringId, and the instance data it introduces. */
  86. SOMEXTERN struct SOMUTStringIdCClassDataStructure {
  87.     somMethodTabs parentMtab;
  88.     somDToken              instanceDataToken;
  89. } SOMDLINK SOMUTStringIdCClassData;
  90.  
  91. /*
  92.  * -- Typedefs for SOMUTStringId Method Procedures
  93.  */
  94. SOMEXTERN {
  95. typedef long   SOMLINK somTP_SOMUTStringId_somutSetIdString(SOMUTStringId *somSelf, Environment *ev, 
  96.         string IdString);
  97. typedef somTP_SOMUTStringId_somutSetIdString *somTD_SOMUTStringId_somutSetIdString;
  98. typedef string   SOMLINK somTP_SOMUTStringId_somutGetIdString(SOMUTStringId *somSelf, Environment *ev, 
  99.         string toBuffer);
  100. typedef somTP_SOMUTStringId_somutGetIdString *somTD_SOMUTStringId_somutGetIdString;
  101. typedef long   SOMLINK somTP_SOMUTStringId_somutGetIdStringLen(SOMUTStringId *somSelf, Environment *ev);
  102. typedef somTP_SOMUTStringId_somutGetIdStringLen *somTD_SOMUTStringId_somutGetIdStringLen;
  103. typedef boolean   SOMLINK somTP_SOMUTStringId_somutEqualsString(SOMUTStringId *somSelf, Environment *ev, 
  104.         string IdString);
  105. typedef somTP_SOMUTStringId_somutEqualsString *somTD_SOMUTStringId_somutEqualsString;
  106. typedef short   SOMLINK somTP_SOMUTStringId_somutCompareString(SOMUTStringId *somSelf, Environment *ev, 
  107.         string IdString);
  108. typedef somTP_SOMUTStringId_somutCompareString *somTD_SOMUTStringId_somutCompareString;
  109.  
  110. /*
  111.  * -- Typedefs for Reintroduced Wrapper Methods
  112.  */
  113. typedef void   SOMLINK somTP_SOMUTStringId_somutSetIdId(SOMUTStringId *somSelf, Environment *ev, 
  114.         SOMUTId* otherId);
  115. typedef somTP_SOMUTStringId_somutSetIdId *somTD_SOMUTStringId_somutSetIdId;
  116. typedef boolean   SOMLINK somTP_SOMUTStringId_somutEqualsId(SOMUTStringId *somSelf, Environment *ev, 
  117.         SOMUTId* otherId);
  118. typedef somTP_SOMUTStringId_somutEqualsId *somTD_SOMUTStringId_somutEqualsId;
  119. typedef short   SOMLINK somTP_SOMUTStringId_somutCompareId(SOMUTStringId *somSelf, Environment *ev, 
  120.         SOMUTId* otherId);
  121. typedef somTP_SOMUTStringId_somutCompareId *somTD_SOMUTStringId_somutCompareId;
  122. typedef unsigned long   SOMLINK somTP_SOMUTStringId_somutHashId(SOMUTStringId *somSelf, Environment *ev);
  123. typedef somTP_SOMUTStringId_somutHashId *somTD_SOMUTStringId_somutHashId;
  124. typedef void   SOMLINK somTP_SOMUTStringId_somDefaultInit(SOMUTStringId *somSelf, 
  125.         som3InitCtrl* ctrl);
  126. typedef somTP_SOMUTStringId_somDefaultInit *somTD_SOMUTStringId_somDefaultInit;
  127. typedef void   SOMLINK somTP_SOMUTStringId_somDestruct(SOMUTStringId *somSelf, 
  128.         octet doFree, 
  129.         som3DestructCtrl* ctrl);
  130. typedef somTP_SOMUTStringId_somDestruct *somTD_SOMUTStringId_somDestruct;
  131. typedef void   SOMLINK somTP_SOMUTStringId_somDefaultCopyInit(SOMUTStringId *somSelf, 
  132.         som3InitCtrl* ctrl, 
  133.         SOMObject* fromObj);
  134. typedef somTP_SOMUTStringId_somDefaultCopyInit *somTD_SOMUTStringId_somDefaultCopyInit;
  135. typedef SOMUTStringId*   SOMLINK somTP_SOMUTStringId_somDefaultAssign(SOMUTStringId *somSelf, 
  136.         som3AssignCtrl* ctrl, 
  137.         SOMObject* fromObj);
  138. typedef somTP_SOMUTStringId_somDefaultAssign *somTD_SOMUTStringId_somDefaultAssign;
  139. typedef void   SOMLINK somTP_SOMUTStringId_somDefaultConstCopyInit(SOMUTStringId *somSelf, 
  140.         som3InitCtrl* ctrl, 
  141.         SOMObject* fromObj);
  142. typedef somTP_SOMUTStringId_somDefaultConstCopyInit *somTD_SOMUTStringId_somDefaultConstCopyInit;
  143. typedef void   SOMLINK somTP_SOMUTStringId_somDefaultVCopyInit(SOMUTStringId *somSelf, 
  144.         som3InitCtrl* ctrl, 
  145.         SOMObject* fromObj);
  146. typedef somTP_SOMUTStringId_somDefaultVCopyInit *somTD_SOMUTStringId_somDefaultVCopyInit;
  147. typedef void   SOMLINK somTP_SOMUTStringId_somDefaultConstVCopyInit(SOMUTStringId *somSelf, 
  148.         som3InitCtrl* ctrl, 
  149.         SOMObject* fromObj);
  150. typedef somTP_SOMUTStringId_somDefaultConstVCopyInit *somTD_SOMUTStringId_somDefaultConstVCopyInit;
  151. typedef SOMUTStringId*   SOMLINK somTP_SOMUTStringId_somDefaultConstAssign(SOMUTStringId *somSelf, 
  152.         som3AssignCtrl* ctrl, 
  153.         SOMObject* fromObj);
  154. typedef somTP_SOMUTStringId_somDefaultConstAssign *somTD_SOMUTStringId_somDefaultConstAssign;
  155. typedef SOMUTStringId*   SOMLINK somTP_SOMUTStringId_somDefaultVAssign(SOMUTStringId *somSelf, 
  156.         som3AssignCtrl* ctrl, 
  157.         SOMObject* fromObj);
  158. typedef somTP_SOMUTStringId_somDefaultVAssign *somTD_SOMUTStringId_somDefaultVAssign;
  159. typedef SOMUTStringId*   SOMLINK somTP_SOMUTStringId_somDefaultConstVAssign(SOMUTStringId *somSelf, 
  160.         som3AssignCtrl* ctrl, 
  161.         SOMObject* fromObj);
  162. typedef somTP_SOMUTStringId_somDefaultConstVAssign *somTD_SOMUTStringId_somDefaultConstVAssign;
  163. typedef void   SOMLINK somTP_SOMUTStringId_somInit(SOMUTStringId *somSelf);
  164. typedef somTP_SOMUTStringId_somInit *somTD_SOMUTStringId_somInit;
  165. typedef void   SOMLINK somTP_SOMUTStringId_somFree(SOMUTStringId *somSelf);
  166. typedef somTP_SOMUTStringId_somFree *somTD_SOMUTStringId_somFree;
  167. typedef void   SOMLINK somTP_SOMUTStringId_somUninit(SOMUTStringId *somSelf);
  168. typedef somTP_SOMUTStringId_somUninit *somTD_SOMUTStringId_somUninit;
  169. typedef SOMClass*   SOMLINK somTP_SOMUTStringId_somGetClass(SOMUTStringId *somSelf);
  170. typedef somTP_SOMUTStringId_somGetClass *somTD_SOMUTStringId_somGetClass;
  171. typedef string   SOMLINK somTP_SOMUTStringId_somGetClassName(SOMUTStringId *somSelf);
  172. typedef somTP_SOMUTStringId_somGetClassName *somTD_SOMUTStringId_somGetClassName;
  173. typedef long   SOMLINK somTP_SOMUTStringId_somGetSize(SOMUTStringId *somSelf);
  174. typedef somTP_SOMUTStringId_somGetSize *somTD_SOMUTStringId_somGetSize;
  175. typedef boolean   SOMLINK somTP_SOMUTStringId_somIsA(SOMUTStringId *somSelf, 
  176.         SOMClass* aClassObj);
  177. typedef somTP_SOMUTStringId_somIsA *somTD_SOMUTStringId_somIsA;
  178. typedef boolean   SOMLINK somTP_SOMUTStringId_somIsInstanceOf(SOMUTStringId *somSelf, 
  179.         SOMClass* aClassObj);
  180. typedef somTP_SOMUTStringId_somIsInstanceOf *somTD_SOMUTStringId_somIsInstanceOf;
  181. typedef boolean   SOMLINK somTP_SOMUTStringId_somRespondsTo(SOMUTStringId *somSelf, 
  182.         somId mId);
  183. typedef somTP_SOMUTStringId_somRespondsTo *somTD_SOMUTStringId_somRespondsTo;
  184. typedef boolean   SOMLINK somTP_SOMUTStringId_somDispatch(SOMUTStringId *somSelf, 
  185.         somToken* retValue, 
  186.         somId methodId, 
  187.         va_list ap);
  188. typedef somTP_SOMUTStringId_somDispatch *somTD_SOMUTStringId_somDispatch;
  189. typedef boolean   SOMLINK somTP_SOMUTStringId_somClassDispatch(SOMUTStringId *somSelf, 
  190.         SOMClass* clsObj, 
  191.         somToken* retValue, 
  192.         somId methodId, 
  193.         va_list ap);
  194. typedef somTP_SOMUTStringId_somClassDispatch *somTD_SOMUTStringId_somClassDispatch;
  195. typedef boolean   SOMLINK somTP_SOMUTStringId_somCastObj(SOMUTStringId *somSelf, 
  196.         SOMClass* cls);
  197. typedef somTP_SOMUTStringId_somCastObj *somTD_SOMUTStringId_somCastObj;
  198. typedef boolean   SOMLINK somTP_SOMUTStringId_somResetObj(SOMUTStringId *somSelf);
  199. typedef somTP_SOMUTStringId_somResetObj *somTD_SOMUTStringId_somResetObj;
  200. typedef void   SOMLINK somTP_SOMUTStringId_somDispatchV(SOMUTStringId *somSelf, 
  201.         somId methodId, 
  202.         somId descriptor, 
  203.         va_list ap);
  204. typedef somTP_SOMUTStringId_somDispatchV *somTD_SOMUTStringId_somDispatchV;
  205. typedef long   SOMLINK somTP_SOMUTStringId_somDispatchL(SOMUTStringId *somSelf, 
  206.         somId methodId, 
  207.         somId descriptor, 
  208.         va_list ap);
  209. typedef somTP_SOMUTStringId_somDispatchL *somTD_SOMUTStringId_somDispatchL;
  210. typedef void*   SOMLINK somTP_SOMUTStringId_somDispatchA(SOMUTStringId *somSelf, 
  211.         somId methodId, 
  212.         somId descriptor, 
  213.         va_list ap);
  214. typedef somTP_SOMUTStringId_somDispatchA *somTD_SOMUTStringId_somDispatchA;
  215. typedef double   SOMLINK somTP_SOMUTStringId_somDispatchD(SOMUTStringId *somSelf, 
  216.         somId methodId, 
  217.         somId descriptor, 
  218.         va_list ap);
  219. typedef somTP_SOMUTStringId_somDispatchD *somTD_SOMUTStringId_somDispatchD;
  220. typedef SOMObject*   SOMLINK somTP_SOMUTStringId_somPrintSelf(SOMUTStringId *somSelf);
  221. typedef somTP_SOMUTStringId_somPrintSelf *somTD_SOMUTStringId_somPrintSelf;
  222. typedef void   SOMLINK somTP_SOMUTStringId_somDumpSelf(SOMUTStringId *somSelf, 
  223.         long level);
  224. typedef somTP_SOMUTStringId_somDumpSelf *somTD_SOMUTStringId_somDumpSelf;
  225. typedef void   SOMLINK somTP_SOMUTStringId_somDumpSelfInt(SOMUTStringId *somSelf, 
  226.         long level);
  227. typedef somTP_SOMUTStringId_somDumpSelfInt *somTD_SOMUTStringId_somDumpSelfInt;
  228. }
  229.  
  230. #endif /* SOMUTStringId_API */
  231.  
  232.  
  233. /*
  234.  * -- This emitter treats Method Tokens as Thunks by default.
  235.  * -- Use the sc modifier "nothunks" to change this default
  236.  */
  237. #undef somresolve_
  238. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  239.  
  240. /*
  241.  * -- The C++ Wrapper Class for SOMUTStringId
  242.  */
  243. class SOMUTStringId : public SOMUTId
  244. {
  245. /*
  246.  *  This is the abstract base class for an ASCIIZ string (an ASCII string
  247.  *  terminated with a zero) based ID. Refer to derived classes for details.
  248.  * 
  249.  *  Intances of classes derived from this one should represent a string
  250.  *  value which can be used to identify something... such as an object,
  251.  *  a file, a network node, etc, etc...
  252.  * 
  253.  */
  254. public:
  255.  
  256. // SOMUTStringId::new creates the class object if necessary, and then uses somNewNoInit
  257. // to allocate memory and create the object. Initialization is in ctors.
  258. void *operator new(size_t)
  259. {
  260.    if (!_SOMUTStringId) SOMUTStringIdNewClass(SOMUTStringId_MajorVersion,SOMUTStringId_MinorVersion);
  261.    return (void*)
  262.       SOM_Resolve(_SOMUTStringId,SOMClass,somNewNoInit)
  263.          ((SOMClass *)((void*)_SOMUTStringId));
  264. }
  265.  
  266. // SOMUTStringId::delete uses somDestruct.
  267. void operator delete(void * obj)
  268. {
  269.    if (obj && *(void**)obj) {
  270.       SOM_Resolve(obj,SOMObject,somFree)
  271.          ((SOMObject*)obj);
  272.    }
  273. }
  274.  
  275. SOMUTStringId& operator=(SOMUTStringId& fromObj)
  276. {
  277.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  278.    return *this;
  279. }
  280.  
  281. SOMUTStringId()
  282. {
  283.    if (*(void**)this != 
  284.        ((somParentMtabStructPtr)
  285.         (SOMUTStringIdCClassData.parentMtab))->mtab)
  286.       return;
  287.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  288. }
  289.  
  290. SOMUTStringId(SOMUTStringId* fromObj)
  291. {
  292.    if (*(void**)this != 
  293.        ((somParentMtabStructPtr)
  294.         (SOMUTStringIdCClassData.parentMtab))->mtab)
  295.       return;
  296.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  297. }
  298.  
  299. #ifdef __IBMCPP__
  300. #pragma info(nocnv,nopar)
  301. #endif
  302. SOMUTStringId(const SOMUTStringId* fromObj)
  303. {
  304.    if (*(void**)this != 
  305.        ((somParentMtabStructPtr)
  306.         (SOMUTStringIdCClassData.parentMtab))->mtab)
  307.       return;
  308.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  309. }
  310. #ifdef __IBMCPP__
  311. #pragma info(restore)
  312. #endif
  313.  
  314.  
  315. /* method: somutSetIdString */
  316. long   somutSetIdString(Environment *ev, 
  317.         string IdString)
  318. {
  319. /*
  320.  *  Sets the ID to the given string.
  321.  *  Returns nonzero error code if given IdString is not syntactically correct.
  322.  */
  323.    return SOM_ResolveD(this,SOMUTStringId,SOMUTStringId,somutSetIdString)
  324.     (this, ev,IdString);
  325. }
  326.  
  327.  
  328. /* method: somutGetIdString */
  329. string   somutGetIdString(Environment *ev, 
  330.         string toBuffer)
  331. {
  332. /*
  333.  *  Stores the ID as a string into the given buffer <toBuffer> and
  334.  *  returns the buffer <toBuffer>.
  335.  *  Use somutGetIdStringLen to determine appropriate <toBuffer> size.
  336.  */
  337.    return SOM_ResolveD(this,SOMUTStringId,SOMUTStringId,somutGetIdString)
  338.     (this, ev,toBuffer);
  339. }
  340.  
  341.  
  342. /* method: somutGetIdStringLen */
  343. long   somutGetIdStringLen(Environment *ev)
  344. {
  345. /*
  346.  *  Returns the length of the ID string.
  347.  */
  348.    return SOM_ResolveD(this,SOMUTStringId,SOMUTStringId,somutGetIdStringLen)
  349.     (this, ev);
  350. }
  351.  
  352.  
  353. /* method: somutEqualsString */
  354. boolean   somutEqualsString(Environment *ev, 
  355.         string IdString)
  356. {
  357. /*
  358.  *  Checks to see if this object's ID is equivalent to the given string.
  359.  *  Returns TRUE if the ID is equivalent to the string, FALSE otherwise.
  360.  */
  361.    return SOM_ResolveD(this,SOMUTStringId,SOMUTStringId,somutEqualsString)
  362.     (this, ev,IdString);
  363. }
  364.  
  365.  
  366. /* method: somutCompareString */
  367. short   somutCompareString(Environment *ev, 
  368.         string IdString)
  369. {
  370. /*
  371.  *  Performs an ordered comparison with the given string.
  372.  *  If this ID < IdString -1 is returned.
  373.  *  If this ID = IdString  0 is returned.
  374.  *  If this ID > IdString  1 is returned.
  375.  */
  376.    return SOM_ResolveD(this,SOMUTStringId,SOMUTStringId,somutCompareString)
  377.     (this, ev,IdString);
  378. }
  379.  
  380.  
  381. /*
  382.  * Reintroduce inherited methods
  383.  */
  384.  
  385. /* method: somutSetIdId */
  386. void   somutSetIdId(Environment *ev, 
  387.         SOMUTId* otherId)
  388. {
  389. /*
  390.  *  Sets the ID equal to ID of the given ID.
  391.  */
  392.    SOM_ResolveD(this,SOMUTStringId,SOMUTId,somutSetIdId)
  393.     (this, ev,otherId);
  394. }
  395.  
  396.  
  397. /* method: somutEqualsId */
  398. boolean   somutEqualsId(Environment *ev, 
  399.         SOMUTId* otherId)
  400. {
  401. /*
  402.  *  Checks to see if this object's ID is equivalent to the given ID.
  403.  *  Returns TRUE if the ID's are equivalent, FALSE otherwise.
  404.  */
  405.    return SOM_ResolveD(this,SOMUTStringId,SOMUTId,somutEqualsId)
  406.     (this, ev,otherId);
  407. }
  408.  
  409.  
  410. /* method: somutCompareId */
  411. short   somutCompareId(Environment *ev, 
  412.         SOMUTId* otherId)
  413. {
  414. /*
  415.  *  Performs an ordered comparison with another Id.
  416.  *  If this ID < otherId  -1 is returned.
  417.  *  If this ID = otherId   0 is returned.
  418.  *  If this ID > otherId   1 is returned.
  419.  */
  420.    return SOM_ResolveD(this,SOMUTStringId,SOMUTId,somutCompareId)
  421.     (this, ev,otherId);
  422. }
  423.  
  424.  
  425. /* method: somutHashId */
  426. unsigned long   somutHashId(Environment *ev)
  427. {
  428. /*
  429.  *  Returns an unsigned integer hash value based on the ID.
  430.  */
  431.    return SOM_ResolveD(this,SOMUTStringId,SOMUTId,somutHashId)
  432.     (this, ev);
  433. }
  434.  
  435.  
  436. /* initializer method: somDefaultInit */
  437. void   somDefaultInit(som3InitCtrl* ctrl)
  438. {
  439. /*
  440.  *  A default initializer for a SOM object. Passing a null ctrl
  441.  *  indicates to the receiver that its class is the class of the
  442.  *  object being initialized, whereby the initializer will determine
  443.  *  an appropriate control structure.
  444.  */
  445.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultInit)
  446.     (this,ctrl);
  447. }
  448.  
  449.  
  450. /* method: somDestruct */
  451. void   somDestruct(octet doFree, 
  452.         som3DestructCtrl* ctrl)
  453. {
  454. /*
  455.  *  The default destructor for a SOM object. A nonzero <doFree>
  456.  *  indicates that the object storage should be freed by the
  457.  *  object's class (via somDeallocate) after uninitialization.
  458.  *  As with somDefaultInit, a null ctrl can be passed.
  459.  */
  460.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDestruct)
  461.     (this,doFree,ctrl);
  462. }
  463.  
  464.  
  465. /* initializer method: somDefaultCopyInit */
  466. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  467.         SOMObject* fromObj)
  468. {
  469. /*
  470.  *  A default copy constructor. Use this to make copies of objects for
  471.  *  calling methods with "by-value" argument semantics.
  472.  */
  473.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultCopyInit)
  474.     (this,ctrl,fromObj);
  475. }
  476.  
  477.  
  478. /* method: somDefaultAssign */
  479. SOMUTStringId*  somDefaultAssign(som3AssignCtrl* ctrl, 
  480.         SOMObject* fromObj)
  481. {
  482. /*
  483.  *  A default assignment operator. Use this to "assign" the state of one
  484.  *  object to another.
  485.  */
  486.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultAssign)
  487.     (this,ctrl,fromObj);
  488. }
  489.  
  490.  
  491. /* initializer method: somDefaultConstCopyInit */
  492. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  493.         SOMObject* fromObj)
  494. {
  495. /*
  496.  *  A default copy constructor that uses a const fromObj.
  497.  */
  498.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultConstCopyInit)
  499.     (this,ctrl,fromObj);
  500. }
  501.  
  502.  
  503. /* initializer method: somDefaultVCopyInit */
  504. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  505.         SOMObject* fromObj)
  506. {
  507. /*
  508.  *  A default copy constructor that uses a volatile fromObj.
  509.  */
  510.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultVCopyInit)
  511.     (this,ctrl,fromObj);
  512. }
  513.  
  514.  
  515. /* initializer method: somDefaultConstVCopyInit */
  516. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  517.         SOMObject* fromObj)
  518. {
  519. /*
  520.  *  A default copy constructor that uses a const volatile fromObj.
  521.  */
  522.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultConstVCopyInit)
  523.     (this,ctrl,fromObj);
  524. }
  525.  
  526.  
  527. /* method: somDefaultConstAssign */
  528. SOMUTStringId*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  529.         SOMObject* fromObj)
  530. {
  531. /*
  532.  *  A default assignment operator that uses a const fromObj.
  533.  */
  534.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultConstAssign)
  535.     (this,ctrl,fromObj);
  536. }
  537.  
  538.  
  539. /* method: somDefaultVAssign */
  540. SOMUTStringId*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  541.         SOMObject* fromObj)
  542. {
  543. /*
  544.  *  A default assignment operator that uses a volatile fromObj.
  545.  */
  546.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultVAssign)
  547.     (this,ctrl,fromObj);
  548. }
  549.  
  550.  
  551. /* method: somDefaultConstVAssign */
  552. SOMUTStringId*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  553.         SOMObject* fromObj)
  554. {
  555. /*
  556.  *  A default assignment operator that uses a const volatile fromObj.
  557.  */
  558.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDefaultConstVAssign)
  559.     (this,ctrl,fromObj);
  560. }
  561.  
  562.  
  563. /* method: somInit */
  564. void   somInit()
  565. {
  566. /*
  567.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  568.  */
  569.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somInit)
  570.     (this);
  571. }
  572.  
  573.  
  574. /* method: somFree */
  575. void   somFree()
  576. {
  577. /*
  578.  *  Use as directed by framework implementations.
  579.  */
  580.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somFree)
  581.     (this);
  582. }
  583.  
  584.  
  585. /* method: somUninit */
  586. void   somUninit()
  587. {
  588. /*
  589.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  590.  */
  591.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somUninit)
  592.     (this);
  593. }
  594.  
  595.  
  596. /* method: somGetClass */
  597. SOMClass*   somGetClass()
  598. {
  599. /*
  600.  *  Return the receiver's class.
  601.  */
  602.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somGetClass)
  603.     (this);
  604. }
  605.  
  606.  
  607. /* method: somGetClassName */
  608. string   somGetClassName()
  609. {
  610. /*
  611.  *  Return the name of the receiver's class.
  612.  */
  613.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somGetClassName)
  614.     (this);
  615. }
  616.  
  617.  
  618. /* method: somGetSize */
  619. long   somGetSize()
  620. {
  621. /*
  622.  *  Return the size of the receiver.
  623.  */
  624.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somGetSize)
  625.     (this);
  626. }
  627.  
  628.  
  629. /* method: somIsA */
  630. boolean   somIsA(SOMClass* aClassObj)
  631. {
  632. /*
  633.  *  Returns 1 (true) if the receiver responds to methods
  634.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  635.  */
  636.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somIsA)
  637.     (this,aClassObj);
  638. }
  639.  
  640.  
  641. /* method: somIsInstanceOf */
  642. boolean   somIsInstanceOf(SOMClass* aClassObj)
  643. {
  644. /*
  645.  *  Returns 1 (true) if the receiver is an instance of
  646.  *  <aClassObj> and 0 (false) otherwise.
  647.  */
  648.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somIsInstanceOf)
  649.     (this,aClassObj);
  650. }
  651.  
  652.  
  653. /* method: somRespondsTo */
  654. boolean   somRespondsTo(somId mId)
  655. {
  656. /*
  657.  *  Returns 1 (true) if the indicated method can be invoked
  658.  *  on the receiver and 0 (false) otherwise.
  659.  */
  660.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somRespondsTo)
  661.     (this,mId);
  662. }
  663.  
  664.  
  665. /* va_list method: somDispatch */
  666.  
  667. /*
  668.  *  This method provides a generic, class-specific dispatch mechanism.
  669.  *  It accepts as input <retValue> a pointer to the memory area to be
  670.  *  loaded with the result of dispatching the method indicated by
  671.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  672.  *  on which the method is to be invoked as the first argument.
  673.  */
  674. /* the va_list invocation form */
  675. boolean   SOMUTStringId_somDispatch(somToken* retValue, 
  676.         somId methodId, 
  677.         va_list ap)
  678. {return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatch)
  679.     (this,retValue,methodId,ap);
  680. }
  681.  
  682. /* the varargs invocation form */
  683. boolean   somDispatch(somToken* retValue, 
  684.         somId methodId, 
  685.         ...)
  686. {
  687. /*
  688.  *  This method provides a generic, class-specific dispatch mechanism.
  689.  *  It accepts as input <retValue> a pointer to the memory area to be
  690.  *  loaded with the result of dispatching the method indicated by
  691.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  692.  *  on which the method is to be invoked as the first argument.
  693.  */
  694.    va_list ap;
  695.    va_start(ap, methodId);
  696.    boolean __somResult = 
  697.       SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatch)
  698.     (this,retValue,methodId,ap);
  699.    va_end(ap);
  700.    return __somResult;
  701. }
  702.  
  703.  
  704. /* va_list method: somClassDispatch */
  705.  
  706. /*
  707.  *  Like somDispatch, but method resolution for static methods is done
  708.  *  according to the clsObj instance method table.
  709.  */
  710. /* the va_list invocation form */
  711. boolean   SOMUTStringId_somClassDispatch(SOMClass* clsObj, 
  712.         somToken* retValue, 
  713.         somId methodId, 
  714.         va_list ap)
  715. {return SOM_ResolveD(this,SOMUTStringId,SOMObject,somClassDispatch)
  716.     (this,clsObj,retValue,methodId,ap);
  717. }
  718.  
  719. /* the varargs invocation form */
  720. boolean   somClassDispatch(SOMClass* clsObj, 
  721.         somToken* retValue, 
  722.         somId methodId, 
  723.         ...)
  724. {
  725. /*
  726.  *  Like somDispatch, but method resolution for static methods is done
  727.  *  according to the clsObj instance method table.
  728.  */
  729.    va_list ap;
  730.    va_start(ap, methodId);
  731.    boolean __somResult = 
  732.       SOM_ResolveD(this,SOMUTStringId,SOMObject,somClassDispatch)
  733.     (this,clsObj,retValue,methodId,ap);
  734.    va_end(ap);
  735.    return __somResult;
  736. }
  737.  
  738.  
  739. /* method: somCastObj */
  740. boolean   somCastObj(SOMClass* cls)
  741. {
  742. /*
  743.  *  cast the receiving object to cls (which must be an ancestor of the
  744.  *  objects true class. Returns true on success.
  745.  */
  746.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somCastObj)
  747.     (this,cls);
  748. }
  749.  
  750.  
  751. /* method: somResetObj */
  752. boolean   somResetObj()
  753. {
  754. /*
  755.  *  reset an object to its true class. Returns true always.
  756.  */
  757.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somResetObj)
  758.     (this);
  759. }
  760.  
  761.  
  762. /* va_list method: somDispatchV */
  763.  
  764. /*
  765.  *  Obsolete. Use somDispatch instead.
  766.  */
  767. /* the va_list invocation form */
  768. void   SOMUTStringId_somDispatchV(somId methodId, 
  769.         somId descriptor, 
  770.         va_list ap)
  771. {   SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchV)
  772.     (this,methodId,descriptor,ap);
  773. }
  774.  
  775. /* the varargs invocation form */
  776. void   somDispatchV(somId methodId, 
  777.         somId descriptor, 
  778.         ...)
  779. {
  780. /*
  781.  *  Obsolete. Use somDispatch instead.
  782.  */
  783.    va_list ap;
  784.    va_start(ap, descriptor);
  785.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchV)
  786.     (this,methodId,descriptor,ap);
  787.    va_end(ap);
  788. }
  789.  
  790.  
  791. /* va_list method: somDispatchL */
  792.  
  793. /*
  794.  *  Obsolete. Use somDispatch instead.
  795.  */
  796. /* the va_list invocation form */
  797. long   SOMUTStringId_somDispatchL(somId methodId, 
  798.         somId descriptor, 
  799.         va_list ap)
  800. {return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchL)
  801.     (this,methodId,descriptor,ap);
  802. }
  803.  
  804. /* the varargs invocation form */
  805. long   somDispatchL(somId methodId, 
  806.         somId descriptor, 
  807.         ...)
  808. {
  809. /*
  810.  *  Obsolete. Use somDispatch instead.
  811.  */
  812.    va_list ap;
  813.    va_start(ap, descriptor);
  814.    long __somResult = 
  815.       SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchL)
  816.     (this,methodId,descriptor,ap);
  817.    va_end(ap);
  818.    return __somResult;
  819. }
  820.  
  821.  
  822. /* va_list method: somDispatchA */
  823.  
  824. /*
  825.  *  Obsolete. Use somDispatch instead.
  826.  */
  827. /* the va_list invocation form */
  828. void*   SOMUTStringId_somDispatchA(somId methodId, 
  829.         somId descriptor, 
  830.         va_list ap)
  831. {return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchA)
  832.     (this,methodId,descriptor,ap);
  833. }
  834.  
  835. /* the varargs invocation form */
  836. void*   somDispatchA(somId methodId, 
  837.         somId descriptor, 
  838.         ...)
  839. {
  840. /*
  841.  *  Obsolete. Use somDispatch instead.
  842.  */
  843.    va_list ap;
  844.    va_start(ap, descriptor);
  845.    void* __somResult = 
  846.       SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchA)
  847.     (this,methodId,descriptor,ap);
  848.    va_end(ap);
  849.    return __somResult;
  850. }
  851.  
  852.  
  853. /* va_list method: somDispatchD */
  854.  
  855. /*
  856.  *  Obsolete. Use somDispatch instead.
  857.  */
  858. /* the va_list invocation form */
  859. double   SOMUTStringId_somDispatchD(somId methodId, 
  860.         somId descriptor, 
  861.         va_list ap)
  862. {return SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchD)
  863.     (this,methodId,descriptor,ap);
  864. }
  865.  
  866. /* the varargs invocation form */
  867. double   somDispatchD(somId methodId, 
  868.         somId descriptor, 
  869.         ...)
  870. {
  871. /*
  872.  *  Obsolete. Use somDispatch instead.
  873.  */
  874.    va_list ap;
  875.    va_start(ap, descriptor);
  876.    double __somResult = 
  877.       SOM_ResolveD(this,SOMUTStringId,SOMObject,somDispatchD)
  878.     (this,methodId,descriptor,ap);
  879.    va_end(ap);
  880.    return __somResult;
  881. }
  882.  
  883.  
  884. /* method: somPrintSelf */
  885. SOMObject*   somPrintSelf()
  886. {
  887. /*
  888.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  889.  *  information about this object.  The default implementation just gives
  890.  *  the object's class name and its address in memory.
  891.  *  <self> is returned.
  892.  */
  893.    return SOM_ResolveD(this,SOMUTStringId,SOMObject,somPrintSelf)
  894.     (this);
  895. }
  896.  
  897.  
  898. /* method: somDumpSelf */
  899. void   somDumpSelf(long level)
  900. {
  901. /*
  902.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  903.  *  and its current state.
  904.  * 
  905.  *  <level> indicates the nesting level for describing compound objects
  906.  *  it must be greater than or equal to zero.  All lines in the
  907.  *  description will be preceeded by <2*level> spaces.
  908.  * 
  909.  *  This routine only actually writes the data that concerns the object
  910.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  911.  *  the object's current state.  This approach allows readable
  912.  *  descriptions of compound objects to be constructed.
  913.  * 
  914.  *  Generally it is not necessary to override this method, if it is
  915.  *  overriden it generally must be completely replaced.
  916.  */
  917.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDumpSelf)
  918.     (this,level);
  919. }
  920.  
  921.  
  922. /* method: somDumpSelfInt */
  923. void   somDumpSelfInt(long level)
  924. {
  925. /*
  926.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  927.  *  Generally this method will need to be overridden.  When overriding
  928.  *  it, begin by calling the parent class form of this method and then
  929.  *  write in a description of your class's instance data. This will
  930.  *  result in a description of all the object's instance data going
  931.  *  from its root ancestor class to its specific class.
  932.  */
  933.    SOM_ResolveD(this,SOMUTStringId,SOMObject,somDumpSelfInt)
  934.     (this,level);
  935. }
  936.  
  937.  
  938.  
  939. };   /* SOMUTStringId */
  940.  
  941.  
  942.  
  943. #endif       /* SOM_SOMUTStringId_xh */
  944.