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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: nameable.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somr
  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_SOMRNameable_xh
  26. #define SOM_SOMRNameable_xh
  27.  
  28. class SOMRNameable;
  29.  
  30. /*
  31.  * Any object derived from this class would have a string name.
  32.  */
  33.  
  34. #define SOMRNameable_MajorVersion 2
  35. #define SOMRNameable_MinorVersion 1
  36.  
  37. /* C++ SOM defs */
  38. #include <somcls.xh>
  39. #include <somcm.xh>
  40.  
  41. /* C++ parent defs */
  42. #ifndef SOM_SOMObject_xh
  43. #include <somobj.xh>
  44. #endif
  45.  
  46. #ifndef SOMRNameable_API
  47. #define SOMRNameable_API
  48. /*
  49.  * -- The Class API
  50.  */
  51.  
  52. /*
  53.  * Start of bindings for IDL types
  54.  */
  55.  
  56. class SOMClass;
  57. class SOMObject;
  58.  
  59. /*
  60.  * End of bindings for IDL types.
  61.  */
  62.  
  63. /* A procedure to create the SOMRNameable Class */
  64. SOMEXTERN SOMClass * SOMLINK SOMRNameableNewClass(
  65.         integer4 majorVersion,
  66.         integer4 minorVersion);
  67.  
  68. /* The API to the SOMRNameable class object, and the methods it introduces. */
  69. SOMEXTERN struct SOMRNameableClassDataStructure {
  70.     SOMClass *classObject;
  71.     somMToken somrSetObjName;
  72.     somMToken somrGetObjName;
  73. } SOMDLINK SOMRNameableClassData;
  74. #define _SOMRNameable SOMRNameableClassData.classObject
  75.  
  76. /* The API to parentMtabs for SOMRNameable, and the instance data it introduces. */
  77. SOMEXTERN struct SOMRNameableCClassDataStructure {
  78.     somMethodTabs parentMtab;
  79.     somDToken              instanceDataToken;
  80. } SOMDLINK SOMRNameableCClassData;
  81.  
  82. /*
  83.  * -- Typedefs for SOMRNameable Method Procedures
  84.  */
  85. SOMEXTERN {
  86. typedef void   SOMLINK somTP_SOMRNameable_somrSetObjName(SOMRNameable *somSelf, Environment *ev, 
  87.         string name);
  88. typedef somTP_SOMRNameable_somrSetObjName *somTD_SOMRNameable_somrSetObjName;
  89. typedef string   SOMLINK somTP_SOMRNameable_somrGetObjName(SOMRNameable *somSelf, Environment *ev);
  90. typedef somTP_SOMRNameable_somrGetObjName *somTD_SOMRNameable_somrGetObjName;
  91.  
  92. /*
  93.  * -- Typedefs for Reintroduced Wrapper Methods
  94.  */
  95. typedef void   SOMLINK somTP_SOMRNameable_somDefaultInit(SOMRNameable *somSelf, 
  96.         som3InitCtrl* ctrl);
  97. typedef somTP_SOMRNameable_somDefaultInit *somTD_SOMRNameable_somDefaultInit;
  98. typedef void   SOMLINK somTP_SOMRNameable_somDestruct(SOMRNameable *somSelf, 
  99.         octet doFree, 
  100.         som3DestructCtrl* ctrl);
  101. typedef somTP_SOMRNameable_somDestruct *somTD_SOMRNameable_somDestruct;
  102. typedef void   SOMLINK somTP_SOMRNameable_somDefaultCopyInit(SOMRNameable *somSelf, 
  103.         som3InitCtrl* ctrl, 
  104.         SOMObject* fromObj);
  105. typedef somTP_SOMRNameable_somDefaultCopyInit *somTD_SOMRNameable_somDefaultCopyInit;
  106. typedef SOMRNameable*   SOMLINK somTP_SOMRNameable_somDefaultAssign(SOMRNameable *somSelf, 
  107.         som3AssignCtrl* ctrl, 
  108.         SOMObject* fromObj);
  109. typedef somTP_SOMRNameable_somDefaultAssign *somTD_SOMRNameable_somDefaultAssign;
  110. typedef void   SOMLINK somTP_SOMRNameable_somDefaultConstCopyInit(SOMRNameable *somSelf, 
  111.         som3InitCtrl* ctrl, 
  112.         SOMObject* fromObj);
  113. typedef somTP_SOMRNameable_somDefaultConstCopyInit *somTD_SOMRNameable_somDefaultConstCopyInit;
  114. typedef void   SOMLINK somTP_SOMRNameable_somDefaultVCopyInit(SOMRNameable *somSelf, 
  115.         som3InitCtrl* ctrl, 
  116.         SOMObject* fromObj);
  117. typedef somTP_SOMRNameable_somDefaultVCopyInit *somTD_SOMRNameable_somDefaultVCopyInit;
  118. typedef void   SOMLINK somTP_SOMRNameable_somDefaultConstVCopyInit(SOMRNameable *somSelf, 
  119.         som3InitCtrl* ctrl, 
  120.         SOMObject* fromObj);
  121. typedef somTP_SOMRNameable_somDefaultConstVCopyInit *somTD_SOMRNameable_somDefaultConstVCopyInit;
  122. typedef SOMRNameable*   SOMLINK somTP_SOMRNameable_somDefaultConstAssign(SOMRNameable *somSelf, 
  123.         som3AssignCtrl* ctrl, 
  124.         SOMObject* fromObj);
  125. typedef somTP_SOMRNameable_somDefaultConstAssign *somTD_SOMRNameable_somDefaultConstAssign;
  126. typedef SOMRNameable*   SOMLINK somTP_SOMRNameable_somDefaultVAssign(SOMRNameable *somSelf, 
  127.         som3AssignCtrl* ctrl, 
  128.         SOMObject* fromObj);
  129. typedef somTP_SOMRNameable_somDefaultVAssign *somTD_SOMRNameable_somDefaultVAssign;
  130. typedef SOMRNameable*   SOMLINK somTP_SOMRNameable_somDefaultConstVAssign(SOMRNameable *somSelf, 
  131.         som3AssignCtrl* ctrl, 
  132.         SOMObject* fromObj);
  133. typedef somTP_SOMRNameable_somDefaultConstVAssign *somTD_SOMRNameable_somDefaultConstVAssign;
  134. typedef void   SOMLINK somTP_SOMRNameable_somInit(SOMRNameable *somSelf);
  135. typedef somTP_SOMRNameable_somInit *somTD_SOMRNameable_somInit;
  136. typedef void   SOMLINK somTP_SOMRNameable_somFree(SOMRNameable *somSelf);
  137. typedef somTP_SOMRNameable_somFree *somTD_SOMRNameable_somFree;
  138. typedef void   SOMLINK somTP_SOMRNameable_somUninit(SOMRNameable *somSelf);
  139. typedef somTP_SOMRNameable_somUninit *somTD_SOMRNameable_somUninit;
  140. typedef SOMClass*   SOMLINK somTP_SOMRNameable_somGetClass(SOMRNameable *somSelf);
  141. typedef somTP_SOMRNameable_somGetClass *somTD_SOMRNameable_somGetClass;
  142. typedef string   SOMLINK somTP_SOMRNameable_somGetClassName(SOMRNameable *somSelf);
  143. typedef somTP_SOMRNameable_somGetClassName *somTD_SOMRNameable_somGetClassName;
  144. typedef long   SOMLINK somTP_SOMRNameable_somGetSize(SOMRNameable *somSelf);
  145. typedef somTP_SOMRNameable_somGetSize *somTD_SOMRNameable_somGetSize;
  146. typedef boolean   SOMLINK somTP_SOMRNameable_somIsA(SOMRNameable *somSelf, 
  147.         SOMClass* aClassObj);
  148. typedef somTP_SOMRNameable_somIsA *somTD_SOMRNameable_somIsA;
  149. typedef boolean   SOMLINK somTP_SOMRNameable_somIsInstanceOf(SOMRNameable *somSelf, 
  150.         SOMClass* aClassObj);
  151. typedef somTP_SOMRNameable_somIsInstanceOf *somTD_SOMRNameable_somIsInstanceOf;
  152. typedef boolean   SOMLINK somTP_SOMRNameable_somRespondsTo(SOMRNameable *somSelf, 
  153.         somId mId);
  154. typedef somTP_SOMRNameable_somRespondsTo *somTD_SOMRNameable_somRespondsTo;
  155. typedef boolean   SOMLINK somTP_SOMRNameable_somDispatch(SOMRNameable *somSelf, 
  156.         somToken* retValue, 
  157.         somId methodId, 
  158.         va_list ap);
  159. typedef somTP_SOMRNameable_somDispatch *somTD_SOMRNameable_somDispatch;
  160. typedef boolean   SOMLINK somTP_SOMRNameable_somClassDispatch(SOMRNameable *somSelf, 
  161.         SOMClass* clsObj, 
  162.         somToken* retValue, 
  163.         somId methodId, 
  164.         va_list ap);
  165. typedef somTP_SOMRNameable_somClassDispatch *somTD_SOMRNameable_somClassDispatch;
  166. typedef boolean   SOMLINK somTP_SOMRNameable_somCastObj(SOMRNameable *somSelf, 
  167.         SOMClass* cls);
  168. typedef somTP_SOMRNameable_somCastObj *somTD_SOMRNameable_somCastObj;
  169. typedef boolean   SOMLINK somTP_SOMRNameable_somResetObj(SOMRNameable *somSelf);
  170. typedef somTP_SOMRNameable_somResetObj *somTD_SOMRNameable_somResetObj;
  171. typedef void   SOMLINK somTP_SOMRNameable_somDispatchV(SOMRNameable *somSelf, 
  172.         somId methodId, 
  173.         somId descriptor, 
  174.         va_list ap);
  175. typedef somTP_SOMRNameable_somDispatchV *somTD_SOMRNameable_somDispatchV;
  176. typedef long   SOMLINK somTP_SOMRNameable_somDispatchL(SOMRNameable *somSelf, 
  177.         somId methodId, 
  178.         somId descriptor, 
  179.         va_list ap);
  180. typedef somTP_SOMRNameable_somDispatchL *somTD_SOMRNameable_somDispatchL;
  181. typedef void*   SOMLINK somTP_SOMRNameable_somDispatchA(SOMRNameable *somSelf, 
  182.         somId methodId, 
  183.         somId descriptor, 
  184.         va_list ap);
  185. typedef somTP_SOMRNameable_somDispatchA *somTD_SOMRNameable_somDispatchA;
  186. typedef double   SOMLINK somTP_SOMRNameable_somDispatchD(SOMRNameable *somSelf, 
  187.         somId methodId, 
  188.         somId descriptor, 
  189.         va_list ap);
  190. typedef somTP_SOMRNameable_somDispatchD *somTD_SOMRNameable_somDispatchD;
  191. typedef SOMObject*   SOMLINK somTP_SOMRNameable_somPrintSelf(SOMRNameable *somSelf);
  192. typedef somTP_SOMRNameable_somPrintSelf *somTD_SOMRNameable_somPrintSelf;
  193. typedef void   SOMLINK somTP_SOMRNameable_somDumpSelf(SOMRNameable *somSelf, 
  194.         long level);
  195. typedef somTP_SOMRNameable_somDumpSelf *somTD_SOMRNameable_somDumpSelf;
  196. typedef void   SOMLINK somTP_SOMRNameable_somDumpSelfInt(SOMRNameable *somSelf, 
  197.         long level);
  198. typedef somTP_SOMRNameable_somDumpSelfInt *somTD_SOMRNameable_somDumpSelfInt;
  199. }
  200.  
  201. #endif /* SOMRNameable_API */
  202.  
  203.  
  204. /*
  205.  * -- This emitter treats Method Tokens as Thunks by default.
  206.  * -- Use the sc modifier "nothunks" to change this default
  207.  */
  208. #undef somresolve_
  209. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  210.  
  211. /*
  212.  * -- The C++ Wrapper Class for SOMRNameable
  213.  */
  214. class SOMRNameable : public SOMObject
  215. {
  216. /*
  217.  * Any object derived from this class would have a string name.
  218.  */
  219. public:
  220.  
  221. // SOMRNameable::new creates the class object if necessary, and then uses somNewNoInit
  222. // to allocate memory and create the object. Initialization is in ctors.
  223. void *operator new(size_t)
  224. {
  225.    if (!_SOMRNameable) SOMRNameableNewClass(SOMRNameable_MajorVersion,SOMRNameable_MinorVersion);
  226.    return (void*)
  227.       SOM_Resolve(_SOMRNameable,SOMClass,somNewNoInit)
  228.          ((SOMClass *)((void*)_SOMRNameable));
  229. }
  230.  
  231. // SOMRNameable::delete uses somDestruct.
  232. void operator delete(void * obj)
  233. {
  234.    if (obj && *(void**)obj) {
  235.       SOM_Resolve(obj,SOMObject,somFree)
  236.          ((SOMObject*)obj);
  237.    }
  238. }
  239.  
  240. SOMRNameable& operator=(SOMRNameable& fromObj)
  241. {
  242.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  243.    return *this;
  244. }
  245.  
  246. SOMRNameable()
  247. {
  248.    if (*(void**)this != 
  249.        ((somParentMtabStructPtr)
  250.         (SOMRNameableCClassData.parentMtab))->mtab)
  251.       return;
  252.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  253. }
  254.  
  255. SOMRNameable(SOMRNameable* fromObj)
  256. {
  257.    if (*(void**)this != 
  258.        ((somParentMtabStructPtr)
  259.         (SOMRNameableCClassData.parentMtab))->mtab)
  260.       return;
  261.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  262. }
  263.  
  264. #ifdef __IBMCPP__
  265. #pragma info(nocnv,nopar)
  266. #endif
  267. SOMRNameable(const SOMRNameable* fromObj)
  268. {
  269.    if (*(void**)this != 
  270.        ((somParentMtabStructPtr)
  271.         (SOMRNameableCClassData.parentMtab))->mtab)
  272.       return;
  273.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  274. }
  275. #ifdef __IBMCPP__
  276. #pragma info(restore)
  277. #endif
  278.  
  279.  
  280. /* method: somrSetObjName */
  281. void   somrSetObjName(Environment *ev, 
  282.         string name)
  283. {
  284. /*
  285.  *  Sets the internal pointer to "name" .
  286.  *            The OWNERSHIP of the string is transferred to this object.
  287.  */
  288.    SOM_ResolveD(this,SOMRNameable,SOMRNameable,somrSetObjName)
  289.     (this, ev,name);
  290. }
  291.  
  292.  
  293. /* method: somrGetObjName */
  294. string   somrGetObjName(Environment *ev)
  295. {
  296. /*
  297.  *  Returns a pointer to the name string.
  298.  *           The OWNERSHIP of the string stays with this object.
  299.  */
  300.    return SOM_ResolveD(this,SOMRNameable,SOMRNameable,somrGetObjName)
  301.     (this, ev);
  302. }
  303.  
  304.  
  305. /*
  306.  * Reintroduce inherited methods
  307.  */
  308.  
  309. /* initializer method: somDefaultInit */
  310. void   somDefaultInit(som3InitCtrl* ctrl)
  311. {
  312. /*
  313.  *  A default initializer for a SOM object. Passing a null ctrl
  314.  *  indicates to the receiver that its class is the class of the
  315.  *  object being initialized, whereby the initializer will determine
  316.  *  an appropriate control structure.
  317.  */
  318.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultInit)
  319.     (this,ctrl);
  320. }
  321.  
  322.  
  323. /* method: somDestruct */
  324. void   somDestruct(octet doFree, 
  325.         som3DestructCtrl* ctrl)
  326. {
  327. /*
  328.  *  The default destructor for a SOM object. A nonzero <doFree>
  329.  *  indicates that the object storage should be freed by the
  330.  *  object's class (via somDeallocate) after uninitialization.
  331.  *  As with somDefaultInit, a null ctrl can be passed.
  332.  */
  333.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDestruct)
  334.     (this,doFree,ctrl);
  335. }
  336.  
  337.  
  338. /* initializer method: somDefaultCopyInit */
  339. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  340.         SOMObject* fromObj)
  341. {
  342. /*
  343.  *  A default copy constructor. Use this to make copies of objects for
  344.  *  calling methods with "by-value" argument semantics.
  345.  */
  346.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultCopyInit)
  347.     (this,ctrl,fromObj);
  348. }
  349.  
  350.  
  351. /* method: somDefaultAssign */
  352. SOMRNameable*  somDefaultAssign(som3AssignCtrl* ctrl, 
  353.         SOMObject* fromObj)
  354. {
  355. /*
  356.  *  A default assignment operator. Use this to "assign" the state of one
  357.  *  object to another.
  358.  */
  359.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultAssign)
  360.     (this,ctrl,fromObj);
  361. }
  362.  
  363.  
  364. /* initializer method: somDefaultConstCopyInit */
  365. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  366.         SOMObject* fromObj)
  367. {
  368. /*
  369.  *  A default copy constructor that uses a const fromObj.
  370.  */
  371.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultConstCopyInit)
  372.     (this,ctrl,fromObj);
  373. }
  374.  
  375.  
  376. /* initializer method: somDefaultVCopyInit */
  377. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  378.         SOMObject* fromObj)
  379. {
  380. /*
  381.  *  A default copy constructor that uses a volatile fromObj.
  382.  */
  383.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultVCopyInit)
  384.     (this,ctrl,fromObj);
  385. }
  386.  
  387.  
  388. /* initializer method: somDefaultConstVCopyInit */
  389. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  390.         SOMObject* fromObj)
  391. {
  392. /*
  393.  *  A default copy constructor that uses a const volatile fromObj.
  394.  */
  395.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultConstVCopyInit)
  396.     (this,ctrl,fromObj);
  397. }
  398.  
  399.  
  400. /* method: somDefaultConstAssign */
  401. SOMRNameable*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  402.         SOMObject* fromObj)
  403. {
  404. /*
  405.  *  A default assignment operator that uses a const fromObj.
  406.  */
  407.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultConstAssign)
  408.     (this,ctrl,fromObj);
  409. }
  410.  
  411.  
  412. /* method: somDefaultVAssign */
  413. SOMRNameable*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  414.         SOMObject* fromObj)
  415. {
  416. /*
  417.  *  A default assignment operator that uses a volatile fromObj.
  418.  */
  419.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultVAssign)
  420.     (this,ctrl,fromObj);
  421. }
  422.  
  423.  
  424. /* method: somDefaultConstVAssign */
  425. SOMRNameable*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  426.         SOMObject* fromObj)
  427. {
  428. /*
  429.  *  A default assignment operator that uses a const volatile fromObj.
  430.  */
  431.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somDefaultConstVAssign)
  432.     (this,ctrl,fromObj);
  433. }
  434.  
  435.  
  436. /* method: somInit */
  437. void   somInit()
  438. {
  439. /*
  440.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  441.  */
  442.    SOM_ResolveD(this,SOMRNameable,SOMObject,somInit)
  443.     (this);
  444. }
  445.  
  446.  
  447. /* method: somFree */
  448. void   somFree()
  449. {
  450. /*
  451.  *  Use as directed by framework implementations.
  452.  */
  453.    SOM_ResolveD(this,SOMRNameable,SOMObject,somFree)
  454.     (this);
  455. }
  456.  
  457.  
  458. /* method: somUninit */
  459. void   somUninit()
  460. {
  461. /*
  462.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  463.  */
  464.    SOM_ResolveD(this,SOMRNameable,SOMObject,somUninit)
  465.     (this);
  466. }
  467.  
  468.  
  469. /* method: somGetClass */
  470. SOMClass*   somGetClass()
  471. {
  472. /*
  473.  *  Return the receiver's class.
  474.  */
  475.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somGetClass)
  476.     (this);
  477. }
  478.  
  479.  
  480. /* method: somGetClassName */
  481. string   somGetClassName()
  482. {
  483. /*
  484.  *  Return the name of the receiver's class.
  485.  */
  486.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somGetClassName)
  487.     (this);
  488. }
  489.  
  490.  
  491. /* method: somGetSize */
  492. long   somGetSize()
  493. {
  494. /*
  495.  *  Return the size of the receiver.
  496.  */
  497.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somGetSize)
  498.     (this);
  499. }
  500.  
  501.  
  502. /* method: somIsA */
  503. boolean   somIsA(SOMClass* aClassObj)
  504. {
  505. /*
  506.  *  Returns 1 (true) if the receiver responds to methods
  507.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  508.  */
  509.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somIsA)
  510.     (this,aClassObj);
  511. }
  512.  
  513.  
  514. /* method: somIsInstanceOf */
  515. boolean   somIsInstanceOf(SOMClass* aClassObj)
  516. {
  517. /*
  518.  *  Returns 1 (true) if the receiver is an instance of
  519.  *  <aClassObj> and 0 (false) otherwise.
  520.  */
  521.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somIsInstanceOf)
  522.     (this,aClassObj);
  523. }
  524.  
  525.  
  526. /* method: somRespondsTo */
  527. boolean   somRespondsTo(somId mId)
  528. {
  529. /*
  530.  *  Returns 1 (true) if the indicated method can be invoked
  531.  *  on the receiver and 0 (false) otherwise.
  532.  */
  533.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somRespondsTo)
  534.     (this,mId);
  535. }
  536.  
  537.  
  538. /* va_list method: somDispatch */
  539.  
  540. /*
  541.  *  This method provides a generic, class-specific dispatch mechanism.
  542.  *  It accepts as input <retValue> a pointer to the memory area to be
  543.  *  loaded with the result of dispatching the method indicated by
  544.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  545.  *  on which the method is to be invoked as the first argument.
  546.  */
  547. /* the va_list invocation form */
  548. boolean   SOMRNameable_somDispatch(somToken* retValue, 
  549.         somId methodId, 
  550.         va_list ap)
  551. {return SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatch)
  552.     (this,retValue,methodId,ap);
  553. }
  554.  
  555. /* the varargs invocation form */
  556. boolean   somDispatch(somToken* retValue, 
  557.         somId methodId, 
  558.         ...)
  559. {
  560. /*
  561.  *  This method provides a generic, class-specific dispatch mechanism.
  562.  *  It accepts as input <retValue> a pointer to the memory area to be
  563.  *  loaded with the result of dispatching the method indicated by
  564.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  565.  *  on which the method is to be invoked as the first argument.
  566.  */
  567.    va_list ap;
  568.    va_start(ap, methodId);
  569.    boolean __somResult = 
  570.       SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatch)
  571.     (this,retValue,methodId,ap);
  572.    va_end(ap);
  573.    return __somResult;
  574. }
  575.  
  576.  
  577. /* va_list method: somClassDispatch */
  578.  
  579. /*
  580.  *  Like somDispatch, but method resolution for static methods is done
  581.  *  according to the clsObj instance method table.
  582.  */
  583. /* the va_list invocation form */
  584. boolean   SOMRNameable_somClassDispatch(SOMClass* clsObj, 
  585.         somToken* retValue, 
  586.         somId methodId, 
  587.         va_list ap)
  588. {return SOM_ResolveD(this,SOMRNameable,SOMObject,somClassDispatch)
  589.     (this,clsObj,retValue,methodId,ap);
  590. }
  591.  
  592. /* the varargs invocation form */
  593. boolean   somClassDispatch(SOMClass* clsObj, 
  594.         somToken* retValue, 
  595.         somId methodId, 
  596.         ...)
  597. {
  598. /*
  599.  *  Like somDispatch, but method resolution for static methods is done
  600.  *  according to the clsObj instance method table.
  601.  */
  602.    va_list ap;
  603.    va_start(ap, methodId);
  604.    boolean __somResult = 
  605.       SOM_ResolveD(this,SOMRNameable,SOMObject,somClassDispatch)
  606.     (this,clsObj,retValue,methodId,ap);
  607.    va_end(ap);
  608.    return __somResult;
  609. }
  610.  
  611.  
  612. /* method: somCastObj */
  613. boolean   somCastObj(SOMClass* cls)
  614. {
  615. /*
  616.  *  cast the receiving object to cls (which must be an ancestor of the
  617.  *  objects true class. Returns true on success.
  618.  */
  619.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somCastObj)
  620.     (this,cls);
  621. }
  622.  
  623.  
  624. /* method: somResetObj */
  625. boolean   somResetObj()
  626. {
  627. /*
  628.  *  reset an object to its true class. Returns true always.
  629.  */
  630.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somResetObj)
  631.     (this);
  632. }
  633.  
  634.  
  635. /* va_list method: somDispatchV */
  636.  
  637. /*
  638.  *  Obsolete. Use somDispatch instead.
  639.  */
  640. /* the va_list invocation form */
  641. void   SOMRNameable_somDispatchV(somId methodId, 
  642.         somId descriptor, 
  643.         va_list ap)
  644. {   SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchV)
  645.     (this,methodId,descriptor,ap);
  646. }
  647.  
  648. /* the varargs invocation form */
  649. void   somDispatchV(somId methodId, 
  650.         somId descriptor, 
  651.         ...)
  652. {
  653. /*
  654.  *  Obsolete. Use somDispatch instead.
  655.  */
  656.    va_list ap;
  657.    va_start(ap, descriptor);
  658.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchV)
  659.     (this,methodId,descriptor,ap);
  660.    va_end(ap);
  661. }
  662.  
  663.  
  664. /* va_list method: somDispatchL */
  665.  
  666. /*
  667.  *  Obsolete. Use somDispatch instead.
  668.  */
  669. /* the va_list invocation form */
  670. long   SOMRNameable_somDispatchL(somId methodId, 
  671.         somId descriptor, 
  672.         va_list ap)
  673. {return SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchL)
  674.     (this,methodId,descriptor,ap);
  675. }
  676.  
  677. /* the varargs invocation form */
  678. long   somDispatchL(somId methodId, 
  679.         somId descriptor, 
  680.         ...)
  681. {
  682. /*
  683.  *  Obsolete. Use somDispatch instead.
  684.  */
  685.    va_list ap;
  686.    va_start(ap, descriptor);
  687.    long __somResult = 
  688.       SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchL)
  689.     (this,methodId,descriptor,ap);
  690.    va_end(ap);
  691.    return __somResult;
  692. }
  693.  
  694.  
  695. /* va_list method: somDispatchA */
  696.  
  697. /*
  698.  *  Obsolete. Use somDispatch instead.
  699.  */
  700. /* the va_list invocation form */
  701. void*   SOMRNameable_somDispatchA(somId methodId, 
  702.         somId descriptor, 
  703.         va_list ap)
  704. {return SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchA)
  705.     (this,methodId,descriptor,ap);
  706. }
  707.  
  708. /* the varargs invocation form */
  709. void*   somDispatchA(somId methodId, 
  710.         somId descriptor, 
  711.         ...)
  712. {
  713. /*
  714.  *  Obsolete. Use somDispatch instead.
  715.  */
  716.    va_list ap;
  717.    va_start(ap, descriptor);
  718.    void* __somResult = 
  719.       SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchA)
  720.     (this,methodId,descriptor,ap);
  721.    va_end(ap);
  722.    return __somResult;
  723. }
  724.  
  725.  
  726. /* va_list method: somDispatchD */
  727.  
  728. /*
  729.  *  Obsolete. Use somDispatch instead.
  730.  */
  731. /* the va_list invocation form */
  732. double   SOMRNameable_somDispatchD(somId methodId, 
  733.         somId descriptor, 
  734.         va_list ap)
  735. {return SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchD)
  736.     (this,methodId,descriptor,ap);
  737. }
  738.  
  739. /* the varargs invocation form */
  740. double   somDispatchD(somId methodId, 
  741.         somId descriptor, 
  742.         ...)
  743. {
  744. /*
  745.  *  Obsolete. Use somDispatch instead.
  746.  */
  747.    va_list ap;
  748.    va_start(ap, descriptor);
  749.    double __somResult = 
  750.       SOM_ResolveD(this,SOMRNameable,SOMObject,somDispatchD)
  751.     (this,methodId,descriptor,ap);
  752.    va_end(ap);
  753.    return __somResult;
  754. }
  755.  
  756.  
  757. /* method: somPrintSelf */
  758. SOMObject*   somPrintSelf()
  759. {
  760. /*
  761.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  762.  *  information about this object.  The default implementation just gives
  763.  *  the object's class name and its address in memory.
  764.  *  <self> is returned.
  765.  */
  766.    return SOM_ResolveD(this,SOMRNameable,SOMObject,somPrintSelf)
  767.     (this);
  768. }
  769.  
  770.  
  771. /* method: somDumpSelf */
  772. void   somDumpSelf(long level)
  773. {
  774. /*
  775.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  776.  *  and its current state.
  777.  * 
  778.  *  <level> indicates the nesting level for describing compound objects
  779.  *  it must be greater than or equal to zero.  All lines in the
  780.  *  description will be preceeded by <2*level> spaces.
  781.  * 
  782.  *  This routine only actually writes the data that concerns the object
  783.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  784.  *  the object's current state.  This approach allows readable
  785.  *  descriptions of compound objects to be constructed.
  786.  * 
  787.  *  Generally it is not necessary to override this method, if it is
  788.  *  overriden it generally must be completely replaced.
  789.  */
  790.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDumpSelf)
  791.     (this,level);
  792. }
  793.  
  794.  
  795. /* method: somDumpSelfInt */
  796. void   somDumpSelfInt(long level)
  797. {
  798. /*
  799.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  800.  *  Generally this method will need to be overridden.  When overriding
  801.  *  it, begin by calling the parent class form of this method and then
  802.  *  write in a description of your class's instance data. This will
  803.  *  result in a description of all the object's instance data going
  804.  *  from its root ancestor class to its specific class.
  805.  */
  806.    SOM_ResolveD(this,SOMRNameable,SOMObject,somDumpSelfInt)
  807.     (this,level);
  808. }
  809.  
  810.  
  811.  
  812. };   /* SOMRNameable */
  813.  
  814.  
  815.  
  816. #endif       /* SOM_SOMRNameable_xh */
  817.