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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: boa.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    IDL interface spec for CORBA Basic Object Adapter.
  12.  * 
  13.  *    This is an abstract class which defines the CORBA-defined interface
  14.  *    for a Basic Object Adapter.
  15.  * 
  16.  *    The SOM Object Adapter interface is derived from this one.
  17.  *    SOMOA provides the actual implementation in DSOM.
  18.  */
  19.  
  20.  
  21. #ifndef SOM_BOA_xh
  22. #define SOM_BOA_xh
  23.  
  24. class BOA;
  25.  
  26. #define BOA_MajorVersion 2
  27. #define BOA_MinorVersion 1
  28.  
  29. /* C++ SOM defs */
  30. #include <somcls.xh>
  31. #include <somcm.xh>
  32.  
  33. /* C++ parent defs */
  34. #ifndef SOM_SOMObject_xh
  35. #include <somobj.xh>
  36. #endif
  37.  
  38. /*
  39.  * C++ metaclass def
  40.  */
  41. #include <snglicls.xh>
  42.  
  43. #ifndef BOA_API
  44. #define BOA_API
  45. /*
  46.  * -- The Class API
  47.  */
  48.  
  49. /*
  50.  * Start of bindings for IDL types
  51.  */
  52.  
  53. class SOMClass;
  54. class SOMObject;
  55. class Container;
  56. class SOMDObject;
  57. class Principal;
  58. class ImplementationDef;
  59. class InterfaceDef;
  60. class Context;
  61.  
  62. /*
  63.  * End of bindings for IDL types.
  64.  */
  65.  
  66. /* A procedure to create the BOA Class */
  67. class SOMMSingleInstance;
  68. SOMEXTERN SOMMSingleInstance * SOMLINK BOANewClass(
  69.         integer4 majorVersion,
  70.         integer4 minorVersion);
  71.  
  72. /* The API to the BOA class object, and the methods it introduces. */
  73. SOMEXTERN struct BOAClassDataStructure {
  74.     SOMMSingleInstance *classObject;
  75.     somMToken create;
  76.     somMToken dispose;
  77.     somMToken get_id;
  78.     somMToken change_implementation;
  79.     somMToken get_principal;
  80.     somMToken set_exception;
  81.     somMToken impl_is_ready;
  82.     somMToken deactivate_impl;
  83.     somMToken obj_is_ready;
  84.     somMToken deactivate_obj;
  85.     somMToken activate_impl;
  86.     somMToken activate_obj;
  87. } SOMDLINK BOAClassData;
  88. #define _BOA BOAClassData.classObject
  89.  
  90. /* The API to parentMtabs for BOA, and the instance data it introduces. */
  91. SOMEXTERN struct BOACClassDataStructure {
  92.     somMethodTabs parentMtab;
  93.     somDToken              instanceDataToken;
  94. } SOMDLINK BOACClassData;
  95.  
  96. /*
  97.  * -- Typedefs for BOA Method Procedures
  98.  */
  99. SOMEXTERN {
  100. typedef SOMDObject*   SOMLINK somTP_BOA_create(BOA *somSelf, Environment *ev, 
  101.         ReferenceData* id, 
  102.         InterfaceDef* intf, 
  103.         ImplementationDef* impl);
  104. typedef somTP_BOA_create *somTD_BOA_create;
  105. typedef void   SOMLINK somTP_BOA_dispose(BOA *somSelf, Environment *ev, 
  106.         SOMDObject* obj);
  107. typedef somTP_BOA_dispose *somTD_BOA_dispose;
  108. typedef ReferenceData   SOMLINK somTP_BOA_get_id(BOA *somSelf, Environment *ev, 
  109.         SOMDObject* obj);
  110. typedef somTP_BOA_get_id *somTD_BOA_get_id;
  111. typedef Principal*   SOMLINK somTP_BOA_get_principal(BOA *somSelf, Environment *ev, 
  112.         SOMDObject* obj, 
  113.         Environment* req_ev);
  114. typedef somTP_BOA_get_principal *somTD_BOA_get_principal;
  115. typedef void   SOMLINK somTP_BOA_set_exception(BOA *somSelf, Environment *ev, 
  116.         exception_type major, 
  117.         string userid, 
  118.         void* param);
  119. typedef somTP_BOA_set_exception *somTD_BOA_set_exception;
  120. typedef void   SOMLINK somTP_BOA_impl_is_ready(BOA *somSelf, Environment *ev, 
  121.         ImplementationDef* impl);
  122. typedef somTP_BOA_impl_is_ready *somTD_BOA_impl_is_ready;
  123. typedef void   SOMLINK somTP_BOA_deactivate_impl(BOA *somSelf, Environment *ev, 
  124.         ImplementationDef* impl);
  125. typedef somTP_BOA_deactivate_impl *somTD_BOA_deactivate_impl;
  126. typedef void   SOMLINK somTP_BOA_change_implementation(BOA *somSelf, Environment *ev, 
  127.         SOMDObject* obj, 
  128.         ImplementationDef* impl);
  129. typedef somTP_BOA_change_implementation *somTD_BOA_change_implementation;
  130. typedef void   SOMLINK somTP_BOA_obj_is_ready(BOA *somSelf, Environment *ev, 
  131.         SOMDObject* obj, 
  132.         ImplementationDef* impl);
  133. typedef somTP_BOA_obj_is_ready *somTD_BOA_obj_is_ready;
  134. typedef void   SOMLINK somTP_BOA_deactivate_obj(BOA *somSelf, Environment *ev, 
  135.         SOMDObject* obj);
  136. typedef somTP_BOA_deactivate_obj *somTD_BOA_deactivate_obj;
  137.  
  138. /*
  139.  * -- Typedefs for Reintroduced Wrapper Methods
  140.  */
  141. typedef void   SOMLINK somTP_BOA_somDefaultInit(BOA *somSelf, 
  142.         som3InitCtrl* ctrl);
  143. typedef somTP_BOA_somDefaultInit *somTD_BOA_somDefaultInit;
  144. typedef void   SOMLINK somTP_BOA_somDestruct(BOA *somSelf, 
  145.         octet doFree, 
  146.         som3DestructCtrl* ctrl);
  147. typedef somTP_BOA_somDestruct *somTD_BOA_somDestruct;
  148. typedef void   SOMLINK somTP_BOA_somDefaultCopyInit(BOA *somSelf, 
  149.         som3InitCtrl* ctrl, 
  150.         SOMObject* fromObj);
  151. typedef somTP_BOA_somDefaultCopyInit *somTD_BOA_somDefaultCopyInit;
  152. typedef BOA*   SOMLINK somTP_BOA_somDefaultAssign(BOA *somSelf, 
  153.         som3AssignCtrl* ctrl, 
  154.         SOMObject* fromObj);
  155. typedef somTP_BOA_somDefaultAssign *somTD_BOA_somDefaultAssign;
  156. typedef void   SOMLINK somTP_BOA_somDefaultConstCopyInit(BOA *somSelf, 
  157.         som3InitCtrl* ctrl, 
  158.         SOMObject* fromObj);
  159. typedef somTP_BOA_somDefaultConstCopyInit *somTD_BOA_somDefaultConstCopyInit;
  160. typedef void   SOMLINK somTP_BOA_somDefaultVCopyInit(BOA *somSelf, 
  161.         som3InitCtrl* ctrl, 
  162.         SOMObject* fromObj);
  163. typedef somTP_BOA_somDefaultVCopyInit *somTD_BOA_somDefaultVCopyInit;
  164. typedef void   SOMLINK somTP_BOA_somDefaultConstVCopyInit(BOA *somSelf, 
  165.         som3InitCtrl* ctrl, 
  166.         SOMObject* fromObj);
  167. typedef somTP_BOA_somDefaultConstVCopyInit *somTD_BOA_somDefaultConstVCopyInit;
  168. typedef BOA*   SOMLINK somTP_BOA_somDefaultConstAssign(BOA *somSelf, 
  169.         som3AssignCtrl* ctrl, 
  170.         SOMObject* fromObj);
  171. typedef somTP_BOA_somDefaultConstAssign *somTD_BOA_somDefaultConstAssign;
  172. typedef BOA*   SOMLINK somTP_BOA_somDefaultVAssign(BOA *somSelf, 
  173.         som3AssignCtrl* ctrl, 
  174.         SOMObject* fromObj);
  175. typedef somTP_BOA_somDefaultVAssign *somTD_BOA_somDefaultVAssign;
  176. typedef BOA*   SOMLINK somTP_BOA_somDefaultConstVAssign(BOA *somSelf, 
  177.         som3AssignCtrl* ctrl, 
  178.         SOMObject* fromObj);
  179. typedef somTP_BOA_somDefaultConstVAssign *somTD_BOA_somDefaultConstVAssign;
  180. typedef void   SOMLINK somTP_BOA_somInit(BOA *somSelf);
  181. typedef somTP_BOA_somInit *somTD_BOA_somInit;
  182. typedef void   SOMLINK somTP_BOA_somFree(BOA *somSelf);
  183. typedef somTP_BOA_somFree *somTD_BOA_somFree;
  184. typedef void   SOMLINK somTP_BOA_somUninit(BOA *somSelf);
  185. typedef somTP_BOA_somUninit *somTD_BOA_somUninit;
  186. typedef SOMMSingleInstance*   SOMLINK somTP_BOA_somGetClass(BOA *somSelf);
  187. typedef somTP_BOA_somGetClass *somTD_BOA_somGetClass;
  188. typedef string   SOMLINK somTP_BOA_somGetClassName(BOA *somSelf);
  189. typedef somTP_BOA_somGetClassName *somTD_BOA_somGetClassName;
  190. typedef long   SOMLINK somTP_BOA_somGetSize(BOA *somSelf);
  191. typedef somTP_BOA_somGetSize *somTD_BOA_somGetSize;
  192. typedef boolean   SOMLINK somTP_BOA_somIsA(BOA *somSelf, 
  193.         SOMClass* aClassObj);
  194. typedef somTP_BOA_somIsA *somTD_BOA_somIsA;
  195. typedef boolean   SOMLINK somTP_BOA_somIsInstanceOf(BOA *somSelf, 
  196.         SOMClass* aClassObj);
  197. typedef somTP_BOA_somIsInstanceOf *somTD_BOA_somIsInstanceOf;
  198. typedef boolean   SOMLINK somTP_BOA_somRespondsTo(BOA *somSelf, 
  199.         somId mId);
  200. typedef somTP_BOA_somRespondsTo *somTD_BOA_somRespondsTo;
  201. typedef boolean   SOMLINK somTP_BOA_somDispatch(BOA *somSelf, 
  202.         somToken* retValue, 
  203.         somId methodId, 
  204.         va_list ap);
  205. typedef somTP_BOA_somDispatch *somTD_BOA_somDispatch;
  206. typedef boolean   SOMLINK somTP_BOA_somClassDispatch(BOA *somSelf, 
  207.         SOMClass* clsObj, 
  208.         somToken* retValue, 
  209.         somId methodId, 
  210.         va_list ap);
  211. typedef somTP_BOA_somClassDispatch *somTD_BOA_somClassDispatch;
  212. typedef boolean   SOMLINK somTP_BOA_somCastObj(BOA *somSelf, 
  213.         SOMClass* cls);
  214. typedef somTP_BOA_somCastObj *somTD_BOA_somCastObj;
  215. typedef boolean   SOMLINK somTP_BOA_somResetObj(BOA *somSelf);
  216. typedef somTP_BOA_somResetObj *somTD_BOA_somResetObj;
  217. typedef void   SOMLINK somTP_BOA_somDispatchV(BOA *somSelf, 
  218.         somId methodId, 
  219.         somId descriptor, 
  220.         va_list ap);
  221. typedef somTP_BOA_somDispatchV *somTD_BOA_somDispatchV;
  222. typedef long   SOMLINK somTP_BOA_somDispatchL(BOA *somSelf, 
  223.         somId methodId, 
  224.         somId descriptor, 
  225.         va_list ap);
  226. typedef somTP_BOA_somDispatchL *somTD_BOA_somDispatchL;
  227. typedef void*   SOMLINK somTP_BOA_somDispatchA(BOA *somSelf, 
  228.         somId methodId, 
  229.         somId descriptor, 
  230.         va_list ap);
  231. typedef somTP_BOA_somDispatchA *somTD_BOA_somDispatchA;
  232. typedef double   SOMLINK somTP_BOA_somDispatchD(BOA *somSelf, 
  233.         somId methodId, 
  234.         somId descriptor, 
  235.         va_list ap);
  236. typedef somTP_BOA_somDispatchD *somTD_BOA_somDispatchD;
  237. typedef SOMObject*   SOMLINK somTP_BOA_somPrintSelf(BOA *somSelf);
  238. typedef somTP_BOA_somPrintSelf *somTD_BOA_somPrintSelf;
  239. typedef void   SOMLINK somTP_BOA_somDumpSelf(BOA *somSelf, 
  240.         long level);
  241. typedef somTP_BOA_somDumpSelf *somTD_BOA_somDumpSelf;
  242. typedef void   SOMLINK somTP_BOA_somDumpSelfInt(BOA *somSelf, 
  243.         long level);
  244. typedef somTP_BOA_somDumpSelfInt *somTD_BOA_somDumpSelfInt;
  245. }
  246.  
  247. #endif /* BOA_API */
  248.  
  249.  
  250. /*
  251.  * -- This emitter treats Method Tokens as Thunks by default.
  252.  * -- Use the sc modifier "nothunks" to change this default
  253.  */
  254. #undef somresolve_
  255. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  256.  
  257. /*
  258.  * -- The C++ Wrapper Class for BOA
  259.  */
  260. class BOA : public SOMObject
  261. {
  262. public:
  263.  
  264. // BOA::new creates the class object if necessary, and then uses somNewNoInit
  265. // to allocate memory and create the object. Initialization is in ctors.
  266. void *operator new(size_t)
  267. {
  268.    if (!_BOA) BOANewClass(BOA_MajorVersion,BOA_MinorVersion);
  269.    return (void*)
  270.       SOM_Resolve(_BOA,SOMClass,somNewNoInit)
  271.          ((SOMClass *)((void*)_BOA));
  272. }
  273.  
  274. // BOA::delete uses somDestruct.
  275. void operator delete(void * obj)
  276. {
  277.    if (obj && *(void**)obj) {
  278.       SOM_Resolve(obj,SOMObject,somFree)
  279.          ((SOMObject*)obj);
  280.    }
  281. }
  282.  
  283. BOA& operator=(BOA& fromObj)
  284. {
  285.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  286.    return *this;
  287. }
  288.  
  289. BOA()
  290. {
  291.    if (*(void**)this != 
  292.        ((somParentMtabStructPtr)
  293.         (BOACClassData.parentMtab))->mtab)
  294.       return;
  295.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  296. }
  297.  
  298. BOA(BOA* fromObj)
  299. {
  300.    if (*(void**)this != 
  301.        ((somParentMtabStructPtr)
  302.         (BOACClassData.parentMtab))->mtab)
  303.       return;
  304.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  305. }
  306.  
  307. #ifdef __IBMCPP__
  308. #pragma info(nocnv,nopar)
  309. #endif
  310. BOA(const BOA* fromObj)
  311. {
  312.    if (*(void**)this != 
  313.        ((somParentMtabStructPtr)
  314.         (BOACClassData.parentMtab))->mtab)
  315.       return;
  316.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  317. }
  318. #ifdef __IBMCPP__
  319. #pragma info(restore)
  320. #endif
  321.  
  322.  
  323. /* method: create */
  324. SOMDObject*   create(Environment *ev, 
  325.         ReferenceData* id, 
  326.         InterfaceDef* intf, 
  327.         ImplementationDef* impl)
  328. {
  329. /*
  330.  *  Create an object reference.
  331.  */
  332.    return SOM_ResolveD(this,BOA,BOA,create)
  333.     (this, ev,id,intf,impl);
  334. }
  335.  
  336.  
  337. /* method: dispose */
  338. void   dispose(Environment *ev, 
  339.         SOMDObject* obj)
  340. {
  341. /*
  342.  *  Destroy an object reference.
  343.  */
  344.    SOM_ResolveD(this,BOA,BOA,dispose)
  345.     (this, ev,obj);
  346. }
  347.  
  348.  
  349. /* method: get_id */
  350. ReferenceData   get_id(Environment *ev, 
  351.         SOMDObject* obj)
  352. {
  353. /*
  354.  *  Return ReferenceData associated with referenced object.
  355.  */
  356.    return SOM_ResolveD(this,BOA,BOA,get_id)
  357.     (this, ev,obj);
  358. }
  359.  
  360.  
  361. /* method: get_principal */
  362. Principal*   get_principal(Environment *ev, 
  363.         SOMDObject* obj, 
  364.         Environment* req_ev)
  365. {
  366. /*
  367.  *  Return a Principal object, which describes who issued a request on
  368.  *  the specified object.  The "req_ev" parameter is the Environment
  369.  *  which was passed as part of the request.
  370.  */
  371.    return SOM_ResolveD(this,BOA,BOA,get_principal)
  372.     (this, ev,obj,req_ev);
  373. }
  374.  
  375.  
  376. /* method: set_exception */
  377. void   set_exception(Environment *ev, 
  378.         exception_type major, 
  379.         string userid, 
  380.         void* param)
  381. {
  382. /*
  383.  *  Return an exception to the client.
  384.  */
  385.    SOM_ResolveD(this,BOA,BOA,set_exception)
  386.     (this, ev,major,userid,param);
  387. }
  388.  
  389.  
  390. /* method: impl_is_ready */
  391. void   impl_is_ready(Environment *ev, 
  392.         ImplementationDef* impl)
  393. {
  394. /*
  395.  *  Indicate that the implementation is now ready to process requests.
  396.  */
  397.    SOM_ResolveD(this,BOA,BOA,impl_is_ready)
  398.     (this, ev,impl);
  399. }
  400.  
  401.  
  402. /* method: deactivate_impl */
  403. void   deactivate_impl(Environment *ev, 
  404.         ImplementationDef* impl)
  405. {
  406. /*
  407.  *  Indicate that the implementation is no longer ready to process reqs.
  408.  */
  409.    SOM_ResolveD(this,BOA,BOA,deactivate_impl)
  410.     (this, ev,impl);
  411. }
  412.  
  413.  
  414. /* method: change_implementation */
  415. void   change_implementation(Environment *ev, 
  416.         SOMDObject* obj, 
  417.         ImplementationDef* impl)
  418. {
  419. /*
  420.  *  Change the implementation associated with the referenced object.
  421.  *  (NOTE: Null implementation in this release of DSOM.)
  422.  */
  423.    SOM_ResolveD(this,BOA,BOA,change_implementation)
  424.     (this, ev,obj,impl);
  425. }
  426.  
  427.  
  428. /* method: obj_is_ready */
  429. void   obj_is_ready(Environment *ev, 
  430.         SOMDObject* obj, 
  431.         ImplementationDef* impl)
  432. {
  433. /*
  434.  *  Indicate that the object is ready to process requests.
  435.  *  (NOTE: Null implementation in this release of DSOM.)
  436.  */
  437.    SOM_ResolveD(this,BOA,BOA,obj_is_ready)
  438.     (this, ev,obj,impl);
  439. }
  440.  
  441.  
  442. /* method: deactivate_obj */
  443. void   deactivate_obj(Environment *ev, 
  444.         SOMDObject* obj)
  445. {
  446. /*
  447.  *  Indicate that the object is no longer ready to process requests.
  448.  *  (NOTE: Null implementation in this release of DSOM.)
  449.  */
  450.    SOM_ResolveD(this,BOA,BOA,deactivate_obj)
  451.     (this, ev,obj);
  452. }
  453.  
  454.  
  455. /*
  456.  * Reintroduce inherited methods
  457.  */
  458.  
  459. /* initializer method: somDefaultInit */
  460. void   somDefaultInit(som3InitCtrl* ctrl)
  461. {
  462. /*
  463.  *  A default initializer for a SOM object. Passing a null ctrl
  464.  *  indicates to the receiver that its class is the class of the
  465.  *  object being initialized, whereby the initializer will determine
  466.  *  an appropriate control structure.
  467.  */
  468.    SOM_ResolveD(this,BOA,SOMObject,somDefaultInit)
  469.     (this,ctrl);
  470. }
  471.  
  472.  
  473. /* method: somDestruct */
  474. void   somDestruct(octet doFree, 
  475.         som3DestructCtrl* ctrl)
  476. {
  477. /*
  478.  *  The default destructor for a SOM object. A nonzero <doFree>
  479.  *  indicates that the object storage should be freed by the
  480.  *  object's class (via somDeallocate) after uninitialization.
  481.  *  As with somDefaultInit, a null ctrl can be passed.
  482.  */
  483.    SOM_ResolveD(this,BOA,SOMObject,somDestruct)
  484.     (this,doFree,ctrl);
  485. }
  486.  
  487.  
  488. /* initializer method: somDefaultCopyInit */
  489. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  490.         SOMObject* fromObj)
  491. {
  492. /*
  493.  *  A default copy constructor. Use this to make copies of objects for
  494.  *  calling methods with "by-value" argument semantics.
  495.  */
  496.    SOM_ResolveD(this,BOA,SOMObject,somDefaultCopyInit)
  497.     (this,ctrl,fromObj);
  498. }
  499.  
  500.  
  501. /* method: somDefaultAssign */
  502. BOA*  somDefaultAssign(som3AssignCtrl* ctrl, 
  503.         SOMObject* fromObj)
  504. {
  505. /*
  506.  *  A default assignment operator. Use this to "assign" the state of one
  507.  *  object to another.
  508.  */
  509.    return SOM_ResolveD(this,BOA,SOMObject,somDefaultAssign)
  510.     (this,ctrl,fromObj);
  511. }
  512.  
  513.  
  514. /* initializer method: somDefaultConstCopyInit */
  515. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  516.         SOMObject* fromObj)
  517. {
  518. /*
  519.  *  A default copy constructor that uses a const fromObj.
  520.  */
  521.    SOM_ResolveD(this,BOA,SOMObject,somDefaultConstCopyInit)
  522.     (this,ctrl,fromObj);
  523. }
  524.  
  525.  
  526. /* initializer method: somDefaultVCopyInit */
  527. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  528.         SOMObject* fromObj)
  529. {
  530. /*
  531.  *  A default copy constructor that uses a volatile fromObj.
  532.  */
  533.    SOM_ResolveD(this,BOA,SOMObject,somDefaultVCopyInit)
  534.     (this,ctrl,fromObj);
  535. }
  536.  
  537.  
  538. /* initializer method: somDefaultConstVCopyInit */
  539. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  540.         SOMObject* fromObj)
  541. {
  542. /*
  543.  *  A default copy constructor that uses a const volatile fromObj.
  544.  */
  545.    SOM_ResolveD(this,BOA,SOMObject,somDefaultConstVCopyInit)
  546.     (this,ctrl,fromObj);
  547. }
  548.  
  549.  
  550. /* method: somDefaultConstAssign */
  551. BOA*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  552.         SOMObject* fromObj)
  553. {
  554. /*
  555.  *  A default assignment operator that uses a const fromObj.
  556.  */
  557.    return SOM_ResolveD(this,BOA,SOMObject,somDefaultConstAssign)
  558.     (this,ctrl,fromObj);
  559. }
  560.  
  561.  
  562. /* method: somDefaultVAssign */
  563. BOA*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  564.         SOMObject* fromObj)
  565. {
  566. /*
  567.  *  A default assignment operator that uses a volatile fromObj.
  568.  */
  569.    return SOM_ResolveD(this,BOA,SOMObject,somDefaultVAssign)
  570.     (this,ctrl,fromObj);
  571. }
  572.  
  573.  
  574. /* method: somDefaultConstVAssign */
  575. BOA*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  576.         SOMObject* fromObj)
  577. {
  578. /*
  579.  *  A default assignment operator that uses a const volatile fromObj.
  580.  */
  581.    return SOM_ResolveD(this,BOA,SOMObject,somDefaultConstVAssign)
  582.     (this,ctrl,fromObj);
  583. }
  584.  
  585.  
  586. /* method: somInit */
  587. void   somInit()
  588. {
  589. /*
  590.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  591.  */
  592.    SOM_ResolveD(this,BOA,SOMObject,somInit)
  593.     (this);
  594. }
  595.  
  596.  
  597. /* method: somFree */
  598. void   somFree()
  599. {
  600. /*
  601.  *  Use as directed by framework implementations.
  602.  */
  603.    SOM_ResolveD(this,BOA,SOMObject,somFree)
  604.     (this);
  605. }
  606.  
  607.  
  608. /* method: somUninit */
  609. void   somUninit()
  610. {
  611. /*
  612.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  613.  */
  614.    SOM_ResolveD(this,BOA,SOMObject,somUninit)
  615.     (this);
  616. }
  617.  
  618.  
  619. /* method: somGetClass */
  620. SOMMSingleInstance*  somGetClass()
  621. {
  622. /*
  623.  *  Return the receiver's class.
  624.  */
  625.    return SOM_ResolveD(this,BOA,SOMObject,somGetClass)
  626.     (this);
  627. }
  628.  
  629.  
  630. /* method: somGetClassName */
  631. string   somGetClassName()
  632. {
  633. /*
  634.  *  Return the name of the receiver's class.
  635.  */
  636.    return SOM_ResolveD(this,BOA,SOMObject,somGetClassName)
  637.     (this);
  638. }
  639.  
  640.  
  641. /* method: somGetSize */
  642. long   somGetSize()
  643. {
  644. /*
  645.  *  Return the size of the receiver.
  646.  */
  647.    return SOM_ResolveD(this,BOA,SOMObject,somGetSize)
  648.     (this);
  649. }
  650.  
  651.  
  652. /* method: somIsA */
  653. boolean   somIsA(SOMClass* aClassObj)
  654. {
  655. /*
  656.  *  Returns 1 (true) if the receiver responds to methods
  657.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  658.  */
  659.    return SOM_ResolveD(this,BOA,SOMObject,somIsA)
  660.     (this,aClassObj);
  661. }
  662.  
  663.  
  664. /* method: somIsInstanceOf */
  665. boolean   somIsInstanceOf(SOMClass* aClassObj)
  666. {
  667. /*
  668.  *  Returns 1 (true) if the receiver is an instance of
  669.  *  <aClassObj> and 0 (false) otherwise.
  670.  */
  671.    return SOM_ResolveD(this,BOA,SOMObject,somIsInstanceOf)
  672.     (this,aClassObj);
  673. }
  674.  
  675.  
  676. /* method: somRespondsTo */
  677. boolean   somRespondsTo(somId mId)
  678. {
  679. /*
  680.  *  Returns 1 (true) if the indicated method can be invoked
  681.  *  on the receiver and 0 (false) otherwise.
  682.  */
  683.    return SOM_ResolveD(this,BOA,SOMObject,somRespondsTo)
  684.     (this,mId);
  685. }
  686.  
  687.  
  688. /* va_list method: somDispatch */
  689.  
  690. /*
  691.  *  This method provides a generic, class-specific dispatch mechanism.
  692.  *  It accepts as input <retValue> a pointer to the memory area to be
  693.  *  loaded with the result of dispatching the method indicated by
  694.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  695.  *  on which the method is to be invoked as the first argument.
  696.  */
  697. /* the va_list invocation form */
  698. boolean   BOA_somDispatch(somToken* retValue, 
  699.         somId methodId, 
  700.         va_list ap)
  701. {return SOM_ResolveD(this,BOA,SOMObject,somDispatch)
  702.     (this,retValue,methodId,ap);
  703. }
  704.  
  705. /* the varargs invocation form */
  706. boolean   somDispatch(somToken* retValue, 
  707.         somId methodId, 
  708.         ...)
  709. {
  710. /*
  711.  *  This method provides a generic, class-specific dispatch mechanism.
  712.  *  It accepts as input <retValue> a pointer to the memory area to be
  713.  *  loaded with the result of dispatching the method indicated by
  714.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  715.  *  on which the method is to be invoked as the first argument.
  716.  */
  717.    va_list ap;
  718.    va_start(ap, methodId);
  719.    boolean __somResult = 
  720.       SOM_ResolveD(this,BOA,SOMObject,somDispatch)
  721.     (this,retValue,methodId,ap);
  722.    va_end(ap);
  723.    return __somResult;
  724. }
  725.  
  726.  
  727. /* va_list method: somClassDispatch */
  728.  
  729. /*
  730.  *  Like somDispatch, but method resolution for static methods is done
  731.  *  according to the clsObj instance method table.
  732.  */
  733. /* the va_list invocation form */
  734. boolean   BOA_somClassDispatch(SOMClass* clsObj, 
  735.         somToken* retValue, 
  736.         somId methodId, 
  737.         va_list ap)
  738. {return SOM_ResolveD(this,BOA,SOMObject,somClassDispatch)
  739.     (this,clsObj,retValue,methodId,ap);
  740. }
  741.  
  742. /* the varargs invocation form */
  743. boolean   somClassDispatch(SOMClass* clsObj, 
  744.         somToken* retValue, 
  745.         somId methodId, 
  746.         ...)
  747. {
  748. /*
  749.  *  Like somDispatch, but method resolution for static methods is done
  750.  *  according to the clsObj instance method table.
  751.  */
  752.    va_list ap;
  753.    va_start(ap, methodId);
  754.    boolean __somResult = 
  755.       SOM_ResolveD(this,BOA,SOMObject,somClassDispatch)
  756.     (this,clsObj,retValue,methodId,ap);
  757.    va_end(ap);
  758.    return __somResult;
  759. }
  760.  
  761.  
  762. /* method: somCastObj */
  763. boolean   somCastObj(SOMClass* cls)
  764. {
  765. /*
  766.  *  cast the receiving object to cls (which must be an ancestor of the
  767.  *  objects true class. Returns true on success.
  768.  */
  769.    return SOM_ResolveD(this,BOA,SOMObject,somCastObj)
  770.     (this,cls);
  771. }
  772.  
  773.  
  774. /* method: somResetObj */
  775. boolean   somResetObj()
  776. {
  777. /*
  778.  *  reset an object to its true class. Returns true always.
  779.  */
  780.    return SOM_ResolveD(this,BOA,SOMObject,somResetObj)
  781.     (this);
  782. }
  783.  
  784.  
  785. /* va_list method: somDispatchV */
  786.  
  787. /*
  788.  *  Obsolete. Use somDispatch instead.
  789.  */
  790. /* the va_list invocation form */
  791. void   BOA_somDispatchV(somId methodId, 
  792.         somId descriptor, 
  793.         va_list ap)
  794. {   SOM_ResolveD(this,BOA,SOMObject,somDispatchV)
  795.     (this,methodId,descriptor,ap);
  796. }
  797.  
  798. /* the varargs invocation form */
  799. void   somDispatchV(somId methodId, 
  800.         somId descriptor, 
  801.         ...)
  802. {
  803. /*
  804.  *  Obsolete. Use somDispatch instead.
  805.  */
  806.    va_list ap;
  807.    va_start(ap, descriptor);
  808.    SOM_ResolveD(this,BOA,SOMObject,somDispatchV)
  809.     (this,methodId,descriptor,ap);
  810.    va_end(ap);
  811. }
  812.  
  813.  
  814. /* va_list method: somDispatchL */
  815.  
  816. /*
  817.  *  Obsolete. Use somDispatch instead.
  818.  */
  819. /* the va_list invocation form */
  820. long   BOA_somDispatchL(somId methodId, 
  821.         somId descriptor, 
  822.         va_list ap)
  823. {return SOM_ResolveD(this,BOA,SOMObject,somDispatchL)
  824.     (this,methodId,descriptor,ap);
  825. }
  826.  
  827. /* the varargs invocation form */
  828. long   somDispatchL(somId methodId, 
  829.         somId descriptor, 
  830.         ...)
  831. {
  832. /*
  833.  *  Obsolete. Use somDispatch instead.
  834.  */
  835.    va_list ap;
  836.    va_start(ap, descriptor);
  837.    long __somResult = 
  838.       SOM_ResolveD(this,BOA,SOMObject,somDispatchL)
  839.     (this,methodId,descriptor,ap);
  840.    va_end(ap);
  841.    return __somResult;
  842. }
  843.  
  844.  
  845. /* va_list method: somDispatchA */
  846.  
  847. /*
  848.  *  Obsolete. Use somDispatch instead.
  849.  */
  850. /* the va_list invocation form */
  851. void*   BOA_somDispatchA(somId methodId, 
  852.         somId descriptor, 
  853.         va_list ap)
  854. {return SOM_ResolveD(this,BOA,SOMObject,somDispatchA)
  855.     (this,methodId,descriptor,ap);
  856. }
  857.  
  858. /* the varargs invocation form */
  859. void*   somDispatchA(somId methodId, 
  860.         somId descriptor, 
  861.         ...)
  862. {
  863. /*
  864.  *  Obsolete. Use somDispatch instead.
  865.  */
  866.    va_list ap;
  867.    va_start(ap, descriptor);
  868.    void* __somResult = 
  869.       SOM_ResolveD(this,BOA,SOMObject,somDispatchA)
  870.     (this,methodId,descriptor,ap);
  871.    va_end(ap);
  872.    return __somResult;
  873. }
  874.  
  875.  
  876. /* va_list method: somDispatchD */
  877.  
  878. /*
  879.  *  Obsolete. Use somDispatch instead.
  880.  */
  881. /* the va_list invocation form */
  882. double   BOA_somDispatchD(somId methodId, 
  883.         somId descriptor, 
  884.         va_list ap)
  885. {return SOM_ResolveD(this,BOA,SOMObject,somDispatchD)
  886.     (this,methodId,descriptor,ap);
  887. }
  888.  
  889. /* the varargs invocation form */
  890. double   somDispatchD(somId methodId, 
  891.         somId descriptor, 
  892.         ...)
  893. {
  894. /*
  895.  *  Obsolete. Use somDispatch instead.
  896.  */
  897.    va_list ap;
  898.    va_start(ap, descriptor);
  899.    double __somResult = 
  900.       SOM_ResolveD(this,BOA,SOMObject,somDispatchD)
  901.     (this,methodId,descriptor,ap);
  902.    va_end(ap);
  903.    return __somResult;
  904. }
  905.  
  906.  
  907. /* method: somPrintSelf */
  908. SOMObject*   somPrintSelf()
  909. {
  910. /*
  911.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  912.  *  information about this object.  The default implementation just gives
  913.  *  the object's class name and its address in memory.
  914.  *  <self> is returned.
  915.  */
  916.    return SOM_ResolveD(this,BOA,SOMObject,somPrintSelf)
  917.     (this);
  918. }
  919.  
  920.  
  921. /* method: somDumpSelf */
  922. void   somDumpSelf(long level)
  923. {
  924. /*
  925.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  926.  *  and its current state.
  927.  * 
  928.  *  <level> indicates the nesting level for describing compound objects
  929.  *  it must be greater than or equal to zero.  All lines in the
  930.  *  description will be preceeded by <2*level> spaces.
  931.  * 
  932.  *  This routine only actually writes the data that concerns the object
  933.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  934.  *  the object's current state.  This approach allows readable
  935.  *  descriptions of compound objects to be constructed.
  936.  * 
  937.  *  Generally it is not necessary to override this method, if it is
  938.  *  overriden it generally must be completely replaced.
  939.  */
  940.    SOM_ResolveD(this,BOA,SOMObject,somDumpSelf)
  941.     (this,level);
  942. }
  943.  
  944.  
  945. /* method: somDumpSelfInt */
  946. void   somDumpSelfInt(long level)
  947. {
  948. /*
  949.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  950.  *  Generally this method will need to be overridden.  When overriding
  951.  *  it, begin by calling the parent class form of this method and then
  952.  *  write in a description of your class's instance data. This will
  953.  *  result in a description of all the object's instance data going
  954.  *  from its root ancestor class to its specific class.
  955.  */
  956.    SOM_ResolveD(this,BOA,SOMObject,somDumpSelfInt)
  957.     (this,level);
  958. }
  959.  
  960.  
  961.  
  962. };   /* BOA */
  963.  
  964.  
  965.  
  966. #endif       /* SOM_BOA_xh */
  967.