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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: somrcls.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somr
  12.  * 
  13.  *    ORIGINS: 27
  14.  * 
  15.  * 
  16.  *    10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  17.  *    All Rights Reserved
  18.  *    Licensed Materials - Property of IBM
  19.  *    US Government Users Restricted Rights - Use, duplication or
  20.  *    disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  21.  * 
  22.  */
  23.  
  24.  
  25. #ifndef SOM_SOMRReplicableObject_xh
  26. #define SOM_SOMRReplicableObject_xh
  27.  
  28. class SOMRReplicableObject;
  29.  
  30. #define SOMRReplicableObject_MajorVersion 2
  31. #define SOMRReplicableObject_MinorVersion 1
  32.  
  33. /* C++ SOM defs */
  34. #include <somcls.xh>
  35. #include <somcm.xh>
  36.  
  37. /* C++ parent defs */
  38. #ifndef SOM_SOMRReplicbl_xh
  39. #include <replicbl.xh>
  40. #endif
  41.  
  42. /*
  43.  * C++ metaclass def
  44.  */
  45. #include <somrmcls.xh>
  46.  
  47. #ifndef SOMRReplicableObject_API
  48. #define SOMRReplicableObject_API
  49. /*
  50.  * -- The Class API
  51.  */
  52.  
  53. /*
  54.  * Start of bindings for IDL types
  55.  */
  56.  
  57. class SOMClass;
  58. class SOMObject;
  59. class SOFTRepmgrAB;
  60. class Set;
  61.  
  62. /*
  63.  * End of bindings for IDL types.
  64.  */
  65.  
  66. /* A procedure to create the SOMRReplicableObject Class */
  67. class SOMRReplicable;
  68. SOMEXTERN SOMRReplicable * SOMLINK SOMRReplicableObjectNewClass(
  69.         integer4 majorVersion,
  70.         integer4 minorVersion);
  71.  
  72. /* The API to the SOMRReplicableObject class object, and the methods it introduces. */
  73. SOMEXTERN struct SOMRReplicableObjectClassDataStructure {
  74.     SOMRReplicable *classObject;
  75.     somMToken somrLoggingType;
  76.     somMToken somrReplicableExemptMethod;
  77. } SOMDLINK SOMRReplicableObjectClassData;
  78. #define _SOMRReplicableObject SOMRReplicableObjectClassData.classObject
  79.  
  80. /* The API to parentMtabs for SOMRReplicableObject, and the instance data it introduces. */
  81. SOMEXTERN struct SOMRReplicableObjectCClassDataStructure {
  82.     somMethodTabs parentMtab;
  83.     somDToken              instanceDataToken;
  84. } SOMDLINK SOMRReplicableObjectCClassData;
  85.  
  86. /*
  87.  * -- Typedefs for SOMRReplicableObject Method Procedures
  88.  */
  89. SOMEXTERN {
  90. typedef char   SOMLINK somTP_SOMRReplicableObject_somrLoggingType(SOMRReplicableObject *somSelf, Environment *ev);
  91. typedef somTP_SOMRReplicableObject_somrLoggingType *somTD_SOMRReplicableObject_somrLoggingType;
  92. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somrReplicableExemptMethod(SOMRReplicableObject *somSelf, Environment *ev, 
  93.         somId methodId);
  94. typedef somTP_SOMRReplicableObject_somrReplicableExemptMethod *somTD_SOMRReplicableObject_somrReplicableExemptMethod;
  95.  
  96. /*
  97.  * -- Typedefs for Reintroduced Wrapper Methods
  98.  */
  99. typedef void   SOMLINK somTP_SOMRReplicableObject_somrLock(SOMRReplicableObject *somSelf, Environment *ev);
  100. typedef somTP_SOMRReplicableObject_somrLock *somTD_SOMRReplicableObject_somrLock;
  101. typedef void   SOMLINK somTP_SOMRReplicableObject_somrLockNlogOp(SOMRReplicableObject *somSelf, Environment *ev, 
  102.         string ClassName, 
  103.         string MthdName, 
  104.         va_list ap);
  105. typedef somTP_SOMRReplicableObject_somrLockNlogOp *somTD_SOMRReplicableObject_somrLockNlogOp;
  106. typedef void   SOMLINK somTP_SOMRReplicableObject_somrReleaseNPropagateUpdate(SOMRReplicableObject *somSelf, Environment *ev, 
  107.         string clsname, 
  108.         string buf, 
  109.         long len, 
  110.         long intOid);
  111. typedef somTP_SOMRReplicableObject_somrReleaseNPropagateUpdate *somTD_SOMRReplicableObject_somrReleaseNPropagateUpdate;
  112. typedef void   SOMLINK somTP_SOMRReplicableObject_somrReleaseLockNAbortUpdate(SOMRReplicableObject *somSelf, Environment *ev);
  113. typedef somTP_SOMRReplicableObject_somrReleaseLockNAbortUpdate *somTD_SOMRReplicableObject_somrReleaseLockNAbortUpdate;
  114. typedef void   SOMLINK somTP_SOMRReplicableObject_somrReleaseNPropagateOperation(SOMRReplicableObject *somSelf, Environment *ev);
  115. typedef somTP_SOMRReplicableObject_somrReleaseNPropagateOperation *somTD_SOMRReplicableObject_somrReleaseNPropagateOperation;
  116. typedef void   SOMLINK somTP_SOMRReplicableObject_somrReleaseLockNAbortOp(SOMRReplicableObject *somSelf, Environment *ev);
  117. typedef somTP_SOMRReplicableObject_somrReleaseLockNAbortOp *somTD_SOMRReplicableObject_somrReleaseLockNAbortOp;
  118. typedef long   SOMLINK somTP_SOMRReplicableObject_somrRepInit(SOMRReplicableObject *somSelf, Environment *ev, 
  119.         char lType, 
  120.         char mode);
  121. typedef somTP_SOMRReplicableObject_somrRepInit *somTD_SOMRReplicableObject_somrRepInit;
  122. typedef void   SOMLINK somTP_SOMRReplicableObject_somrRepUninit(SOMRReplicableObject *somSelf, Environment *ev);
  123. typedef somTP_SOMRReplicableObject_somrRepUninit *somTD_SOMRReplicableObject_somrRepUninit;
  124. typedef void   SOMLINK somTP_SOMRReplicableObject_somrApplyUpdates(SOMRReplicableObject *somSelf, Environment *ev, 
  125.         string buf, 
  126.         long len, 
  127.         long ObjIntId);
  128. typedef somTP_SOMRReplicableObject_somrApplyUpdates *somTD_SOMRReplicableObject_somrApplyUpdates;
  129. typedef void   SOMLINK somTP_SOMRReplicableObject_somrDoDirective(SOMRReplicableObject *somSelf, Environment *ev, 
  130.         string str);
  131. typedef somTP_SOMRReplicableObject_somrDoDirective *somTD_SOMRReplicableObject_somrDoDirective;
  132. typedef void   SOMLINK somTP_SOMRReplicableObject_somrPin(SOMRReplicableObject *somSelf, Environment *ev);
  133. typedef somTP_SOMRReplicableObject_somrPin *somTD_SOMRReplicableObject_somrPin;
  134. typedef void   SOMLINK somTP_SOMRReplicableObject_somrUnPin(SOMRReplicableObject *somSelf, Environment *ev);
  135. typedef somTP_SOMRReplicableObject_somrUnPin *somTD_SOMRReplicableObject_somrUnPin;
  136. typedef long   SOMLINK somTP_SOMRReplicableObject_somrGetSecurityPolicy(SOMRReplicableObject *somSelf, Environment *ev);
  137. typedef somTP_SOMRReplicableObject_somrGetSecurityPolicy *somTD_SOMRReplicableObject_somrGetSecurityPolicy;
  138. typedef void   SOMLINK somTP_SOMRReplicableObject_somInit(SOMRReplicableObject *somSelf);
  139. typedef somTP_SOMRReplicableObject_somInit *somTD_SOMRReplicableObject_somInit;
  140. typedef void   SOMLINK somTP_SOMRReplicableObject_somUninit(SOMRReplicableObject *somSelf);
  141. typedef somTP_SOMRReplicableObject_somUninit *somTD_SOMRReplicableObject_somUninit;
  142. typedef void   SOMLINK somTP_SOMRReplicableObject_somrSetObjName(SOMRReplicableObject *somSelf, Environment *ev, 
  143.         string name);
  144. typedef somTP_SOMRReplicableObject_somrSetObjName *somTD_SOMRReplicableObject_somrSetObjName;
  145. typedef string   SOMLINK somTP_SOMRReplicableObject_somrGetObjName(SOMRReplicableObject *somSelf, Environment *ev);
  146. typedef somTP_SOMRReplicableObject_somrGetObjName *somTD_SOMRReplicableObject_somrGetObjName;
  147. typedef void   SOMLINK somTP_SOMRReplicableObject_somDefaultInit(SOMRReplicableObject *somSelf, 
  148.         som3InitCtrl* ctrl);
  149. typedef somTP_SOMRReplicableObject_somDefaultInit *somTD_SOMRReplicableObject_somDefaultInit;
  150. typedef void   SOMLINK somTP_SOMRReplicableObject_somDestruct(SOMRReplicableObject *somSelf, 
  151.         octet doFree, 
  152.         som3DestructCtrl* ctrl);
  153. typedef somTP_SOMRReplicableObject_somDestruct *somTD_SOMRReplicableObject_somDestruct;
  154. typedef void   SOMLINK somTP_SOMRReplicableObject_somDefaultCopyInit(SOMRReplicableObject *somSelf, 
  155.         som3InitCtrl* ctrl, 
  156.         SOMObject* fromObj);
  157. typedef somTP_SOMRReplicableObject_somDefaultCopyInit *somTD_SOMRReplicableObject_somDefaultCopyInit;
  158. typedef SOMRReplicableObject*   SOMLINK somTP_SOMRReplicableObject_somDefaultAssign(SOMRReplicableObject *somSelf, 
  159.         som3AssignCtrl* ctrl, 
  160.         SOMObject* fromObj);
  161. typedef somTP_SOMRReplicableObject_somDefaultAssign *somTD_SOMRReplicableObject_somDefaultAssign;
  162. typedef void   SOMLINK somTP_SOMRReplicableObject_somDefaultConstCopyInit(SOMRReplicableObject *somSelf, 
  163.         som3InitCtrl* ctrl, 
  164.         SOMObject* fromObj);
  165. typedef somTP_SOMRReplicableObject_somDefaultConstCopyInit *somTD_SOMRReplicableObject_somDefaultConstCopyInit;
  166. typedef void   SOMLINK somTP_SOMRReplicableObject_somDefaultVCopyInit(SOMRReplicableObject *somSelf, 
  167.         som3InitCtrl* ctrl, 
  168.         SOMObject* fromObj);
  169. typedef somTP_SOMRReplicableObject_somDefaultVCopyInit *somTD_SOMRReplicableObject_somDefaultVCopyInit;
  170. typedef void   SOMLINK somTP_SOMRReplicableObject_somDefaultConstVCopyInit(SOMRReplicableObject *somSelf, 
  171.         som3InitCtrl* ctrl, 
  172.         SOMObject* fromObj);
  173. typedef somTP_SOMRReplicableObject_somDefaultConstVCopyInit *somTD_SOMRReplicableObject_somDefaultConstVCopyInit;
  174. typedef SOMRReplicableObject*   SOMLINK somTP_SOMRReplicableObject_somDefaultConstAssign(SOMRReplicableObject *somSelf, 
  175.         som3AssignCtrl* ctrl, 
  176.         SOMObject* fromObj);
  177. typedef somTP_SOMRReplicableObject_somDefaultConstAssign *somTD_SOMRReplicableObject_somDefaultConstAssign;
  178. typedef SOMRReplicableObject*   SOMLINK somTP_SOMRReplicableObject_somDefaultVAssign(SOMRReplicableObject *somSelf, 
  179.         som3AssignCtrl* ctrl, 
  180.         SOMObject* fromObj);
  181. typedef somTP_SOMRReplicableObject_somDefaultVAssign *somTD_SOMRReplicableObject_somDefaultVAssign;
  182. typedef SOMRReplicableObject*   SOMLINK somTP_SOMRReplicableObject_somDefaultConstVAssign(SOMRReplicableObject *somSelf, 
  183.         som3AssignCtrl* ctrl, 
  184.         SOMObject* fromObj);
  185. typedef somTP_SOMRReplicableObject_somDefaultConstVAssign *somTD_SOMRReplicableObject_somDefaultConstVAssign;
  186. typedef void   SOMLINK somTP_SOMRReplicableObject_somFree(SOMRReplicableObject *somSelf);
  187. typedef somTP_SOMRReplicableObject_somFree *somTD_SOMRReplicableObject_somFree;
  188. typedef SOMRReplicable*   SOMLINK somTP_SOMRReplicableObject_somGetClass(SOMRReplicableObject *somSelf);
  189. typedef somTP_SOMRReplicableObject_somGetClass *somTD_SOMRReplicableObject_somGetClass;
  190. typedef string   SOMLINK somTP_SOMRReplicableObject_somGetClassName(SOMRReplicableObject *somSelf);
  191. typedef somTP_SOMRReplicableObject_somGetClassName *somTD_SOMRReplicableObject_somGetClassName;
  192. typedef long   SOMLINK somTP_SOMRReplicableObject_somGetSize(SOMRReplicableObject *somSelf);
  193. typedef somTP_SOMRReplicableObject_somGetSize *somTD_SOMRReplicableObject_somGetSize;
  194. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somIsA(SOMRReplicableObject *somSelf, 
  195.         SOMClass* aClassObj);
  196. typedef somTP_SOMRReplicableObject_somIsA *somTD_SOMRReplicableObject_somIsA;
  197. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somIsInstanceOf(SOMRReplicableObject *somSelf, 
  198.         SOMClass* aClassObj);
  199. typedef somTP_SOMRReplicableObject_somIsInstanceOf *somTD_SOMRReplicableObject_somIsInstanceOf;
  200. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somRespondsTo(SOMRReplicableObject *somSelf, 
  201.         somId mId);
  202. typedef somTP_SOMRReplicableObject_somRespondsTo *somTD_SOMRReplicableObject_somRespondsTo;
  203. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somDispatch(SOMRReplicableObject *somSelf, 
  204.         somToken* retValue, 
  205.         somId methodId, 
  206.         va_list ap);
  207. typedef somTP_SOMRReplicableObject_somDispatch *somTD_SOMRReplicableObject_somDispatch;
  208. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somClassDispatch(SOMRReplicableObject *somSelf, 
  209.         SOMClass* clsObj, 
  210.         somToken* retValue, 
  211.         somId methodId, 
  212.         va_list ap);
  213. typedef somTP_SOMRReplicableObject_somClassDispatch *somTD_SOMRReplicableObject_somClassDispatch;
  214. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somCastObj(SOMRReplicableObject *somSelf, 
  215.         SOMClass* cls);
  216. typedef somTP_SOMRReplicableObject_somCastObj *somTD_SOMRReplicableObject_somCastObj;
  217. typedef boolean   SOMLINK somTP_SOMRReplicableObject_somResetObj(SOMRReplicableObject *somSelf);
  218. typedef somTP_SOMRReplicableObject_somResetObj *somTD_SOMRReplicableObject_somResetObj;
  219. typedef void   SOMLINK somTP_SOMRReplicableObject_somDispatchV(SOMRReplicableObject *somSelf, 
  220.         somId methodId, 
  221.         somId descriptor, 
  222.         va_list ap);
  223. typedef somTP_SOMRReplicableObject_somDispatchV *somTD_SOMRReplicableObject_somDispatchV;
  224. typedef long   SOMLINK somTP_SOMRReplicableObject_somDispatchL(SOMRReplicableObject *somSelf, 
  225.         somId methodId, 
  226.         somId descriptor, 
  227.         va_list ap);
  228. typedef somTP_SOMRReplicableObject_somDispatchL *somTD_SOMRReplicableObject_somDispatchL;
  229. typedef void*   SOMLINK somTP_SOMRReplicableObject_somDispatchA(SOMRReplicableObject *somSelf, 
  230.         somId methodId, 
  231.         somId descriptor, 
  232.         va_list ap);
  233. typedef somTP_SOMRReplicableObject_somDispatchA *somTD_SOMRReplicableObject_somDispatchA;
  234. typedef double   SOMLINK somTP_SOMRReplicableObject_somDispatchD(SOMRReplicableObject *somSelf, 
  235.         somId methodId, 
  236.         somId descriptor, 
  237.         va_list ap);
  238. typedef somTP_SOMRReplicableObject_somDispatchD *somTD_SOMRReplicableObject_somDispatchD;
  239. typedef SOMObject*   SOMLINK somTP_SOMRReplicableObject_somPrintSelf(SOMRReplicableObject *somSelf);
  240. typedef somTP_SOMRReplicableObject_somPrintSelf *somTD_SOMRReplicableObject_somPrintSelf;
  241. typedef void   SOMLINK somTP_SOMRReplicableObject_somDumpSelf(SOMRReplicableObject *somSelf, 
  242.         long level);
  243. typedef somTP_SOMRReplicableObject_somDumpSelf *somTD_SOMRReplicableObject_somDumpSelf;
  244. typedef void   SOMLINK somTP_SOMRReplicableObject_somDumpSelfInt(SOMRReplicableObject *somSelf, 
  245.         long level);
  246. typedef somTP_SOMRReplicableObject_somDumpSelfInt *somTD_SOMRReplicableObject_somDumpSelfInt;
  247. typedef void   SOMLINK somTP_SOMRReplicableObject_somrGetState(SOMRReplicableObject *somSelf, Environment *ev, 
  248.         string* buf);
  249. typedef somTP_SOMRReplicableObject_somrGetState *somTD_SOMRReplicableObject_somrGetState;
  250. typedef void   SOMLINK somTP_SOMRReplicableObject_somrSetState(SOMRReplicableObject *somSelf, Environment *ev, 
  251.         string buf);
  252. typedef somTP_SOMRReplicableObject_somrSetState *somTD_SOMRReplicableObject_somrSetState;
  253. }
  254.  
  255. #endif /* SOMRReplicableObject_API */
  256.  
  257.  
  258. /*
  259.  * -- This emitter treats Method Tokens as Thunks by default.
  260.  * -- Use the sc modifier "nothunks" to change this default
  261.  */
  262. #undef somresolve_
  263. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  264.  
  265. /*
  266.  * -- The C++ Wrapper Class for SOMRReplicableObject
  267.  */
  268. class SOMRReplicableObject : public SOMRReplicbl
  269. {
  270. public:
  271.  
  272. // SOMRReplicableObject::new creates the class object if necessary, and then uses somNewNoInit
  273. // to allocate memory and create the object. Initialization is in ctors.
  274. void *operator new(size_t)
  275. {
  276.    if (!_SOMRReplicableObject) SOMRReplicableObjectNewClass(SOMRReplicableObject_MajorVersion,SOMRReplicableObject_MinorVersion);
  277.    return (void*)
  278.       SOM_Resolve(_SOMRReplicableObject,SOMClass,somNewNoInit)
  279.          ((SOMClass *)((void*)_SOMRReplicableObject));
  280. }
  281.  
  282. // SOMRReplicableObject::delete uses somDestruct.
  283. void operator delete(void * obj)
  284. {
  285.    if (obj && *(void**)obj) {
  286.       SOM_Resolve(obj,SOMObject,somFree)
  287.          ((SOMObject*)obj);
  288.    }
  289. }
  290.  
  291. SOMRReplicableObject& operator=(SOMRReplicableObject& fromObj)
  292. {
  293.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  294.    return *this;
  295. }
  296.  
  297. SOMRReplicableObject()
  298. {
  299.    if (*(void**)this != 
  300.        ((somParentMtabStructPtr)
  301.         (SOMRReplicableObjectCClassData.parentMtab))->mtab)
  302.       return;
  303.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  304. }
  305.  
  306. SOMRReplicableObject(SOMRReplicableObject* fromObj)
  307. {
  308.    if (*(void**)this != 
  309.        ((somParentMtabStructPtr)
  310.         (SOMRReplicableObjectCClassData.parentMtab))->mtab)
  311.       return;
  312.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  313. }
  314.  
  315. #ifdef __IBMCPP__
  316. #pragma info(nocnv,nopar)
  317. #endif
  318. SOMRReplicableObject(const SOMRReplicableObject* fromObj)
  319. {
  320.    if (*(void**)this != 
  321.        ((somParentMtabStructPtr)
  322.         (SOMRReplicableObjectCClassData.parentMtab))->mtab)
  323.       return;
  324.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  325. }
  326. #ifdef __IBMCPP__
  327. #pragma info(restore)
  328. #endif
  329.  
  330.  
  331. /* method: somrLoggingType */
  332. char   somrLoggingType(Environment *ev)
  333. {
  334.    return SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicableObject,somrLoggingType)
  335.     (this, ev);
  336. }
  337.  
  338.  
  339. /* method: somrReplicableExemptMethod */
  340. boolean   somrReplicableExemptMethod(Environment *ev, 
  341.         somId methodId)
  342. {
  343.    return SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicableObject,somrReplicableExemptMethod)
  344.     (this, ev,methodId);
  345. }
  346.  
  347.  
  348. /*
  349.  * Reintroduce inherited methods
  350.  */
  351.  
  352. /* method: somrLock */
  353. void   somrLock(Environment *ev)
  354. {
  355. /*
  356.  *  Get a lock on this replica of the object. An exception is raised if the
  357.  *  lock is not obtained.
  358.  */
  359.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrLock)
  360.     (this, ev);
  361. }
  362.  
  363.  
  364. /* va_list method: somrLockNlogOp */
  365.  
  366. /*
  367.  *  Similar to somrLock, but it also logs the method (i.e., MthdName) that is
  368.  *  requesting the lock.
  369.  *  The va_list parameter is for specifying the actual arguments with which "MthdName" is
  370.  *  being called.
  371.  */
  372. /* the va_list invocation form */
  373. void   SOMRReplicableObject_somrLockNlogOp(Environment *ev, 
  374.         string ClassName, 
  375.         string MthdName, 
  376.         va_list ap)
  377. {   SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrLockNlogOp)
  378.     (this, ev,ClassName,MthdName,ap);
  379. }
  380.  
  381. /* the varargs invocation form */
  382. void   somrLockNlogOp(Environment *ev, 
  383.         string ClassName, 
  384.         string MthdName, 
  385.         ...)
  386. {
  387. /*
  388.  *  Similar to somrLock, but it also logs the method (i.e., MthdName) that is
  389.  *  requesting the lock.
  390.  *  The va_list parameter is for specifying the actual arguments with which "MthdName" is
  391.  *  being called.
  392.  */
  393.    va_list ap;
  394.    va_start(ap, MthdName);
  395.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrLockNlogOp)
  396.     (this, ev,ClassName,MthdName,ap);
  397.    va_end(ap);
  398. }
  399.  
  400.  
  401. /* method: somrReleaseNPropagateUpdate */
  402. void   somrReleaseNPropagateUpdate(Environment *ev, 
  403.         string clsname, 
  404.         string buf, 
  405.         long len, 
  406.         long intOid)
  407. {
  408. /*
  409.  *  Release the lock locally and propagate the local updates to master and or
  410.  *  other shadows by calling the local replica manager. This propagates
  411.  *  "value log" of state changes. The parameter intOid is used to indicate
  412.  *  a subobject id to which this update is to be applied. If there are no
  413.  *  subobjects, this argument is to be set to 0.
  414.  */
  415.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrReleaseNPropagateUpdate)
  416.     (this, ev,clsname,buf,len,intOid);
  417. }
  418.  
  419.  
  420. /* method: somrReleaseLockNAbortUpdate */
  421. void   somrReleaseLockNAbortUpdate(Environment *ev)
  422. {
  423. /*
  424.  *  Lets the data replication framework know that the user decided to abort
  425.  *  the operation he/she began by calling somrLock. Once a lock is
  426.  *  obtained, either this method or somrReleaseNPropagateUpdate must
  427.  *  be called.
  428.  */
  429.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrReleaseLockNAbortUpdate)
  430.     (this, ev);
  431. }
  432.  
  433.  
  434. /* method: somrReleaseNPropagateOperation */
  435. void   somrReleaseNPropagateOperation(Environment *ev)
  436. {
  437. /*
  438.  *  Similar to Propagate update, except now propagate the "operation log"
  439.  *  instead of the value log  prepared by the subclass implementation.
  440.  */
  441.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrReleaseNPropagateOperation)
  442.     (this, ev);
  443. }
  444.  
  445.  
  446. /* method: somrReleaseLockNAbortOp */
  447. void   somrReleaseLockNAbortOp(Environment *ev)
  448. {
  449. /*
  450.  *  Lets the data replication framework know that the user decided to abort
  451.  *  the operation that he/she began by calling somrLockNLogOp. Once a lock
  452.  *  is obtained, either this method or somrReleaseNPropagateOperation must
  453.  *  be called
  454.  */
  455.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrReleaseLockNAbortOp)
  456.     (this, ev);
  457. }
  458.  
  459.  
  460. /* method: somrRepInit */
  461. long   somrRepInit(Environment *ev, 
  462.         char lType, 
  463.         char mode)
  464. {
  465. /*
  466.  *  Makes the object ready for replication. A derived object
  467.  *  MUST call this method for activating replica control.  The parameter
  468.  *  lType indicates the type of logging used: 'v' for value logging and 'o'
  469.  *  for operation logging.  The parameter mode indicates whether the
  470.  *  object is opened for reading("r") or writing ("w").
  471.  * 
  472.  *  If no errors occur, a return value of 1 indicates that this is the first
  473.  *  replica to be activated (i.e., the Master), and 0 indicates it is a shadow.
  474.  * 
  475.  *  If an error occurs, an exception is raised, and the return value is
  476.  *  indeterminate (and should be ignored).
  477.  * 
  478.  *  If the object is already initialized, no action is taken, and a return
  479.  *  code of 0 is returned.
  480.  */
  481.    return SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrRepInit)
  482.     (this, ev,lType,mode);
  483. }
  484.  
  485.  
  486. /* method: somrRepUninit */
  487. void   somrRepUninit(Environment *ev)
  488. {
  489. /*
  490.  *  Destroys the set up for replication.
  491.  *  If the object is not initialized for replication, no action is taken.
  492.  */
  493.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrRepUninit)
  494.     (this, ev);
  495. }
  496.  
  497.  
  498. /* method: somrApplyUpdates */
  499. void   somrApplyUpdates(Environment *ev, 
  500.         string buf, 
  501.         long len, 
  502.         long ObjIntId)
  503. {
  504. /*
  505.  *  This method interprets the buffer received as an update to its state.
  506.  *  The format of this update is exactly the same as the one used by the
  507.  *  subclass implementor for the update buffer passed to ReleaseNPropagateUpdate
  508.  *  method. The ObjIntId parameter indicates the internal subobject id to which
  509.  *  this update should be applied. If it is 0, then the update is to be applied
  510.  *  to self.
  511.  */
  512.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrApplyUpdates)
  513.     (this, ev,buf,len,ObjIntId);
  514. }
  515.  
  516.  
  517. /* method: somrDoDirective */
  518. void   somrDoDirective(Environment *ev, 
  519.         string str)
  520. {
  521. /*
  522.  *  The string gives a directive to the object to implement. The directive usually
  523.  *  indications a condition that warrants user intervention/awareness.
  524.  */
  525.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrDoDirective)
  526.     (this, ev,str);
  527. }
  528.  
  529.  
  530. /* method: somrPin */
  531. void   somrPin(Environment *ev)
  532. {
  533. /*
  534.  *  Makes the replica lock obtained by this replica stay with it until a call
  535.  *  to UnPin is made.  That is, it makes the replica lock un-preemptible.
  536.  *  Raises an Exception if the lock is denied (SOMR_DENIED).
  537.  */
  538.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrPin)
  539.     (this, ev);
  540. }
  541.  
  542.  
  543. /* method: somrUnPin */
  544. void   somrUnPin(Environment *ev)
  545. {
  546. /*
  547.  *  Declares the replica lock preemptible. That is, other shadows can grab the
  548.  *  replica lock from this shadow.
  549.  */
  550.    SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrUnPin)
  551.     (this, ev);
  552. }
  553.  
  554.  
  555. /* method: somrGetSecurityPolicy */
  556. long   somrGetSecurityPolicy(Environment *ev)
  557. {
  558. /*
  559.  *   Returns the security policy for replicated objects that are either
  560.  *   non-persistent or persistent but haven't been created yet.
  561.  *   Caveat: Meaningful only on AIX. Ignored for OS/2.
  562.  */
  563.    return SOM_ResolveD(this,SOMRReplicableObject,SOMRReplicbl,somrGetSecurityPolicy)
  564.     (this, ev);
  565. }
  566.  
  567.  
  568. /* method: somInit */
  569. void   somInit()
  570. {
  571.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somInit)
  572.     (this);
  573. }
  574.  
  575.  
  576. /* method: somUninit */
  577. void   somUninit()
  578. {
  579.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somUninit)
  580.     (this);
  581. }
  582.  
  583.  
  584. /* method: somrSetObjName */
  585. void   somrSetObjName(Environment *ev, 
  586.         string name)
  587. {
  588.    SOM_ResolveD(this,SOMRReplicableObject,SOMRNameable,somrSetObjName)
  589.     (this, ev,name);
  590. }
  591.  
  592.  
  593. /* method: somrGetObjName */
  594. string   somrGetObjName(Environment *ev)
  595. {
  596. /*
  597.  *  Returns a pointer to the name string.
  598.  *           The OWNERSHIP of the string stays with this object.
  599.  */
  600.    return SOM_ResolveD(this,SOMRReplicableObject,SOMRNameable,somrGetObjName)
  601.     (this, ev);
  602. }
  603.  
  604.  
  605. /* initializer method: somDefaultInit */
  606. void   somDefaultInit(som3InitCtrl* ctrl)
  607. {
  608. /*
  609.  *  A default initializer for a SOM object. Passing a null ctrl
  610.  *  indicates to the receiver that its class is the class of the
  611.  *  object being initialized, whereby the initializer will determine
  612.  *  an appropriate control structure.
  613.  */
  614.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultInit)
  615.     (this,ctrl);
  616. }
  617.  
  618.  
  619. /* method: somDestruct */
  620. void   somDestruct(octet doFree, 
  621.         som3DestructCtrl* ctrl)
  622. {
  623. /*
  624.  *  The default destructor for a SOM object. A nonzero <doFree>
  625.  *  indicates that the object storage should be freed by the
  626.  *  object's class (via somDeallocate) after uninitialization.
  627.  *  As with somDefaultInit, a null ctrl can be passed.
  628.  */
  629.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDestruct)
  630.     (this,doFree,ctrl);
  631. }
  632.  
  633.  
  634. /* initializer method: somDefaultCopyInit */
  635. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  636.         SOMObject* fromObj)
  637. {
  638. /*
  639.  *  A default copy constructor. Use this to make copies of objects for
  640.  *  calling methods with "by-value" argument semantics.
  641.  */
  642.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultCopyInit)
  643.     (this,ctrl,fromObj);
  644. }
  645.  
  646.  
  647. /* method: somDefaultAssign */
  648. SOMRReplicableObject*  somDefaultAssign(som3AssignCtrl* ctrl, 
  649.         SOMObject* fromObj)
  650. {
  651. /*
  652.  *  A default assignment operator. Use this to "assign" the state of one
  653.  *  object to another.
  654.  */
  655.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultAssign)
  656.     (this,ctrl,fromObj);
  657. }
  658.  
  659.  
  660. /* initializer method: somDefaultConstCopyInit */
  661. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  662.         SOMObject* fromObj)
  663. {
  664. /*
  665.  *  A default copy constructor that uses a const fromObj.
  666.  */
  667.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultConstCopyInit)
  668.     (this,ctrl,fromObj);
  669. }
  670.  
  671.  
  672. /* initializer method: somDefaultVCopyInit */
  673. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  674.         SOMObject* fromObj)
  675. {
  676. /*
  677.  *  A default copy constructor that uses a volatile fromObj.
  678.  */
  679.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultVCopyInit)
  680.     (this,ctrl,fromObj);
  681. }
  682.  
  683.  
  684. /* initializer method: somDefaultConstVCopyInit */
  685. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  686.         SOMObject* fromObj)
  687. {
  688. /*
  689.  *  A default copy constructor that uses a const volatile fromObj.
  690.  */
  691.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultConstVCopyInit)
  692.     (this,ctrl,fromObj);
  693. }
  694.  
  695.  
  696. /* method: somDefaultConstAssign */
  697. SOMRReplicableObject*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  698.         SOMObject* fromObj)
  699. {
  700. /*
  701.  *  A default assignment operator that uses a const fromObj.
  702.  */
  703.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultConstAssign)
  704.     (this,ctrl,fromObj);
  705. }
  706.  
  707.  
  708. /* method: somDefaultVAssign */
  709. SOMRReplicableObject*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  710.         SOMObject* fromObj)
  711. {
  712. /*
  713.  *  A default assignment operator that uses a volatile fromObj.
  714.  */
  715.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultVAssign)
  716.     (this,ctrl,fromObj);
  717. }
  718.  
  719.  
  720. /* method: somDefaultConstVAssign */
  721. SOMRReplicableObject*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  722.         SOMObject* fromObj)
  723. {
  724. /*
  725.  *  A default assignment operator that uses a const volatile fromObj.
  726.  */
  727.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDefaultConstVAssign)
  728.     (this,ctrl,fromObj);
  729. }
  730.  
  731.  
  732. /* method: somFree */
  733. void   somFree()
  734. {
  735. /*
  736.  *  Use as directed by framework implementations.
  737.  */
  738.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somFree)
  739.     (this);
  740. }
  741.  
  742.  
  743. /* method: somGetClass */
  744. SOMRReplicable*  somGetClass()
  745. {
  746. /*
  747.  *  Return the receiver's class.
  748.  */
  749.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somGetClass)
  750.     (this);
  751. }
  752.  
  753.  
  754. /* method: somGetClassName */
  755. string   somGetClassName()
  756. {
  757. /*
  758.  *  Return the name of the receiver's class.
  759.  */
  760.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somGetClassName)
  761.     (this);
  762. }
  763.  
  764.  
  765. /* method: somGetSize */
  766. long   somGetSize()
  767. {
  768. /*
  769.  *  Return the size of the receiver.
  770.  */
  771.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somGetSize)
  772.     (this);
  773. }
  774.  
  775.  
  776. /* method: somIsA */
  777. boolean   somIsA(SOMClass* aClassObj)
  778. {
  779. /*
  780.  *  Returns 1 (true) if the receiver responds to methods
  781.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  782.  */
  783.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somIsA)
  784.     (this,aClassObj);
  785. }
  786.  
  787.  
  788. /* method: somIsInstanceOf */
  789. boolean   somIsInstanceOf(SOMClass* aClassObj)
  790. {
  791. /*
  792.  *  Returns 1 (true) if the receiver is an instance of
  793.  *  <aClassObj> and 0 (false) otherwise.
  794.  */
  795.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somIsInstanceOf)
  796.     (this,aClassObj);
  797. }
  798.  
  799.  
  800. /* method: somRespondsTo */
  801. boolean   somRespondsTo(somId mId)
  802. {
  803. /*
  804.  *  Returns 1 (true) if the indicated method can be invoked
  805.  *  on the receiver and 0 (false) otherwise.
  806.  */
  807.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somRespondsTo)
  808.     (this,mId);
  809. }
  810.  
  811.  
  812. /* va_list method: somDispatch */
  813.  
  814. /*
  815.  *  This method provides a generic, class-specific dispatch mechanism.
  816.  *  It accepts as input <retValue> a pointer to the memory area to be
  817.  *  loaded with the result of dispatching the method indicated by
  818.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  819.  *  on which the method is to be invoked as the first argument.
  820.  */
  821. /* the va_list invocation form */
  822. boolean   SOMRReplicableObject_somDispatch(somToken* retValue, 
  823.         somId methodId, 
  824.         va_list ap)
  825. {return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatch)
  826.     (this,retValue,methodId,ap);
  827. }
  828.  
  829. /* the varargs invocation form */
  830. boolean   somDispatch(somToken* retValue, 
  831.         somId methodId, 
  832.         ...)
  833. {
  834. /*
  835.  *  This method provides a generic, class-specific dispatch mechanism.
  836.  *  It accepts as input <retValue> a pointer to the memory area to be
  837.  *  loaded with the result of dispatching the method indicated by
  838.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  839.  *  on which the method is to be invoked as the first argument.
  840.  */
  841.    va_list ap;
  842.    va_start(ap, methodId);
  843.    boolean __somResult = 
  844.       SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatch)
  845.     (this,retValue,methodId,ap);
  846.    va_end(ap);
  847.    return __somResult;
  848. }
  849.  
  850.  
  851. /* va_list method: somClassDispatch */
  852.  
  853. /*
  854.  *  Like somDispatch, but method resolution for static methods is done
  855.  *  according to the clsObj instance method table.
  856.  */
  857. /* the va_list invocation form */
  858. boolean   SOMRReplicableObject_somClassDispatch(SOMClass* clsObj, 
  859.         somToken* retValue, 
  860.         somId methodId, 
  861.         va_list ap)
  862. {return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somClassDispatch)
  863.     (this,clsObj,retValue,methodId,ap);
  864. }
  865.  
  866. /* the varargs invocation form */
  867. boolean   somClassDispatch(SOMClass* clsObj, 
  868.         somToken* retValue, 
  869.         somId methodId, 
  870.         ...)
  871. {
  872. /*
  873.  *  Like somDispatch, but method resolution for static methods is done
  874.  *  according to the clsObj instance method table.
  875.  */
  876.    va_list ap;
  877.    va_start(ap, methodId);
  878.    boolean __somResult = 
  879.       SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somClassDispatch)
  880.     (this,clsObj,retValue,methodId,ap);
  881.    va_end(ap);
  882.    return __somResult;
  883. }
  884.  
  885.  
  886. /* method: somCastObj */
  887. boolean   somCastObj(SOMClass* cls)
  888. {
  889. /*
  890.  *  cast the receiving object to cls (which must be an ancestor of the
  891.  *  objects true class. Returns true on success.
  892.  */
  893.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somCastObj)
  894.     (this,cls);
  895. }
  896.  
  897.  
  898. /* method: somResetObj */
  899. boolean   somResetObj()
  900. {
  901. /*
  902.  *  reset an object to its true class. Returns true always.
  903.  */
  904.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somResetObj)
  905.     (this);
  906. }
  907.  
  908.  
  909. /* va_list method: somDispatchV */
  910.  
  911. /*
  912.  *  Obsolete. Use somDispatch instead.
  913.  */
  914. /* the va_list invocation form */
  915. void   SOMRReplicableObject_somDispatchV(somId methodId, 
  916.         somId descriptor, 
  917.         va_list ap)
  918. {   SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchV)
  919.     (this,methodId,descriptor,ap);
  920. }
  921.  
  922. /* the varargs invocation form */
  923. void   somDispatchV(somId methodId, 
  924.         somId descriptor, 
  925.         ...)
  926. {
  927. /*
  928.  *  Obsolete. Use somDispatch instead.
  929.  */
  930.    va_list ap;
  931.    va_start(ap, descriptor);
  932.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchV)
  933.     (this,methodId,descriptor,ap);
  934.    va_end(ap);
  935. }
  936.  
  937.  
  938. /* va_list method: somDispatchL */
  939.  
  940. /*
  941.  *  Obsolete. Use somDispatch instead.
  942.  */
  943. /* the va_list invocation form */
  944. long   SOMRReplicableObject_somDispatchL(somId methodId, 
  945.         somId descriptor, 
  946.         va_list ap)
  947. {return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchL)
  948.     (this,methodId,descriptor,ap);
  949. }
  950.  
  951. /* the varargs invocation form */
  952. long   somDispatchL(somId methodId, 
  953.         somId descriptor, 
  954.         ...)
  955. {
  956. /*
  957.  *  Obsolete. Use somDispatch instead.
  958.  */
  959.    va_list ap;
  960.    va_start(ap, descriptor);
  961.    long __somResult = 
  962.       SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchL)
  963.     (this,methodId,descriptor,ap);
  964.    va_end(ap);
  965.    return __somResult;
  966. }
  967.  
  968.  
  969. /* va_list method: somDispatchA */
  970.  
  971. /*
  972.  *  Obsolete. Use somDispatch instead.
  973.  */
  974. /* the va_list invocation form */
  975. void*   SOMRReplicableObject_somDispatchA(somId methodId, 
  976.         somId descriptor, 
  977.         va_list ap)
  978. {return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchA)
  979.     (this,methodId,descriptor,ap);
  980. }
  981.  
  982. /* the varargs invocation form */
  983. void*   somDispatchA(somId methodId, 
  984.         somId descriptor, 
  985.         ...)
  986. {
  987. /*
  988.  *  Obsolete. Use somDispatch instead.
  989.  */
  990.    va_list ap;
  991.    va_start(ap, descriptor);
  992.    void* __somResult = 
  993.       SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchA)
  994.     (this,methodId,descriptor,ap);
  995.    va_end(ap);
  996.    return __somResult;
  997. }
  998.  
  999.  
  1000. /* va_list method: somDispatchD */
  1001.  
  1002. /*
  1003.  *  Obsolete. Use somDispatch instead.
  1004.  */
  1005. /* the va_list invocation form */
  1006. double   SOMRReplicableObject_somDispatchD(somId methodId, 
  1007.         somId descriptor, 
  1008.         va_list ap)
  1009. {return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchD)
  1010.     (this,methodId,descriptor,ap);
  1011. }
  1012.  
  1013. /* the varargs invocation form */
  1014. double   somDispatchD(somId methodId, 
  1015.         somId descriptor, 
  1016.         ...)
  1017. {
  1018. /*
  1019.  *  Obsolete. Use somDispatch instead.
  1020.  */
  1021.    va_list ap;
  1022.    va_start(ap, descriptor);
  1023.    double __somResult = 
  1024.       SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDispatchD)
  1025.     (this,methodId,descriptor,ap);
  1026.    va_end(ap);
  1027.    return __somResult;
  1028. }
  1029.  
  1030.  
  1031. /* method: somPrintSelf */
  1032. SOMObject*   somPrintSelf()
  1033. {
  1034. /*
  1035.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  1036.  *  information about this object.  The default implementation just gives
  1037.  *  the object's class name and its address in memory.
  1038.  *  <self> is returned.
  1039.  */
  1040.    return SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somPrintSelf)
  1041.     (this);
  1042. }
  1043.  
  1044.  
  1045. /* method: somDumpSelf */
  1046. void   somDumpSelf(long level)
  1047. {
  1048. /*
  1049.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  1050.  *  and its current state.
  1051.  * 
  1052.  *  <level> indicates the nesting level for describing compound objects
  1053.  *  it must be greater than or equal to zero.  All lines in the
  1054.  *  description will be preceeded by <2*level> spaces.
  1055.  * 
  1056.  *  This routine only actually writes the data that concerns the object
  1057.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  1058.  *  the object's current state.  This approach allows readable
  1059.  *  descriptions of compound objects to be constructed.
  1060.  * 
  1061.  *  Generally it is not necessary to override this method, if it is
  1062.  *  overriden it generally must be completely replaced.
  1063.  */
  1064.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDumpSelf)
  1065.     (this,level);
  1066. }
  1067.  
  1068.  
  1069. /* method: somDumpSelfInt */
  1070. void   somDumpSelfInt(long level)
  1071. {
  1072. /*
  1073.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  1074.  *  Generally this method will need to be overridden.  When overriding
  1075.  *  it, begin by calling the parent class form of this method and then
  1076.  *  write in a description of your class's instance data. This will
  1077.  *  result in a description of all the object's instance data going
  1078.  *  from its root ancestor class to its specific class.
  1079.  */
  1080.    SOM_ResolveD(this,SOMRReplicableObject,SOMObject,somDumpSelfInt)
  1081.     (this,level);
  1082. }
  1083.  
  1084.  
  1085. /* method: somrGetState */
  1086. void   somrGetState(Environment *ev, 
  1087.         string* buf)
  1088. {
  1089. /*
  1090.  *  Converts its internal state into a linear string and returns a
  1091.  *  pointer to the string (the length of the string is in the
  1092.  *  first sizeof(int) bytes of this string).   The implementer of this
  1093.  *  method should allocate the necessary memory for the string.
  1094.  *  The OWNERSHIP of this string is transferred to the caller of this method.
  1095.  */
  1096.    SOM_ResolveD(this,SOMRReplicableObject,SOMRLinearizable,somrGetState)
  1097.     (this, ev,buf);
  1098. }
  1099.  
  1100.  
  1101. /* method: somrSetState */
  1102. void   somrSetState(Environment *ev, 
  1103.         string buf)
  1104. {
  1105. /*
  1106.  *  The reverse of Get State. It converts the given linear string into
  1107.  *  its internal state.  The ownership of buf stays with the caller.
  1108.  */
  1109.    SOM_ResolveD(this,SOMRReplicableObject,SOMRLinearizable,somrSetState)
  1110.     (this, ev,buf);
  1111. }
  1112.  
  1113.  
  1114.  
  1115. };   /* SOMRReplicableObject */
  1116.  
  1117.  
  1118.  
  1119. #endif       /* SOM_SOMRReplicableObject_xh */
  1120.