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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: om.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 generic Object Manager.
  12.  * 
  13.  *    The Object Manager (abstract) class provides a uniform abstraction
  14.  *    for various sorts of object managers.  Object Request Brokers, persistent
  15.  *    storage managers, and OODBMSs are examples of object managers.
  16.  * 
  17.  *    This is an abstract base class, which defines the "core" interface for
  18.  *    an object manager.  The basic groups of methods are:
  19.  * 
  20.  *      - object creation (basic)
  21.  *      - object identification & location/activation
  22.  *      - object release & destruction
  23.  * 
  24.  *    If a desired object cannot be mapped into the client's address space, the
  25.  *    object manager is responsible for building a local "proxy" for the remote
  26.  *    object.  The client invokes methods on the proxy, and the proxy should
  27.  *    redispatch the requests to the remote object in an appropriate and
  28.  *    transparent way.
  29.  * 
  30.  *    NOTE: Since this is only intended to be an abstract base class, there
  31.  *    is no underlying implementation, and ObjectMgr objects should not actually
  32.  *    be instantiated.
  33.  * 
  34.  */
  35.  
  36.  
  37. #ifndef SOM_ObjectMgr_xh
  38. #define SOM_ObjectMgr_xh
  39.  
  40. class ObjectMgr;
  41.  
  42. /*
  43.  *  methods for creation
  44.  */
  45.  
  46. #define ObjectMgr_MajorVersion 2
  47. #define ObjectMgr_MinorVersion 1
  48.  
  49. /* C++ SOM defs */
  50. #include <somcls.xh>
  51. #include <somcm.xh>
  52.  
  53. /* C++ parent defs */
  54. #ifndef SOM_SOMObject_xh
  55. #include <somobj.xh>
  56. #endif
  57.  
  58. /*
  59.  * C++ metaclass def
  60.  */
  61. #include <snglicls.xh>
  62.  
  63. #ifndef ObjectMgr_API
  64. #define ObjectMgr_API
  65. /*
  66.  * -- The Class API
  67.  */
  68.  
  69. /*
  70.  * Start of bindings for IDL types
  71.  */
  72.  
  73. class SOMClass;
  74. class SOMObject;
  75. class Container;
  76.  
  77. /*
  78.  * End of bindings for IDL types.
  79.  */
  80.  
  81. /* A procedure to create the ObjectMgr Class */
  82. class SOMMSingleInstance;
  83. SOMEXTERN SOMMSingleInstance * SOMLINK ObjectMgrNewClass(
  84.         integer4 majorVersion,
  85.         integer4 minorVersion);
  86.  
  87. /* The API to the ObjectMgr class object, and the methods it introduces. */
  88. SOMEXTERN struct ObjectMgrClassDataStructure {
  89.     SOMMSingleInstance *classObject;
  90.     somMToken somdNewObject;
  91.     somMToken somdGetIdFromObject;
  92.     somMToken somdGetObjectFromId;
  93.     somMToken somdReleaseObject;
  94.     somMToken somdDestroyObject;
  95. } SOMDLINK ObjectMgrClassData;
  96. #define _ObjectMgr ObjectMgrClassData.classObject
  97.  
  98. /* The API to parentMtabs for ObjectMgr, and the instance data it introduces. */
  99. SOMEXTERN struct ObjectMgrCClassDataStructure {
  100.     somMethodTabs parentMtab;
  101.     somDToken              instanceDataToken;
  102. } SOMDLINK ObjectMgrCClassData;
  103.  
  104. /*
  105.  * -- Typedefs for ObjectMgr Method Procedures
  106.  */
  107. SOMEXTERN {
  108. typedef SOMObject*   SOMLINK somTP_ObjectMgr_somdNewObject(ObjectMgr *somSelf, Environment *ev, 
  109.         Identifier objclass, 
  110.         string hints);
  111. typedef somTP_ObjectMgr_somdNewObject *somTD_ObjectMgr_somdNewObject;
  112. typedef string   SOMLINK somTP_ObjectMgr_somdGetIdFromObject(ObjectMgr *somSelf, Environment *ev, 
  113.         SOMObject* obj);
  114. typedef somTP_ObjectMgr_somdGetIdFromObject *somTD_ObjectMgr_somdGetIdFromObject;
  115. typedef SOMObject*   SOMLINK somTP_ObjectMgr_somdGetObjectFromId(ObjectMgr *somSelf, Environment *ev, 
  116.         string id);
  117. typedef somTP_ObjectMgr_somdGetObjectFromId *somTD_ObjectMgr_somdGetObjectFromId;
  118. typedef void   SOMLINK somTP_ObjectMgr_somdReleaseObject(ObjectMgr *somSelf, Environment *ev, 
  119.         SOMObject* obj);
  120. typedef somTP_ObjectMgr_somdReleaseObject *somTD_ObjectMgr_somdReleaseObject;
  121. typedef void   SOMLINK somTP_ObjectMgr_somdDestroyObject(ObjectMgr *somSelf, Environment *ev, 
  122.         SOMObject* obj);
  123. typedef somTP_ObjectMgr_somdDestroyObject *somTD_ObjectMgr_somdDestroyObject;
  124.  
  125. /*
  126.  * -- Typedefs for Reintroduced Wrapper Methods
  127.  */
  128. typedef void   SOMLINK somTP_ObjectMgr_somDefaultInit(ObjectMgr *somSelf, 
  129.         som3InitCtrl* ctrl);
  130. typedef somTP_ObjectMgr_somDefaultInit *somTD_ObjectMgr_somDefaultInit;
  131. typedef void   SOMLINK somTP_ObjectMgr_somDestruct(ObjectMgr *somSelf, 
  132.         octet doFree, 
  133.         som3DestructCtrl* ctrl);
  134. typedef somTP_ObjectMgr_somDestruct *somTD_ObjectMgr_somDestruct;
  135. typedef void   SOMLINK somTP_ObjectMgr_somDefaultCopyInit(ObjectMgr *somSelf, 
  136.         som3InitCtrl* ctrl, 
  137.         SOMObject* fromObj);
  138. typedef somTP_ObjectMgr_somDefaultCopyInit *somTD_ObjectMgr_somDefaultCopyInit;
  139. typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultAssign(ObjectMgr *somSelf, 
  140.         som3AssignCtrl* ctrl, 
  141.         SOMObject* fromObj);
  142. typedef somTP_ObjectMgr_somDefaultAssign *somTD_ObjectMgr_somDefaultAssign;
  143. typedef void   SOMLINK somTP_ObjectMgr_somDefaultConstCopyInit(ObjectMgr *somSelf, 
  144.         som3InitCtrl* ctrl, 
  145.         SOMObject* fromObj);
  146. typedef somTP_ObjectMgr_somDefaultConstCopyInit *somTD_ObjectMgr_somDefaultConstCopyInit;
  147. typedef void   SOMLINK somTP_ObjectMgr_somDefaultVCopyInit(ObjectMgr *somSelf, 
  148.         som3InitCtrl* ctrl, 
  149.         SOMObject* fromObj);
  150. typedef somTP_ObjectMgr_somDefaultVCopyInit *somTD_ObjectMgr_somDefaultVCopyInit;
  151. typedef void   SOMLINK somTP_ObjectMgr_somDefaultConstVCopyInit(ObjectMgr *somSelf, 
  152.         som3InitCtrl* ctrl, 
  153.         SOMObject* fromObj);
  154. typedef somTP_ObjectMgr_somDefaultConstVCopyInit *somTD_ObjectMgr_somDefaultConstVCopyInit;
  155. typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultConstAssign(ObjectMgr *somSelf, 
  156.         som3AssignCtrl* ctrl, 
  157.         SOMObject* fromObj);
  158. typedef somTP_ObjectMgr_somDefaultConstAssign *somTD_ObjectMgr_somDefaultConstAssign;
  159. typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultVAssign(ObjectMgr *somSelf, 
  160.         som3AssignCtrl* ctrl, 
  161.         SOMObject* fromObj);
  162. typedef somTP_ObjectMgr_somDefaultVAssign *somTD_ObjectMgr_somDefaultVAssign;
  163. typedef ObjectMgr*   SOMLINK somTP_ObjectMgr_somDefaultConstVAssign(ObjectMgr *somSelf, 
  164.         som3AssignCtrl* ctrl, 
  165.         SOMObject* fromObj);
  166. typedef somTP_ObjectMgr_somDefaultConstVAssign *somTD_ObjectMgr_somDefaultConstVAssign;
  167. typedef void   SOMLINK somTP_ObjectMgr_somInit(ObjectMgr *somSelf);
  168. typedef somTP_ObjectMgr_somInit *somTD_ObjectMgr_somInit;
  169. typedef void   SOMLINK somTP_ObjectMgr_somFree(ObjectMgr *somSelf);
  170. typedef somTP_ObjectMgr_somFree *somTD_ObjectMgr_somFree;
  171. typedef void   SOMLINK somTP_ObjectMgr_somUninit(ObjectMgr *somSelf);
  172. typedef somTP_ObjectMgr_somUninit *somTD_ObjectMgr_somUninit;
  173. typedef SOMMSingleInstance*   SOMLINK somTP_ObjectMgr_somGetClass(ObjectMgr *somSelf);
  174. typedef somTP_ObjectMgr_somGetClass *somTD_ObjectMgr_somGetClass;
  175. typedef string   SOMLINK somTP_ObjectMgr_somGetClassName(ObjectMgr *somSelf);
  176. typedef somTP_ObjectMgr_somGetClassName *somTD_ObjectMgr_somGetClassName;
  177. typedef long   SOMLINK somTP_ObjectMgr_somGetSize(ObjectMgr *somSelf);
  178. typedef somTP_ObjectMgr_somGetSize *somTD_ObjectMgr_somGetSize;
  179. typedef boolean   SOMLINK somTP_ObjectMgr_somIsA(ObjectMgr *somSelf, 
  180.         SOMClass* aClassObj);
  181. typedef somTP_ObjectMgr_somIsA *somTD_ObjectMgr_somIsA;
  182. typedef boolean   SOMLINK somTP_ObjectMgr_somIsInstanceOf(ObjectMgr *somSelf, 
  183.         SOMClass* aClassObj);
  184. typedef somTP_ObjectMgr_somIsInstanceOf *somTD_ObjectMgr_somIsInstanceOf;
  185. typedef boolean   SOMLINK somTP_ObjectMgr_somRespondsTo(ObjectMgr *somSelf, 
  186.         somId mId);
  187. typedef somTP_ObjectMgr_somRespondsTo *somTD_ObjectMgr_somRespondsTo;
  188. typedef boolean   SOMLINK somTP_ObjectMgr_somDispatch(ObjectMgr *somSelf, 
  189.         somToken* retValue, 
  190.         somId methodId, 
  191.         va_list ap);
  192. typedef somTP_ObjectMgr_somDispatch *somTD_ObjectMgr_somDispatch;
  193. typedef boolean   SOMLINK somTP_ObjectMgr_somClassDispatch(ObjectMgr *somSelf, 
  194.         SOMClass* clsObj, 
  195.         somToken* retValue, 
  196.         somId methodId, 
  197.         va_list ap);
  198. typedef somTP_ObjectMgr_somClassDispatch *somTD_ObjectMgr_somClassDispatch;
  199. typedef boolean   SOMLINK somTP_ObjectMgr_somCastObj(ObjectMgr *somSelf, 
  200.         SOMClass* cls);
  201. typedef somTP_ObjectMgr_somCastObj *somTD_ObjectMgr_somCastObj;
  202. typedef boolean   SOMLINK somTP_ObjectMgr_somResetObj(ObjectMgr *somSelf);
  203. typedef somTP_ObjectMgr_somResetObj *somTD_ObjectMgr_somResetObj;
  204. typedef void   SOMLINK somTP_ObjectMgr_somDispatchV(ObjectMgr *somSelf, 
  205.         somId methodId, 
  206.         somId descriptor, 
  207.         va_list ap);
  208. typedef somTP_ObjectMgr_somDispatchV *somTD_ObjectMgr_somDispatchV;
  209. typedef long   SOMLINK somTP_ObjectMgr_somDispatchL(ObjectMgr *somSelf, 
  210.         somId methodId, 
  211.         somId descriptor, 
  212.         va_list ap);
  213. typedef somTP_ObjectMgr_somDispatchL *somTD_ObjectMgr_somDispatchL;
  214. typedef void*   SOMLINK somTP_ObjectMgr_somDispatchA(ObjectMgr *somSelf, 
  215.         somId methodId, 
  216.         somId descriptor, 
  217.         va_list ap);
  218. typedef somTP_ObjectMgr_somDispatchA *somTD_ObjectMgr_somDispatchA;
  219. typedef double   SOMLINK somTP_ObjectMgr_somDispatchD(ObjectMgr *somSelf, 
  220.         somId methodId, 
  221.         somId descriptor, 
  222.         va_list ap);
  223. typedef somTP_ObjectMgr_somDispatchD *somTD_ObjectMgr_somDispatchD;
  224. typedef SOMObject*   SOMLINK somTP_ObjectMgr_somPrintSelf(ObjectMgr *somSelf);
  225. typedef somTP_ObjectMgr_somPrintSelf *somTD_ObjectMgr_somPrintSelf;
  226. typedef void   SOMLINK somTP_ObjectMgr_somDumpSelf(ObjectMgr *somSelf, 
  227.         long level);
  228. typedef somTP_ObjectMgr_somDumpSelf *somTD_ObjectMgr_somDumpSelf;
  229. typedef void   SOMLINK somTP_ObjectMgr_somDumpSelfInt(ObjectMgr *somSelf, 
  230.         long level);
  231. typedef somTP_ObjectMgr_somDumpSelfInt *somTD_ObjectMgr_somDumpSelfInt;
  232. }
  233.  
  234. #endif /* ObjectMgr_API */
  235.  
  236.  
  237. /*
  238.  * -- This emitter treats Method Tokens as Thunks by default.
  239.  * -- Use the sc modifier "nothunks" to change this default
  240.  */
  241. #undef somresolve_
  242. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  243.  
  244. /*
  245.  * -- The C++ Wrapper Class for ObjectMgr
  246.  */
  247. class ObjectMgr : public SOMObject
  248. {
  249. /*
  250.  *  methods for creation
  251.  */
  252. public:
  253.  
  254. // ObjectMgr::new creates the class object if necessary, and then uses somNewNoInit
  255. // to allocate memory and create the object. Initialization is in ctors.
  256. void *operator new(size_t)
  257. {
  258.    if (!_ObjectMgr) ObjectMgrNewClass(ObjectMgr_MajorVersion,ObjectMgr_MinorVersion);
  259.    return (void*)
  260.       SOM_Resolve(_ObjectMgr,SOMClass,somNewNoInit)
  261.          ((SOMClass *)((void*)_ObjectMgr));
  262. }
  263.  
  264. // ObjectMgr::delete uses somDestruct.
  265. void operator delete(void * obj)
  266. {
  267.    if (obj && *(void**)obj) {
  268.       SOM_Resolve(obj,SOMObject,somFree)
  269.          ((SOMObject*)obj);
  270.    }
  271. }
  272.  
  273. ObjectMgr& operator=(ObjectMgr& fromObj)
  274. {
  275.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  276.    return *this;
  277. }
  278.  
  279. ObjectMgr()
  280. {
  281.    if (*(void**)this != 
  282.        ((somParentMtabStructPtr)
  283.         (ObjectMgrCClassData.parentMtab))->mtab)
  284.       return;
  285.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  286. }
  287.  
  288. ObjectMgr(ObjectMgr* fromObj)
  289. {
  290.    if (*(void**)this != 
  291.        ((somParentMtabStructPtr)
  292.         (ObjectMgrCClassData.parentMtab))->mtab)
  293.       return;
  294.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  295. }
  296.  
  297. #ifdef __IBMCPP__
  298. #pragma info(nocnv,nopar)
  299. #endif
  300. ObjectMgr(const ObjectMgr* fromObj)
  301. {
  302.    if (*(void**)this != 
  303.        ((somParentMtabStructPtr)
  304.         (ObjectMgrCClassData.parentMtab))->mtab)
  305.       return;
  306.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  307. }
  308. #ifdef __IBMCPP__
  309. #pragma info(restore)
  310. #endif
  311.  
  312.  
  313. /* method: somdNewObject */
  314. SOMObject*   somdNewObject(Environment *ev, 
  315.         Identifier objclass, 
  316.         string hints)
  317. {
  318. /*
  319.  *  Returns a new object of the named class.  This is a "basic" creation
  320.  *  method, where the decisions about where and how to create the object
  321.  *  are mostly left up to the Object Manager.  However, the Object Manager
  322.  *  may optionally define creation "hints" which the client may specify in
  323.  *  this call.
  324.  * 
  325.  *  OWNERSHIP of returned object is transferred to the caller.
  326.  *  methods for identification & location/activation
  327.  */
  328.    return SOM_ResolveD(this,ObjectMgr,ObjectMgr,somdNewObject)
  329.     (this, ev,objclass,hints);
  330. }
  331.  
  332.  
  333. /* method: somdGetIdFromObject */
  334. string   somdGetIdFromObject(Environment *ev, 
  335.         SOMObject* obj)
  336. {
  337. /*
  338.  *  Returns a external id for an object managed by this Object Manager.
  339.  *  The id is unambiguous -- it always refers to the same object (as long
  340.  *  as the object exists).
  341.  * 
  342.  *  OWNERSHIP of returned id string is transferred to the caller.
  343.  */
  344.    return SOM_ResolveD(this,ObjectMgr,ObjectMgr,somdGetIdFromObject)
  345.     (this, ev,obj);
  346. }
  347.  
  348.  
  349. /* method: somdGetObjectFromId */
  350. SOMObject*   somdGetObjectFromId(Environment *ev, 
  351.         string id)
  352. {
  353. /*
  354.  *  Finds and/or activates an object implemented by this Object Manager,
  355.  *  given its id.
  356.  * 
  357.  *  OWNERSHIP of returned object is transferred to the caller.
  358.  *  methods for releasing / destroying objects
  359.  */
  360.    return SOM_ResolveD(this,ObjectMgr,ObjectMgr,somdGetObjectFromId)
  361.     (this, ev,id);
  362. }
  363.  
  364.  
  365. /* method: somdReleaseObject */
  366. void   somdReleaseObject(Environment *ev, 
  367.         SOMObject* obj)
  368. {
  369. /*
  370.  *  Indicates that the client has finished using the object, and the
  371.  *  "connection" to the object, if any, can be released.
  372.  */
  373.    SOM_ResolveD(this,ObjectMgr,ObjectMgr,somdReleaseObject)
  374.     (this, ev,obj);
  375. }
  376.  
  377.  
  378. /* method: somdDestroyObject */
  379. void   somdDestroyObject(Environment *ev, 
  380.         SOMObject* obj)
  381. {
  382. /*
  383.  *  Causes the specified object to be destroyed.  (There is an implicit
  384.  *  somoReleaseObject call made.)
  385.  */
  386.    SOM_ResolveD(this,ObjectMgr,ObjectMgr,somdDestroyObject)
  387.     (this, ev,obj);
  388. }
  389.  
  390.  
  391. /*
  392.  * Reintroduce inherited methods
  393.  */
  394.  
  395. /* initializer method: somDefaultInit */
  396. void   somDefaultInit(som3InitCtrl* ctrl)
  397. {
  398. /*
  399.  *  A default initializer for a SOM object. Passing a null ctrl
  400.  *  indicates to the receiver that its class is the class of the
  401.  *  object being initialized, whereby the initializer will determine
  402.  *  an appropriate control structure.
  403.  */
  404.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultInit)
  405.     (this,ctrl);
  406. }
  407.  
  408.  
  409. /* method: somDestruct */
  410. void   somDestruct(octet doFree, 
  411.         som3DestructCtrl* ctrl)
  412. {
  413. /*
  414.  *  The default destructor for a SOM object. A nonzero <doFree>
  415.  *  indicates that the object storage should be freed by the
  416.  *  object's class (via somDeallocate) after uninitialization.
  417.  *  As with somDefaultInit, a null ctrl can be passed.
  418.  */
  419.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDestruct)
  420.     (this,doFree,ctrl);
  421. }
  422.  
  423.  
  424. /* initializer method: somDefaultCopyInit */
  425. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  426.         SOMObject* fromObj)
  427. {
  428. /*
  429.  *  A default copy constructor. Use this to make copies of objects for
  430.  *  calling methods with "by-value" argument semantics.
  431.  */
  432.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultCopyInit)
  433.     (this,ctrl,fromObj);
  434. }
  435.  
  436.  
  437. /* method: somDefaultAssign */
  438. ObjectMgr*  somDefaultAssign(som3AssignCtrl* ctrl, 
  439.         SOMObject* fromObj)
  440. {
  441. /*
  442.  *  A default assignment operator. Use this to "assign" the state of one
  443.  *  object to another.
  444.  */
  445.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultAssign)
  446.     (this,ctrl,fromObj);
  447. }
  448.  
  449.  
  450. /* initializer method: somDefaultConstCopyInit */
  451. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  452.         SOMObject* fromObj)
  453. {
  454. /*
  455.  *  A default copy constructor that uses a const fromObj.
  456.  */
  457.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultConstCopyInit)
  458.     (this,ctrl,fromObj);
  459. }
  460.  
  461.  
  462. /* initializer method: somDefaultVCopyInit */
  463. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  464.         SOMObject* fromObj)
  465. {
  466. /*
  467.  *  A default copy constructor that uses a volatile fromObj.
  468.  */
  469.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultVCopyInit)
  470.     (this,ctrl,fromObj);
  471. }
  472.  
  473.  
  474. /* initializer method: somDefaultConstVCopyInit */
  475. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  476.         SOMObject* fromObj)
  477. {
  478. /*
  479.  *  A default copy constructor that uses a const volatile fromObj.
  480.  */
  481.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultConstVCopyInit)
  482.     (this,ctrl,fromObj);
  483. }
  484.  
  485.  
  486. /* method: somDefaultConstAssign */
  487. ObjectMgr*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  488.         SOMObject* fromObj)
  489. {
  490. /*
  491.  *  A default assignment operator that uses a const fromObj.
  492.  */
  493.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultConstAssign)
  494.     (this,ctrl,fromObj);
  495. }
  496.  
  497.  
  498. /* method: somDefaultVAssign */
  499. ObjectMgr*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  500.         SOMObject* fromObj)
  501. {
  502. /*
  503.  *  A default assignment operator that uses a volatile fromObj.
  504.  */
  505.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultVAssign)
  506.     (this,ctrl,fromObj);
  507. }
  508.  
  509.  
  510. /* method: somDefaultConstVAssign */
  511. ObjectMgr*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  512.         SOMObject* fromObj)
  513. {
  514. /*
  515.  *  A default assignment operator that uses a const volatile fromObj.
  516.  */
  517.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somDefaultConstVAssign)
  518.     (this,ctrl,fromObj);
  519. }
  520.  
  521.  
  522. /* method: somInit */
  523. void   somInit()
  524. {
  525. /*
  526.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  527.  */
  528.    SOM_ResolveD(this,ObjectMgr,SOMObject,somInit)
  529.     (this);
  530. }
  531.  
  532.  
  533. /* method: somFree */
  534. void   somFree()
  535. {
  536. /*
  537.  *  Use as directed by framework implementations.
  538.  */
  539.    SOM_ResolveD(this,ObjectMgr,SOMObject,somFree)
  540.     (this);
  541. }
  542.  
  543.  
  544. /* method: somUninit */
  545. void   somUninit()
  546. {
  547. /*
  548.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  549.  */
  550.    SOM_ResolveD(this,ObjectMgr,SOMObject,somUninit)
  551.     (this);
  552. }
  553.  
  554.  
  555. /* method: somGetClass */
  556. SOMMSingleInstance*  somGetClass()
  557. {
  558. /*
  559.  *  Return the receiver's class.
  560.  */
  561.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somGetClass)
  562.     (this);
  563. }
  564.  
  565.  
  566. /* method: somGetClassName */
  567. string   somGetClassName()
  568. {
  569. /*
  570.  *  Return the name of the receiver's class.
  571.  */
  572.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somGetClassName)
  573.     (this);
  574. }
  575.  
  576.  
  577. /* method: somGetSize */
  578. long   somGetSize()
  579. {
  580. /*
  581.  *  Return the size of the receiver.
  582.  */
  583.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somGetSize)
  584.     (this);
  585. }
  586.  
  587.  
  588. /* method: somIsA */
  589. boolean   somIsA(SOMClass* aClassObj)
  590. {
  591. /*
  592.  *  Returns 1 (true) if the receiver responds to methods
  593.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  594.  */
  595.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somIsA)
  596.     (this,aClassObj);
  597. }
  598.  
  599.  
  600. /* method: somIsInstanceOf */
  601. boolean   somIsInstanceOf(SOMClass* aClassObj)
  602. {
  603. /*
  604.  *  Returns 1 (true) if the receiver is an instance of
  605.  *  <aClassObj> and 0 (false) otherwise.
  606.  */
  607.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somIsInstanceOf)
  608.     (this,aClassObj);
  609. }
  610.  
  611.  
  612. /* method: somRespondsTo */
  613. boolean   somRespondsTo(somId mId)
  614. {
  615. /*
  616.  *  Returns 1 (true) if the indicated method can be invoked
  617.  *  on the receiver and 0 (false) otherwise.
  618.  */
  619.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somRespondsTo)
  620.     (this,mId);
  621. }
  622.  
  623.  
  624. /* va_list method: somDispatch */
  625.  
  626. /*
  627.  *  This method provides a generic, class-specific dispatch mechanism.
  628.  *  It accepts as input <retValue> a pointer to the memory area to be
  629.  *  loaded with the result of dispatching the method indicated by
  630.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  631.  *  on which the method is to be invoked as the first argument.
  632.  */
  633. /* the va_list invocation form */
  634. boolean   ObjectMgr_somDispatch(somToken* retValue, 
  635.         somId methodId, 
  636.         va_list ap)
  637. {return SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatch)
  638.     (this,retValue,methodId,ap);
  639. }
  640.  
  641. /* the varargs invocation form */
  642. boolean   somDispatch(somToken* retValue, 
  643.         somId methodId, 
  644.         ...)
  645. {
  646. /*
  647.  *  This method provides a generic, class-specific dispatch mechanism.
  648.  *  It accepts as input <retValue> a pointer to the memory area to be
  649.  *  loaded with the result of dispatching the method indicated by
  650.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  651.  *  on which the method is to be invoked as the first argument.
  652.  */
  653.    va_list ap;
  654.    va_start(ap, methodId);
  655.    boolean __somResult = 
  656.       SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatch)
  657.     (this,retValue,methodId,ap);
  658.    va_end(ap);
  659.    return __somResult;
  660. }
  661.  
  662.  
  663. /* va_list method: somClassDispatch */
  664.  
  665. /*
  666.  *  Like somDispatch, but method resolution for static methods is done
  667.  *  according to the clsObj instance method table.
  668.  */
  669. /* the va_list invocation form */
  670. boolean   ObjectMgr_somClassDispatch(SOMClass* clsObj, 
  671.         somToken* retValue, 
  672.         somId methodId, 
  673.         va_list ap)
  674. {return SOM_ResolveD(this,ObjectMgr,SOMObject,somClassDispatch)
  675.     (this,clsObj,retValue,methodId,ap);
  676. }
  677.  
  678. /* the varargs invocation form */
  679. boolean   somClassDispatch(SOMClass* clsObj, 
  680.         somToken* retValue, 
  681.         somId methodId, 
  682.         ...)
  683. {
  684. /*
  685.  *  Like somDispatch, but method resolution for static methods is done
  686.  *  according to the clsObj instance method table.
  687.  */
  688.    va_list ap;
  689.    va_start(ap, methodId);
  690.    boolean __somResult = 
  691.       SOM_ResolveD(this,ObjectMgr,SOMObject,somClassDispatch)
  692.     (this,clsObj,retValue,methodId,ap);
  693.    va_end(ap);
  694.    return __somResult;
  695. }
  696.  
  697.  
  698. /* method: somCastObj */
  699. boolean   somCastObj(SOMClass* cls)
  700. {
  701. /*
  702.  *  cast the receiving object to cls (which must be an ancestor of the
  703.  *  objects true class. Returns true on success.
  704.  */
  705.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somCastObj)
  706.     (this,cls);
  707. }
  708.  
  709.  
  710. /* method: somResetObj */
  711. boolean   somResetObj()
  712. {
  713. /*
  714.  *  reset an object to its true class. Returns true always.
  715.  */
  716.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somResetObj)
  717.     (this);
  718. }
  719.  
  720.  
  721. /* va_list method: somDispatchV */
  722.  
  723. /*
  724.  *  Obsolete. Use somDispatch instead.
  725.  */
  726. /* the va_list invocation form */
  727. void   ObjectMgr_somDispatchV(somId methodId, 
  728.         somId descriptor, 
  729.         va_list ap)
  730. {   SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchV)
  731.     (this,methodId,descriptor,ap);
  732. }
  733.  
  734. /* the varargs invocation form */
  735. void   somDispatchV(somId methodId, 
  736.         somId descriptor, 
  737.         ...)
  738. {
  739. /*
  740.  *  Obsolete. Use somDispatch instead.
  741.  */
  742.    va_list ap;
  743.    va_start(ap, descriptor);
  744.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchV)
  745.     (this,methodId,descriptor,ap);
  746.    va_end(ap);
  747. }
  748.  
  749.  
  750. /* va_list method: somDispatchL */
  751.  
  752. /*
  753.  *  Obsolete. Use somDispatch instead.
  754.  */
  755. /* the va_list invocation form */
  756. long   ObjectMgr_somDispatchL(somId methodId, 
  757.         somId descriptor, 
  758.         va_list ap)
  759. {return SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchL)
  760.     (this,methodId,descriptor,ap);
  761. }
  762.  
  763. /* the varargs invocation form */
  764. long   somDispatchL(somId methodId, 
  765.         somId descriptor, 
  766.         ...)
  767. {
  768. /*
  769.  *  Obsolete. Use somDispatch instead.
  770.  */
  771.    va_list ap;
  772.    va_start(ap, descriptor);
  773.    long __somResult = 
  774.       SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchL)
  775.     (this,methodId,descriptor,ap);
  776.    va_end(ap);
  777.    return __somResult;
  778. }
  779.  
  780.  
  781. /* va_list method: somDispatchA */
  782.  
  783. /*
  784.  *  Obsolete. Use somDispatch instead.
  785.  */
  786. /* the va_list invocation form */
  787. void*   ObjectMgr_somDispatchA(somId methodId, 
  788.         somId descriptor, 
  789.         va_list ap)
  790. {return SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchA)
  791.     (this,methodId,descriptor,ap);
  792. }
  793.  
  794. /* the varargs invocation form */
  795. void*   somDispatchA(somId methodId, 
  796.         somId descriptor, 
  797.         ...)
  798. {
  799. /*
  800.  *  Obsolete. Use somDispatch instead.
  801.  */
  802.    va_list ap;
  803.    va_start(ap, descriptor);
  804.    void* __somResult = 
  805.       SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchA)
  806.     (this,methodId,descriptor,ap);
  807.    va_end(ap);
  808.    return __somResult;
  809. }
  810.  
  811.  
  812. /* va_list method: somDispatchD */
  813.  
  814. /*
  815.  *  Obsolete. Use somDispatch instead.
  816.  */
  817. /* the va_list invocation form */
  818. double   ObjectMgr_somDispatchD(somId methodId, 
  819.         somId descriptor, 
  820.         va_list ap)
  821. {return SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchD)
  822.     (this,methodId,descriptor,ap);
  823. }
  824.  
  825. /* the varargs invocation form */
  826. double   somDispatchD(somId methodId, 
  827.         somId descriptor, 
  828.         ...)
  829. {
  830. /*
  831.  *  Obsolete. Use somDispatch instead.
  832.  */
  833.    va_list ap;
  834.    va_start(ap, descriptor);
  835.    double __somResult = 
  836.       SOM_ResolveD(this,ObjectMgr,SOMObject,somDispatchD)
  837.     (this,methodId,descriptor,ap);
  838.    va_end(ap);
  839.    return __somResult;
  840. }
  841.  
  842.  
  843. /* method: somPrintSelf */
  844. SOMObject*   somPrintSelf()
  845. {
  846. /*
  847.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  848.  *  information about this object.  The default implementation just gives
  849.  *  the object's class name and its address in memory.
  850.  *  <self> is returned.
  851.  */
  852.    return SOM_ResolveD(this,ObjectMgr,SOMObject,somPrintSelf)
  853.     (this);
  854. }
  855.  
  856.  
  857. /* method: somDumpSelf */
  858. void   somDumpSelf(long level)
  859. {
  860. /*
  861.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  862.  *  and its current state.
  863.  * 
  864.  *  <level> indicates the nesting level for describing compound objects
  865.  *  it must be greater than or equal to zero.  All lines in the
  866.  *  description will be preceeded by <2*level> spaces.
  867.  * 
  868.  *  This routine only actually writes the data that concerns the object
  869.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  870.  *  the object's current state.  This approach allows readable
  871.  *  descriptions of compound objects to be constructed.
  872.  * 
  873.  *  Generally it is not necessary to override this method, if it is
  874.  *  overriden it generally must be completely replaced.
  875.  */
  876.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDumpSelf)
  877.     (this,level);
  878. }
  879.  
  880.  
  881. /* method: somDumpSelfInt */
  882. void   somDumpSelfInt(long level)
  883. {
  884. /*
  885.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  886.  *  Generally this method will need to be overridden.  When overriding
  887.  *  it, begin by calling the parent class form of this method and then
  888.  *  write in a description of your class's instance data. This will
  889.  *  result in a description of all the object's instance data going
  890.  *  from its root ancestor class to its specific class.
  891.  */
  892.    SOM_ResolveD(this,ObjectMgr,SOMObject,somDumpSelfInt)
  893.     (this,level);
  894. }
  895.  
  896.  
  897.  
  898. };   /* ObjectMgr */
  899.  
  900.  
  901.  
  902. #endif       /* SOM_ObjectMgr_xh */
  903.