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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: principl.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somd
  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_Principal_xh
  26. #define SOM_Principal_xh
  27.  
  28. class Principal;
  29.  
  30. /*
  31.  *    This is a class interface definition which defines the CORBA-defined
  32.  *    Principal object. CORBA defines the Principal object but (at this
  33.  *    time) does not define the interface to this object. The methods for
  34.  *    this object are, therefore, subject to change in future implementations.
  35.  * 
  36.  *    The BOA guarantees that for every method invocation it will identify
  37.  *    the principal on whose behalf the request is performed. An object
  38.  *    implementation may request an instance of this class to determine
  39.  *    if a method invocation has been made by someone with the appropriate
  40.  *    authority. An instance of this class is returned when the following
  41.  *    method is invoked on the BOA:
  42.  * 
  43.  *      get_principal(in BOA boaobj, in Environment lcl_ev,
  44.  *                    in SOMDObject obj, in Environment req_ev);
  45.  * 
  46.  */
  47.  
  48. #define Principal_MajorVersion 1
  49. #define Principal_MinorVersion 0
  50.  
  51. /* C++ SOM defs */
  52. #include <somcls.xh>
  53. #include <somcm.xh>
  54.  
  55. /* C++ parent defs */
  56. #ifndef SOM_SOMObject_xh
  57. #include <somobj.xh>
  58. #endif
  59.  
  60. #ifndef Principal_API
  61. #define Principal_API
  62. /*
  63.  * -- The Class API
  64.  */
  65.  
  66. /*
  67.  * Start of bindings for IDL types
  68.  */
  69.  
  70. class SOMClass;
  71. class SOMObject;
  72.  
  73. /*
  74.  * End of bindings for IDL types.
  75.  */
  76.  
  77. /* A procedure to create the Principal Class */
  78. SOMEXTERN SOMClass * SOMLINK PrincipalNewClass(
  79.         integer4 majorVersion,
  80.         integer4 minorVersion);
  81.  
  82. /* The API to the Principal class object, and the methods it introduces. */
  83. SOMEXTERN struct PrincipalClassDataStructure {
  84.     SOMClass *classObject;
  85.     somMToken _set_userName;
  86.     somMToken _get_userName;
  87.     somMToken _set_hostName;
  88.     somMToken _get_hostName;
  89. } SOMDLINK PrincipalClassData;
  90. #define _Principal PrincipalClassData.classObject
  91.  
  92. /* The API to parentMtabs for Principal, and the instance data it introduces. */
  93. SOMEXTERN struct PrincipalCClassDataStructure {
  94.     somMethodTabs parentMtab;
  95.     somDToken              instanceDataToken;
  96. } SOMDLINK PrincipalCClassData;
  97.  
  98. /*
  99.  * -- Typedefs for Principal Method Procedures
  100.  */
  101. SOMEXTERN {
  102. typedef string   SOMLINK somTP_Principal__get_userName(Principal *somSelf, Environment *ev);
  103. typedef somTP_Principal__get_userName *somTD_Principal__get_userName;
  104. typedef void   SOMLINK somTP_Principal__set_userName(Principal *somSelf, Environment *ev, 
  105.         string userName);
  106. typedef somTP_Principal__set_userName *somTD_Principal__set_userName;
  107. typedef string   SOMLINK somTP_Principal__get_hostName(Principal *somSelf, Environment *ev);
  108. typedef somTP_Principal__get_hostName *somTD_Principal__get_hostName;
  109. typedef void   SOMLINK somTP_Principal__set_hostName(Principal *somSelf, Environment *ev, 
  110.         string hostName);
  111. typedef somTP_Principal__set_hostName *somTD_Principal__set_hostName;
  112.  
  113. /*
  114.  * -- Typedefs for Reintroduced Wrapper Methods
  115.  */
  116. typedef void   SOMLINK somTP_Principal_somDefaultInit(Principal *somSelf, 
  117.         som3InitCtrl* ctrl);
  118. typedef somTP_Principal_somDefaultInit *somTD_Principal_somDefaultInit;
  119. typedef void   SOMLINK somTP_Principal_somDestruct(Principal *somSelf, 
  120.         octet doFree, 
  121.         som3DestructCtrl* ctrl);
  122. typedef somTP_Principal_somDestruct *somTD_Principal_somDestruct;
  123. typedef void   SOMLINK somTP_Principal_somDefaultCopyInit(Principal *somSelf, 
  124.         som3InitCtrl* ctrl, 
  125.         SOMObject* fromObj);
  126. typedef somTP_Principal_somDefaultCopyInit *somTD_Principal_somDefaultCopyInit;
  127. typedef Principal*   SOMLINK somTP_Principal_somDefaultAssign(Principal *somSelf, 
  128.         som3AssignCtrl* ctrl, 
  129.         SOMObject* fromObj);
  130. typedef somTP_Principal_somDefaultAssign *somTD_Principal_somDefaultAssign;
  131. typedef void   SOMLINK somTP_Principal_somDefaultConstCopyInit(Principal *somSelf, 
  132.         som3InitCtrl* ctrl, 
  133.         SOMObject* fromObj);
  134. typedef somTP_Principal_somDefaultConstCopyInit *somTD_Principal_somDefaultConstCopyInit;
  135. typedef void   SOMLINK somTP_Principal_somDefaultVCopyInit(Principal *somSelf, 
  136.         som3InitCtrl* ctrl, 
  137.         SOMObject* fromObj);
  138. typedef somTP_Principal_somDefaultVCopyInit *somTD_Principal_somDefaultVCopyInit;
  139. typedef void   SOMLINK somTP_Principal_somDefaultConstVCopyInit(Principal *somSelf, 
  140.         som3InitCtrl* ctrl, 
  141.         SOMObject* fromObj);
  142. typedef somTP_Principal_somDefaultConstVCopyInit *somTD_Principal_somDefaultConstVCopyInit;
  143. typedef Principal*   SOMLINK somTP_Principal_somDefaultConstAssign(Principal *somSelf, 
  144.         som3AssignCtrl* ctrl, 
  145.         SOMObject* fromObj);
  146. typedef somTP_Principal_somDefaultConstAssign *somTD_Principal_somDefaultConstAssign;
  147. typedef Principal*   SOMLINK somTP_Principal_somDefaultVAssign(Principal *somSelf, 
  148.         som3AssignCtrl* ctrl, 
  149.         SOMObject* fromObj);
  150. typedef somTP_Principal_somDefaultVAssign *somTD_Principal_somDefaultVAssign;
  151. typedef Principal*   SOMLINK somTP_Principal_somDefaultConstVAssign(Principal *somSelf, 
  152.         som3AssignCtrl* ctrl, 
  153.         SOMObject* fromObj);
  154. typedef somTP_Principal_somDefaultConstVAssign *somTD_Principal_somDefaultConstVAssign;
  155. typedef void   SOMLINK somTP_Principal_somInit(Principal *somSelf);
  156. typedef somTP_Principal_somInit *somTD_Principal_somInit;
  157. typedef void   SOMLINK somTP_Principal_somFree(Principal *somSelf);
  158. typedef somTP_Principal_somFree *somTD_Principal_somFree;
  159. typedef void   SOMLINK somTP_Principal_somUninit(Principal *somSelf);
  160. typedef somTP_Principal_somUninit *somTD_Principal_somUninit;
  161. typedef SOMClass*   SOMLINK somTP_Principal_somGetClass(Principal *somSelf);
  162. typedef somTP_Principal_somGetClass *somTD_Principal_somGetClass;
  163. typedef string   SOMLINK somTP_Principal_somGetClassName(Principal *somSelf);
  164. typedef somTP_Principal_somGetClassName *somTD_Principal_somGetClassName;
  165. typedef long   SOMLINK somTP_Principal_somGetSize(Principal *somSelf);
  166. typedef somTP_Principal_somGetSize *somTD_Principal_somGetSize;
  167. typedef boolean   SOMLINK somTP_Principal_somIsA(Principal *somSelf, 
  168.         SOMClass* aClassObj);
  169. typedef somTP_Principal_somIsA *somTD_Principal_somIsA;
  170. typedef boolean   SOMLINK somTP_Principal_somIsInstanceOf(Principal *somSelf, 
  171.         SOMClass* aClassObj);
  172. typedef somTP_Principal_somIsInstanceOf *somTD_Principal_somIsInstanceOf;
  173. typedef boolean   SOMLINK somTP_Principal_somRespondsTo(Principal *somSelf, 
  174.         somId mId);
  175. typedef somTP_Principal_somRespondsTo *somTD_Principal_somRespondsTo;
  176. typedef boolean   SOMLINK somTP_Principal_somDispatch(Principal *somSelf, 
  177.         somToken* retValue, 
  178.         somId methodId, 
  179.         va_list ap);
  180. typedef somTP_Principal_somDispatch *somTD_Principal_somDispatch;
  181. typedef boolean   SOMLINK somTP_Principal_somClassDispatch(Principal *somSelf, 
  182.         SOMClass* clsObj, 
  183.         somToken* retValue, 
  184.         somId methodId, 
  185.         va_list ap);
  186. typedef somTP_Principal_somClassDispatch *somTD_Principal_somClassDispatch;
  187. typedef boolean   SOMLINK somTP_Principal_somCastObj(Principal *somSelf, 
  188.         SOMClass* cls);
  189. typedef somTP_Principal_somCastObj *somTD_Principal_somCastObj;
  190. typedef boolean   SOMLINK somTP_Principal_somResetObj(Principal *somSelf);
  191. typedef somTP_Principal_somResetObj *somTD_Principal_somResetObj;
  192. typedef void   SOMLINK somTP_Principal_somDispatchV(Principal *somSelf, 
  193.         somId methodId, 
  194.         somId descriptor, 
  195.         va_list ap);
  196. typedef somTP_Principal_somDispatchV *somTD_Principal_somDispatchV;
  197. typedef long   SOMLINK somTP_Principal_somDispatchL(Principal *somSelf, 
  198.         somId methodId, 
  199.         somId descriptor, 
  200.         va_list ap);
  201. typedef somTP_Principal_somDispatchL *somTD_Principal_somDispatchL;
  202. typedef void*   SOMLINK somTP_Principal_somDispatchA(Principal *somSelf, 
  203.         somId methodId, 
  204.         somId descriptor, 
  205.         va_list ap);
  206. typedef somTP_Principal_somDispatchA *somTD_Principal_somDispatchA;
  207. typedef double   SOMLINK somTP_Principal_somDispatchD(Principal *somSelf, 
  208.         somId methodId, 
  209.         somId descriptor, 
  210.         va_list ap);
  211. typedef somTP_Principal_somDispatchD *somTD_Principal_somDispatchD;
  212. typedef SOMObject*   SOMLINK somTP_Principal_somPrintSelf(Principal *somSelf);
  213. typedef somTP_Principal_somPrintSelf *somTD_Principal_somPrintSelf;
  214. typedef void   SOMLINK somTP_Principal_somDumpSelf(Principal *somSelf, 
  215.         long level);
  216. typedef somTP_Principal_somDumpSelf *somTD_Principal_somDumpSelf;
  217. typedef void   SOMLINK somTP_Principal_somDumpSelfInt(Principal *somSelf, 
  218.         long level);
  219. typedef somTP_Principal_somDumpSelfInt *somTD_Principal_somDumpSelfInt;
  220. }
  221.  
  222. #endif /* Principal_API */
  223.  
  224.  
  225. /*
  226.  * -- This emitter treats Method Tokens as Thunks by default.
  227.  * -- Use the sc modifier "nothunks" to change this default
  228.  */
  229. #undef somresolve_
  230. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  231.  
  232. /*
  233.  * -- The C++ Wrapper Class for Principal
  234.  */
  235. class Principal : public SOMObject
  236. {
  237. /*
  238.  *    This is a class interface definition which defines the CORBA-defined
  239.  *    Principal object. CORBA defines the Principal object but (at this
  240.  *    time) does not define the interface to this object. The methods for
  241.  *    this object are, therefore, subject to change in future implementations.
  242.  * 
  243.  *    The BOA guarantees that for every method invocation it will identify
  244.  *    the principal on whose behalf the request is performed. An object
  245.  *    implementation may request an instance of this class to determine
  246.  *    if a method invocation has been made by someone with the appropriate
  247.  *    authority. An instance of this class is returned when the following
  248.  *    method is invoked on the BOA:
  249.  * 
  250.  *      get_principal(in BOA boaobj, in Environment lcl_ev,
  251.  *                    in SOMDObject obj, in Environment req_ev);
  252.  * 
  253.  */
  254. public:
  255.  
  256. // Principal::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 (!_Principal) PrincipalNewClass(Principal_MajorVersion,Principal_MinorVersion);
  261.    return (void*)
  262.       SOM_Resolve(_Principal,SOMClass,somNewNoInit)
  263.          ((SOMClass *)((void*)_Principal));
  264. }
  265.  
  266. // Principal::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. Principal& operator=(Principal& fromObj)
  276. {
  277.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  278.    return *this;
  279. }
  280.  
  281. Principal()
  282. {
  283.    if (*(void**)this != 
  284.        ((somParentMtabStructPtr)
  285.         (PrincipalCClassData.parentMtab))->mtab)
  286.       return;
  287.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  288. }
  289.  
  290. Principal(Principal* fromObj)
  291. {
  292.    if (*(void**)this != 
  293.        ((somParentMtabStructPtr)
  294.         (PrincipalCClassData.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. Principal(const Principal* fromObj)
  303. {
  304.    if (*(void**)this != 
  305.        ((somParentMtabStructPtr)
  306.         (PrincipalCClassData.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: _get_userName */
  316. string   _get_userName(Environment *ev)
  317. {
  318. /*
  319.  *  User who made the request.
  320.  */
  321.    return SOM_ResolveD(this,Principal,Principal,_get_userName)
  322.     (this, ev);
  323. }
  324.  
  325.  
  326. /* method: _set_userName */
  327. void   _set_userName(Environment *ev, 
  328.         string userName)
  329. {
  330. /*
  331.  *  User who made the request.
  332.  */
  333.    SOM_ResolveD(this,Principal,Principal,_set_userName)
  334.     (this, ev,userName);
  335. }
  336.  
  337.  
  338. /* method: _get_hostName */
  339. string   _get_hostName(Environment *ev)
  340. {
  341. /*
  342.  *  Host from which the request was made.
  343.  */
  344.    return SOM_ResolveD(this,Principal,Principal,_get_hostName)
  345.     (this, ev);
  346. }
  347.  
  348.  
  349. /* method: _set_hostName */
  350. void   _set_hostName(Environment *ev, 
  351.         string hostName)
  352. {
  353. /*
  354.  *  Host from which the request was made.
  355.  */
  356.    SOM_ResolveD(this,Principal,Principal,_set_hostName)
  357.     (this, ev,hostName);
  358. }
  359.  
  360.  
  361. /*
  362.  * Reintroduce inherited methods
  363.  */
  364.  
  365. /* initializer method: somDefaultInit */
  366. void   somDefaultInit(som3InitCtrl* ctrl)
  367. {
  368. /*
  369.  *  A default initializer for a SOM object. Passing a null ctrl
  370.  *  indicates to the receiver that its class is the class of the
  371.  *  object being initialized, whereby the initializer will determine
  372.  *  an appropriate control structure.
  373.  */
  374.    SOM_ResolveD(this,Principal,SOMObject,somDefaultInit)
  375.     (this,ctrl);
  376. }
  377.  
  378.  
  379. /* method: somDestruct */
  380. void   somDestruct(octet doFree, 
  381.         som3DestructCtrl* ctrl)
  382. {
  383. /*
  384.  *  The default destructor for a SOM object. A nonzero <doFree>
  385.  *  indicates that the object storage should be freed by the
  386.  *  object's class (via somDeallocate) after uninitialization.
  387.  *  As with somDefaultInit, a null ctrl can be passed.
  388.  */
  389.    SOM_ResolveD(this,Principal,SOMObject,somDestruct)
  390.     (this,doFree,ctrl);
  391. }
  392.  
  393.  
  394. /* initializer method: somDefaultCopyInit */
  395. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  396.         SOMObject* fromObj)
  397. {
  398. /*
  399.  *  A default copy constructor. Use this to make copies of objects for
  400.  *  calling methods with "by-value" argument semantics.
  401.  */
  402.    SOM_ResolveD(this,Principal,SOMObject,somDefaultCopyInit)
  403.     (this,ctrl,fromObj);
  404. }
  405.  
  406.  
  407. /* method: somDefaultAssign */
  408. Principal*  somDefaultAssign(som3AssignCtrl* ctrl, 
  409.         SOMObject* fromObj)
  410. {
  411. /*
  412.  *  A default assignment operator. Use this to "assign" the state of one
  413.  *  object to another.
  414.  */
  415.    return SOM_ResolveD(this,Principal,SOMObject,somDefaultAssign)
  416.     (this,ctrl,fromObj);
  417. }
  418.  
  419.  
  420. /* initializer method: somDefaultConstCopyInit */
  421. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  422.         SOMObject* fromObj)
  423. {
  424. /*
  425.  *  A default copy constructor that uses a const fromObj.
  426.  */
  427.    SOM_ResolveD(this,Principal,SOMObject,somDefaultConstCopyInit)
  428.     (this,ctrl,fromObj);
  429. }
  430.  
  431.  
  432. /* initializer method: somDefaultVCopyInit */
  433. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  434.         SOMObject* fromObj)
  435. {
  436. /*
  437.  *  A default copy constructor that uses a volatile fromObj.
  438.  */
  439.    SOM_ResolveD(this,Principal,SOMObject,somDefaultVCopyInit)
  440.     (this,ctrl,fromObj);
  441. }
  442.  
  443.  
  444. /* initializer method: somDefaultConstVCopyInit */
  445. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  446.         SOMObject* fromObj)
  447. {
  448. /*
  449.  *  A default copy constructor that uses a const volatile fromObj.
  450.  */
  451.    SOM_ResolveD(this,Principal,SOMObject,somDefaultConstVCopyInit)
  452.     (this,ctrl,fromObj);
  453. }
  454.  
  455.  
  456. /* method: somDefaultConstAssign */
  457. Principal*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  458.         SOMObject* fromObj)
  459. {
  460. /*
  461.  *  A default assignment operator that uses a const fromObj.
  462.  */
  463.    return SOM_ResolveD(this,Principal,SOMObject,somDefaultConstAssign)
  464.     (this,ctrl,fromObj);
  465. }
  466.  
  467.  
  468. /* method: somDefaultVAssign */
  469. Principal*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  470.         SOMObject* fromObj)
  471. {
  472. /*
  473.  *  A default assignment operator that uses a volatile fromObj.
  474.  */
  475.    return SOM_ResolveD(this,Principal,SOMObject,somDefaultVAssign)
  476.     (this,ctrl,fromObj);
  477. }
  478.  
  479.  
  480. /* method: somDefaultConstVAssign */
  481. Principal*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  482.         SOMObject* fromObj)
  483. {
  484. /*
  485.  *  A default assignment operator that uses a const volatile fromObj.
  486.  */
  487.    return SOM_ResolveD(this,Principal,SOMObject,somDefaultConstVAssign)
  488.     (this,ctrl,fromObj);
  489. }
  490.  
  491.  
  492. /* method: somInit */
  493. void   somInit()
  494. {
  495. /*
  496.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  497.  */
  498.    SOM_ResolveD(this,Principal,SOMObject,somInit)
  499.     (this);
  500. }
  501.  
  502.  
  503. /* method: somFree */
  504. void   somFree()
  505. {
  506. /*
  507.  *  Use as directed by framework implementations.
  508.  */
  509.    SOM_ResolveD(this,Principal,SOMObject,somFree)
  510.     (this);
  511. }
  512.  
  513.  
  514. /* method: somUninit */
  515. void   somUninit()
  516. {
  517. /*
  518.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  519.  */
  520.    SOM_ResolveD(this,Principal,SOMObject,somUninit)
  521.     (this);
  522. }
  523.  
  524.  
  525. /* method: somGetClass */
  526. SOMClass*   somGetClass()
  527. {
  528. /*
  529.  *  Return the receiver's class.
  530.  */
  531.    return SOM_ResolveD(this,Principal,SOMObject,somGetClass)
  532.     (this);
  533. }
  534.  
  535.  
  536. /* method: somGetClassName */
  537. string   somGetClassName()
  538. {
  539. /*
  540.  *  Return the name of the receiver's class.
  541.  */
  542.    return SOM_ResolveD(this,Principal,SOMObject,somGetClassName)
  543.     (this);
  544. }
  545.  
  546.  
  547. /* method: somGetSize */
  548. long   somGetSize()
  549. {
  550. /*
  551.  *  Return the size of the receiver.
  552.  */
  553.    return SOM_ResolveD(this,Principal,SOMObject,somGetSize)
  554.     (this);
  555. }
  556.  
  557.  
  558. /* method: somIsA */
  559. boolean   somIsA(SOMClass* aClassObj)
  560. {
  561. /*
  562.  *  Returns 1 (true) if the receiver responds to methods
  563.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  564.  */
  565.    return SOM_ResolveD(this,Principal,SOMObject,somIsA)
  566.     (this,aClassObj);
  567. }
  568.  
  569.  
  570. /* method: somIsInstanceOf */
  571. boolean   somIsInstanceOf(SOMClass* aClassObj)
  572. {
  573. /*
  574.  *  Returns 1 (true) if the receiver is an instance of
  575.  *  <aClassObj> and 0 (false) otherwise.
  576.  */
  577.    return SOM_ResolveD(this,Principal,SOMObject,somIsInstanceOf)
  578.     (this,aClassObj);
  579. }
  580.  
  581.  
  582. /* method: somRespondsTo */
  583. boolean   somRespondsTo(somId mId)
  584. {
  585. /*
  586.  *  Returns 1 (true) if the indicated method can be invoked
  587.  *  on the receiver and 0 (false) otherwise.
  588.  */
  589.    return SOM_ResolveD(this,Principal,SOMObject,somRespondsTo)
  590.     (this,mId);
  591. }
  592.  
  593.  
  594. /* va_list method: somDispatch */
  595.  
  596. /*
  597.  *  This method provides a generic, class-specific dispatch mechanism.
  598.  *  It accepts as input <retValue> a pointer to the memory area to be
  599.  *  loaded with the result of dispatching the method indicated by
  600.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  601.  *  on which the method is to be invoked as the first argument.
  602.  */
  603. /* the va_list invocation form */
  604. boolean   Principal_somDispatch(somToken* retValue, 
  605.         somId methodId, 
  606.         va_list ap)
  607. {return SOM_ResolveD(this,Principal,SOMObject,somDispatch)
  608.     (this,retValue,methodId,ap);
  609. }
  610.  
  611. /* the varargs invocation form */
  612. boolean   somDispatch(somToken* retValue, 
  613.         somId methodId, 
  614.         ...)
  615. {
  616. /*
  617.  *  This method provides a generic, class-specific dispatch mechanism.
  618.  *  It accepts as input <retValue> a pointer to the memory area to be
  619.  *  loaded with the result of dispatching the method indicated by
  620.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  621.  *  on which the method is to be invoked as the first argument.
  622.  */
  623.    va_list ap;
  624.    va_start(ap, methodId);
  625.    boolean __somResult = 
  626.       SOM_ResolveD(this,Principal,SOMObject,somDispatch)
  627.     (this,retValue,methodId,ap);
  628.    va_end(ap);
  629.    return __somResult;
  630. }
  631.  
  632.  
  633. /* va_list method: somClassDispatch */
  634.  
  635. /*
  636.  *  Like somDispatch, but method resolution for static methods is done
  637.  *  according to the clsObj instance method table.
  638.  */
  639. /* the va_list invocation form */
  640. boolean   Principal_somClassDispatch(SOMClass* clsObj, 
  641.         somToken* retValue, 
  642.         somId methodId, 
  643.         va_list ap)
  644. {return SOM_ResolveD(this,Principal,SOMObject,somClassDispatch)
  645.     (this,clsObj,retValue,methodId,ap);
  646. }
  647.  
  648. /* the varargs invocation form */
  649. boolean   somClassDispatch(SOMClass* clsObj, 
  650.         somToken* retValue, 
  651.         somId methodId, 
  652.         ...)
  653. {
  654. /*
  655.  *  Like somDispatch, but method resolution for static methods is done
  656.  *  according to the clsObj instance method table.
  657.  */
  658.    va_list ap;
  659.    va_start(ap, methodId);
  660.    boolean __somResult = 
  661.       SOM_ResolveD(this,Principal,SOMObject,somClassDispatch)
  662.     (this,clsObj,retValue,methodId,ap);
  663.    va_end(ap);
  664.    return __somResult;
  665. }
  666.  
  667.  
  668. /* method: somCastObj */
  669. boolean   somCastObj(SOMClass* cls)
  670. {
  671. /*
  672.  *  cast the receiving object to cls (which must be an ancestor of the
  673.  *  objects true class. Returns true on success.
  674.  */
  675.    return SOM_ResolveD(this,Principal,SOMObject,somCastObj)
  676.     (this,cls);
  677. }
  678.  
  679.  
  680. /* method: somResetObj */
  681. boolean   somResetObj()
  682. {
  683. /*
  684.  *  reset an object to its true class. Returns true always.
  685.  */
  686.    return SOM_ResolveD(this,Principal,SOMObject,somResetObj)
  687.     (this);
  688. }
  689.  
  690.  
  691. /* va_list method: somDispatchV */
  692.  
  693. /*
  694.  *  Obsolete. Use somDispatch instead.
  695.  */
  696. /* the va_list invocation form */
  697. void   Principal_somDispatchV(somId methodId, 
  698.         somId descriptor, 
  699.         va_list ap)
  700. {   SOM_ResolveD(this,Principal,SOMObject,somDispatchV)
  701.     (this,methodId,descriptor,ap);
  702. }
  703.  
  704. /* the varargs invocation form */
  705. void   somDispatchV(somId methodId, 
  706.         somId descriptor, 
  707.         ...)
  708. {
  709. /*
  710.  *  Obsolete. Use somDispatch instead.
  711.  */
  712.    va_list ap;
  713.    va_start(ap, descriptor);
  714.    SOM_ResolveD(this,Principal,SOMObject,somDispatchV)
  715.     (this,methodId,descriptor,ap);
  716.    va_end(ap);
  717. }
  718.  
  719.  
  720. /* va_list method: somDispatchL */
  721.  
  722. /*
  723.  *  Obsolete. Use somDispatch instead.
  724.  */
  725. /* the va_list invocation form */
  726. long   Principal_somDispatchL(somId methodId, 
  727.         somId descriptor, 
  728.         va_list ap)
  729. {return SOM_ResolveD(this,Principal,SOMObject,somDispatchL)
  730.     (this,methodId,descriptor,ap);
  731. }
  732.  
  733. /* the varargs invocation form */
  734. long   somDispatchL(somId methodId, 
  735.         somId descriptor, 
  736.         ...)
  737. {
  738. /*
  739.  *  Obsolete. Use somDispatch instead.
  740.  */
  741.    va_list ap;
  742.    va_start(ap, descriptor);
  743.    long __somResult = 
  744.       SOM_ResolveD(this,Principal,SOMObject,somDispatchL)
  745.     (this,methodId,descriptor,ap);
  746.    va_end(ap);
  747.    return __somResult;
  748. }
  749.  
  750.  
  751. /* va_list method: somDispatchA */
  752.  
  753. /*
  754.  *  Obsolete. Use somDispatch instead.
  755.  */
  756. /* the va_list invocation form */
  757. void*   Principal_somDispatchA(somId methodId, 
  758.         somId descriptor, 
  759.         va_list ap)
  760. {return SOM_ResolveD(this,Principal,SOMObject,somDispatchA)
  761.     (this,methodId,descriptor,ap);
  762. }
  763.  
  764. /* the varargs invocation form */
  765. void*   somDispatchA(somId methodId, 
  766.         somId descriptor, 
  767.         ...)
  768. {
  769. /*
  770.  *  Obsolete. Use somDispatch instead.
  771.  */
  772.    va_list ap;
  773.    va_start(ap, descriptor);
  774.    void* __somResult = 
  775.       SOM_ResolveD(this,Principal,SOMObject,somDispatchA)
  776.     (this,methodId,descriptor,ap);
  777.    va_end(ap);
  778.    return __somResult;
  779. }
  780.  
  781.  
  782. /* va_list method: somDispatchD */
  783.  
  784. /*
  785.  *  Obsolete. Use somDispatch instead.
  786.  */
  787. /* the va_list invocation form */
  788. double   Principal_somDispatchD(somId methodId, 
  789.         somId descriptor, 
  790.         va_list ap)
  791. {return SOM_ResolveD(this,Principal,SOMObject,somDispatchD)
  792.     (this,methodId,descriptor,ap);
  793. }
  794.  
  795. /* the varargs invocation form */
  796. double   somDispatchD(somId methodId, 
  797.         somId descriptor, 
  798.         ...)
  799. {
  800. /*
  801.  *  Obsolete. Use somDispatch instead.
  802.  */
  803.    va_list ap;
  804.    va_start(ap, descriptor);
  805.    double __somResult = 
  806.       SOM_ResolveD(this,Principal,SOMObject,somDispatchD)
  807.     (this,methodId,descriptor,ap);
  808.    va_end(ap);
  809.    return __somResult;
  810. }
  811.  
  812.  
  813. /* method: somPrintSelf */
  814. SOMObject*   somPrintSelf()
  815. {
  816. /*
  817.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  818.  *  information about this object.  The default implementation just gives
  819.  *  the object's class name and its address in memory.
  820.  *  <self> is returned.
  821.  */
  822.    return SOM_ResolveD(this,Principal,SOMObject,somPrintSelf)
  823.     (this);
  824. }
  825.  
  826.  
  827. /* method: somDumpSelf */
  828. void   somDumpSelf(long level)
  829. {
  830. /*
  831.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  832.  *  and its current state.
  833.  * 
  834.  *  <level> indicates the nesting level for describing compound objects
  835.  *  it must be greater than or equal to zero.  All lines in the
  836.  *  description will be preceeded by <2*level> spaces.
  837.  * 
  838.  *  This routine only actually writes the data that concerns the object
  839.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  840.  *  the object's current state.  This approach allows readable
  841.  *  descriptions of compound objects to be constructed.
  842.  * 
  843.  *  Generally it is not necessary to override this method, if it is
  844.  *  overriden it generally must be completely replaced.
  845.  */
  846.    SOM_ResolveD(this,Principal,SOMObject,somDumpSelf)
  847.     (this,level);
  848. }
  849.  
  850.  
  851. /* method: somDumpSelfInt */
  852. void   somDumpSelfInt(long level)
  853. {
  854. /*
  855.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  856.  *  Generally this method will need to be overridden.  When overriding
  857.  *  it, begin by calling the parent class form of this method and then
  858.  *  write in a description of your class's instance data. This will
  859.  *  result in a description of all the object's instance data going
  860.  *  from its root ancestor class to its specific class.
  861.  */
  862.    SOM_ResolveD(this,Principal,SOMObject,somDumpSelfInt)
  863.     (this,level);
  864. }
  865.  
  866.  
  867.  
  868. };   /* Principal */
  869.  
  870.  
  871.  
  872. #endif       /* SOM_Principal_xh */
  873.