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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: eda.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emitxh: 2.47
  8.  */
  9.  
  10. /*
  11.  *    COMPONENT_NAME: somp
  12.  * 
  13.  *    ORIGINS: 27
  14.  * 
  15.  * 
  16.  *     25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996
  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_SOMPEncoderDecoderAbstract_xh
  26. #define SOM_SOMPEncoderDecoderAbstract_xh
  27.  
  28. class SOMPEncoderDecoderAbstract;
  29.  
  30. /*
  31.  *  This is the abstract class for an EncoderDecoder.
  32.  * 
  33.  *  An encoder/decoder is an object which is paired with a persistent object
  34.  *  and handles the reading/writing of that persistent object's instance
  35.  *  data.  A class derived from this abstract class must be created and
  36.  *  paired with a persistent object in order for that persistent object
  37.  *  to be save/restored.
  38.  * 
  39.  *  The derived encoder/decoder class name is bound to a persistent
  40.  *  object with the sompSetEncoderDecoderName method (see po.sc).
  41.  * 
  42.  *  A persistent object's encoder/decoder is instantiated by an
  43.  *  IO Group Mgr at the moment that object is save/restored.
  44.  */
  45.  
  46. #define SOMPEncoderDecoderAbstract_MajorVersion 2
  47. #define SOMPEncoderDecoderAbstract_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. #ifndef SOMPEncoderDecoderAbstract_API
  59. #define SOMPEncoderDecoderAbstract_API
  60. /*
  61.  * -- The Class API
  62.  */
  63.  
  64. /*
  65.  * Start of bindings for IDL types
  66.  */
  67.  
  68. class SOMClass;
  69. class SOMObject;
  70. class SOMPMediaInterfaceAbstract;
  71. class SOMPPersistentObject;
  72.  
  73. /*
  74.  * End of bindings for IDL types.
  75.  */
  76.  
  77. /* A procedure to create the SOMPEncoderDecoderAbstract Class */
  78. SOMEXTERN SOMClass * SOMLINK SOMPEncoderDecoderAbstractNewClass(
  79.         integer4 majorVersion,
  80.         integer4 minorVersion);
  81.  
  82. /* The API to the SOMPEncoderDecoderAbstract class object, and the methods it introduces. */
  83. SOMEXTERN struct SOMPEncoderDecoderAbstractClassDataStructure {
  84.     SOMClass *classObject;
  85.     somMToken sompEDWrite;
  86.     somMToken sompEDRead;
  87. } SOMDLINK SOMPEncoderDecoderAbstractClassData;
  88. #define _SOMPEncoderDecoderAbstract SOMPEncoderDecoderAbstractClassData.classObject
  89.  
  90. /* The API to parentMtabs for SOMPEncoderDecoderAbstract, and the instance data it introduces. */
  91. SOMEXTERN struct SOMPEncoderDecoderAbstractCClassDataStructure {
  92.     somMethodTabs parentMtab;
  93.     somDToken              instanceDataToken;
  94. } SOMDLINK SOMPEncoderDecoderAbstractCClassData;
  95.  
  96. /*
  97.  * -- Typedefs for SOMPEncoderDecoderAbstract Method Procedures
  98.  */
  99. SOMEXTERN {
  100. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_sompEDWrite(SOMPEncoderDecoderAbstract *somSelf, Environment *ev, 
  101.         SOMPMediaInterfaceAbstract* thisMedia, 
  102.         SOMPPersistentObject* thisObject);
  103. typedef somTP_SOMPEncoderDecoderAbstract_sompEDWrite *somTD_SOMPEncoderDecoderAbstract_sompEDWrite;
  104. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_sompEDRead(SOMPEncoderDecoderAbstract *somSelf, Environment *ev, 
  105.         SOMPMediaInterfaceAbstract* thisMedia, 
  106.         SOMPPersistentObject* thisObject);
  107. typedef somTP_SOMPEncoderDecoderAbstract_sompEDRead *somTD_SOMPEncoderDecoderAbstract_sompEDRead;
  108.  
  109. /*
  110.  * -- Typedefs for Reintroduced Wrapper Methods
  111.  */
  112. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultInit(SOMPEncoderDecoderAbstract *somSelf, 
  113.         som3InitCtrl* ctrl);
  114. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultInit *somTD_SOMPEncoderDecoderAbstract_somDefaultInit;
  115. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDestruct(SOMPEncoderDecoderAbstract *somSelf, 
  116.         octet doFree, 
  117.         som3DestructCtrl* ctrl);
  118. typedef somTP_SOMPEncoderDecoderAbstract_somDestruct *somTD_SOMPEncoderDecoderAbstract_somDestruct;
  119. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultCopyInit(SOMPEncoderDecoderAbstract *somSelf, 
  120.         som3InitCtrl* ctrl, 
  121.         SOMObject* fromObj);
  122. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultCopyInit *somTD_SOMPEncoderDecoderAbstract_somDefaultCopyInit;
  123. typedef SOMPEncoderDecoderAbstract*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultAssign(SOMPEncoderDecoderAbstract *somSelf, 
  124.         som3AssignCtrl* ctrl, 
  125.         SOMObject* fromObj);
  126. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultAssign *somTD_SOMPEncoderDecoderAbstract_somDefaultAssign;
  127. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultConstCopyInit(SOMPEncoderDecoderAbstract *somSelf, 
  128.         som3InitCtrl* ctrl, 
  129.         SOMObject* fromObj);
  130. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultConstCopyInit *somTD_SOMPEncoderDecoderAbstract_somDefaultConstCopyInit;
  131. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultVCopyInit(SOMPEncoderDecoderAbstract *somSelf, 
  132.         som3InitCtrl* ctrl, 
  133.         SOMObject* fromObj);
  134. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultVCopyInit *somTD_SOMPEncoderDecoderAbstract_somDefaultVCopyInit;
  135. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultConstVCopyInit(SOMPEncoderDecoderAbstract *somSelf, 
  136.         som3InitCtrl* ctrl, 
  137.         SOMObject* fromObj);
  138. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultConstVCopyInit *somTD_SOMPEncoderDecoderAbstract_somDefaultConstVCopyInit;
  139. typedef SOMPEncoderDecoderAbstract*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultConstAssign(SOMPEncoderDecoderAbstract *somSelf, 
  140.         som3AssignCtrl* ctrl, 
  141.         SOMObject* fromObj);
  142. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultConstAssign *somTD_SOMPEncoderDecoderAbstract_somDefaultConstAssign;
  143. typedef SOMPEncoderDecoderAbstract*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultVAssign(SOMPEncoderDecoderAbstract *somSelf, 
  144.         som3AssignCtrl* ctrl, 
  145.         SOMObject* fromObj);
  146. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultVAssign *somTD_SOMPEncoderDecoderAbstract_somDefaultVAssign;
  147. typedef SOMPEncoderDecoderAbstract*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDefaultConstVAssign(SOMPEncoderDecoderAbstract *somSelf, 
  148.         som3AssignCtrl* ctrl, 
  149.         SOMObject* fromObj);
  150. typedef somTP_SOMPEncoderDecoderAbstract_somDefaultConstVAssign *somTD_SOMPEncoderDecoderAbstract_somDefaultConstVAssign;
  151. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somInit(SOMPEncoderDecoderAbstract *somSelf);
  152. typedef somTP_SOMPEncoderDecoderAbstract_somInit *somTD_SOMPEncoderDecoderAbstract_somInit;
  153. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somFree(SOMPEncoderDecoderAbstract *somSelf);
  154. typedef somTP_SOMPEncoderDecoderAbstract_somFree *somTD_SOMPEncoderDecoderAbstract_somFree;
  155. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somUninit(SOMPEncoderDecoderAbstract *somSelf);
  156. typedef somTP_SOMPEncoderDecoderAbstract_somUninit *somTD_SOMPEncoderDecoderAbstract_somUninit;
  157. typedef SOMClass*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somGetClass(SOMPEncoderDecoderAbstract *somSelf);
  158. typedef somTP_SOMPEncoderDecoderAbstract_somGetClass *somTD_SOMPEncoderDecoderAbstract_somGetClass;
  159. typedef string   SOMLINK somTP_SOMPEncoderDecoderAbstract_somGetClassName(SOMPEncoderDecoderAbstract *somSelf);
  160. typedef somTP_SOMPEncoderDecoderAbstract_somGetClassName *somTD_SOMPEncoderDecoderAbstract_somGetClassName;
  161. typedef long   SOMLINK somTP_SOMPEncoderDecoderAbstract_somGetSize(SOMPEncoderDecoderAbstract *somSelf);
  162. typedef somTP_SOMPEncoderDecoderAbstract_somGetSize *somTD_SOMPEncoderDecoderAbstract_somGetSize;
  163. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somIsA(SOMPEncoderDecoderAbstract *somSelf, 
  164.         SOMClass* aClassObj);
  165. typedef somTP_SOMPEncoderDecoderAbstract_somIsA *somTD_SOMPEncoderDecoderAbstract_somIsA;
  166. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somIsInstanceOf(SOMPEncoderDecoderAbstract *somSelf, 
  167.         SOMClass* aClassObj);
  168. typedef somTP_SOMPEncoderDecoderAbstract_somIsInstanceOf *somTD_SOMPEncoderDecoderAbstract_somIsInstanceOf;
  169. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somRespondsTo(SOMPEncoderDecoderAbstract *somSelf, 
  170.         somId mId);
  171. typedef somTP_SOMPEncoderDecoderAbstract_somRespondsTo *somTD_SOMPEncoderDecoderAbstract_somRespondsTo;
  172. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDispatch(SOMPEncoderDecoderAbstract *somSelf, 
  173.         somToken* retValue, 
  174.         somId methodId, 
  175.         va_list ap);
  176. typedef somTP_SOMPEncoderDecoderAbstract_somDispatch *somTD_SOMPEncoderDecoderAbstract_somDispatch;
  177. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somClassDispatch(SOMPEncoderDecoderAbstract *somSelf, 
  178.         SOMClass* clsObj, 
  179.         somToken* retValue, 
  180.         somId methodId, 
  181.         va_list ap);
  182. typedef somTP_SOMPEncoderDecoderAbstract_somClassDispatch *somTD_SOMPEncoderDecoderAbstract_somClassDispatch;
  183. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somCastObj(SOMPEncoderDecoderAbstract *somSelf, 
  184.         SOMClass* cls);
  185. typedef somTP_SOMPEncoderDecoderAbstract_somCastObj *somTD_SOMPEncoderDecoderAbstract_somCastObj;
  186. typedef boolean   SOMLINK somTP_SOMPEncoderDecoderAbstract_somResetObj(SOMPEncoderDecoderAbstract *somSelf);
  187. typedef somTP_SOMPEncoderDecoderAbstract_somResetObj *somTD_SOMPEncoderDecoderAbstract_somResetObj;
  188. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDispatchV(SOMPEncoderDecoderAbstract *somSelf, 
  189.         somId methodId, 
  190.         somId descriptor, 
  191.         va_list ap);
  192. typedef somTP_SOMPEncoderDecoderAbstract_somDispatchV *somTD_SOMPEncoderDecoderAbstract_somDispatchV;
  193. typedef long   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDispatchL(SOMPEncoderDecoderAbstract *somSelf, 
  194.         somId methodId, 
  195.         somId descriptor, 
  196.         va_list ap);
  197. typedef somTP_SOMPEncoderDecoderAbstract_somDispatchL *somTD_SOMPEncoderDecoderAbstract_somDispatchL;
  198. typedef void*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDispatchA(SOMPEncoderDecoderAbstract *somSelf, 
  199.         somId methodId, 
  200.         somId descriptor, 
  201.         va_list ap);
  202. typedef somTP_SOMPEncoderDecoderAbstract_somDispatchA *somTD_SOMPEncoderDecoderAbstract_somDispatchA;
  203. typedef double   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDispatchD(SOMPEncoderDecoderAbstract *somSelf, 
  204.         somId methodId, 
  205.         somId descriptor, 
  206.         va_list ap);
  207. typedef somTP_SOMPEncoderDecoderAbstract_somDispatchD *somTD_SOMPEncoderDecoderAbstract_somDispatchD;
  208. typedef SOMObject*   SOMLINK somTP_SOMPEncoderDecoderAbstract_somPrintSelf(SOMPEncoderDecoderAbstract *somSelf);
  209. typedef somTP_SOMPEncoderDecoderAbstract_somPrintSelf *somTD_SOMPEncoderDecoderAbstract_somPrintSelf;
  210. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDumpSelf(SOMPEncoderDecoderAbstract *somSelf, 
  211.         long level);
  212. typedef somTP_SOMPEncoderDecoderAbstract_somDumpSelf *somTD_SOMPEncoderDecoderAbstract_somDumpSelf;
  213. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_somDumpSelfInt(SOMPEncoderDecoderAbstract *somSelf, 
  214.         long level);
  215. typedef somTP_SOMPEncoderDecoderAbstract_somDumpSelfInt *somTD_SOMPEncoderDecoderAbstract_somDumpSelfInt;
  216. }
  217.  
  218. #endif /* SOMPEncoderDecoderAbstract_API */
  219.  
  220.  
  221. /*
  222.  * -- This emitter treats Method Tokens as Thunks by default.
  223.  * -- Use the sc modifier "nothunks" to change this default
  224.  */
  225. #undef somresolve_
  226. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  227.  
  228. /*
  229.  * -- The C++ Wrapper Class for SOMPEncoderDecoderAbstract
  230.  */
  231. class SOMPEncoderDecoderAbstract : public SOMObject
  232. {
  233. /*
  234.  *  This is the abstract class for an EncoderDecoder.
  235.  * 
  236.  *  An encoder/decoder is an object which is paired with a persistent object
  237.  *  and handles the reading/writing of that persistent object's instance
  238.  *  data.  A class derived from this abstract class must be created and
  239.  *  paired with a persistent object in order for that persistent object
  240.  *  to be save/restored.
  241.  * 
  242.  *  The derived encoder/decoder class name is bound to a persistent
  243.  *  object with the sompSetEncoderDecoderName method (see po.sc).
  244.  * 
  245.  *  A persistent object's encoder/decoder is instantiated by an
  246.  *  IO Group Mgr at the moment that object is save/restored.
  247.  */
  248. public:
  249.  
  250. // SOMPEncoderDecoderAbstract::new creates the class object if necessary, and then uses somNewNoInit
  251. // to allocate memory and create the object. Initialization is in ctors.
  252. void *operator new(size_t)
  253. {
  254.    if (!_SOMPEncoderDecoderAbstract) SOMPEncoderDecoderAbstractNewClass(SOMPEncoderDecoderAbstract_MajorVersion,SOMPEncoderDecoderAbstract_MinorVersion);
  255.    return (void*)
  256.       SOM_Resolve(_SOMPEncoderDecoderAbstract,SOMClass,somNewNoInit)
  257.          ((SOMClass *)((void*)_SOMPEncoderDecoderAbstract));
  258. }
  259.  
  260. // SOMPEncoderDecoderAbstract::delete uses somDestruct.
  261. void operator delete(void * obj)
  262. {
  263.    if (obj && *(void**)obj) {
  264.       SOM_Resolve(obj,SOMObject,somFree)
  265.          ((SOMObject*)obj);
  266.    }
  267. }
  268.  
  269. SOMPEncoderDecoderAbstract& operator=(SOMPEncoderDecoderAbstract& fromObj)
  270. {
  271.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  272.    return *this;
  273. }
  274.  
  275. SOMPEncoderDecoderAbstract()
  276. {
  277.    if (*(void**)this != 
  278.        ((somParentMtabStructPtr)
  279.         (SOMPEncoderDecoderAbstractCClassData.parentMtab))->mtab)
  280.       return;
  281.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  282. }
  283.  
  284. SOMPEncoderDecoderAbstract(SOMPEncoderDecoderAbstract* fromObj)
  285. {
  286.    if (*(void**)this != 
  287.        ((somParentMtabStructPtr)
  288.         (SOMPEncoderDecoderAbstractCClassData.parentMtab))->mtab)
  289.       return;
  290.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  291. }
  292.  
  293. #ifdef __IBMCPP__
  294. #pragma info(nocnv,nopar)
  295. #endif
  296. SOMPEncoderDecoderAbstract(const SOMPEncoderDecoderAbstract* fromObj)
  297. {
  298.    if (*(void**)this != 
  299.        ((somParentMtabStructPtr)
  300.         (SOMPEncoderDecoderAbstractCClassData.parentMtab))->mtab)
  301.       return;
  302.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  303. }
  304. #ifdef __IBMCPP__
  305. #pragma info(restore)
  306. #endif
  307.  
  308.  
  309. /* method: sompEDWrite */
  310. void   sompEDWrite(Environment *ev, 
  311.         SOMPMediaInterfaceAbstract* thisMedia, 
  312.         SOMPPersistentObject* thisObject)
  313. {
  314. /*
  315.  *  This method is responsible for writing out the persistent data of
  316.  *  object <thisObject> in a format that is compatible with sompEDRead.
  317.  *  This routine should make use of the media interface that is passed in
  318.  *  as the first argument <thisMedia>.  This method should assume that
  319.  *  the media interface has been initialized and opened.  This method
  320.  *  should also assume that the media interface will be closed by the
  321.  *  caller of this method.
  322.  * 
  323.  *  Refer to the class interface of the media interface passed in for
  324.  *  the methods which can be used to write instance data.
  325.  */
  326.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMPEncoderDecoderAbstract,sompEDWrite)
  327.     (this, ev,thisMedia,thisObject);
  328. }
  329.  
  330.  
  331. /* method: sompEDRead */
  332. void   sompEDRead(Environment *ev, 
  333.         SOMPMediaInterfaceAbstract* thisMedia, 
  334.         SOMPPersistentObject* thisObject)
  335. {
  336. /*
  337.  *  This method is responsible for reading in the persistent data of
  338.  *  object <thisObject>.  It should expect the data to be in the format
  339.  *  of sompEDWrite.  This routine should make use of the media interface
  340.  *  that is passed in as the first argument <thisMedia>.  This method
  341.  *  should assume that the media interface has been initialized and
  342.  *  opened.  This method should also assume that the media interface will
  343.  *  be closed by the caller of this method.
  344.  * 
  345.  *  Refer to the class interface of the media interface passed in for
  346.  *  the methods which can be used to read instance data.
  347.  */
  348.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMPEncoderDecoderAbstract,sompEDRead)
  349.     (this, ev,thisMedia,thisObject);
  350. }
  351.  
  352.  
  353. /*
  354.  * Reintroduce inherited methods
  355.  */
  356.  
  357. /* initializer method: somDefaultInit */
  358. void   somDefaultInit(som3InitCtrl* ctrl)
  359. {
  360. /*
  361.  *  A default initializer for a SOM object. Passing a null ctrl
  362.  *  indicates to the receiver that its class is the class of the
  363.  *  object being initialized, whereby the initializer will determine
  364.  *  an appropriate control structure.
  365.  */
  366.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultInit)
  367.     (this,ctrl);
  368. }
  369.  
  370.  
  371. /* method: somDestruct */
  372. void   somDestruct(octet doFree, 
  373.         som3DestructCtrl* ctrl)
  374. {
  375. /*
  376.  *  The default destructor for a SOM object. A nonzero <doFree>
  377.  *  indicates that the object storage should be freed by the
  378.  *  object's class (via somDeallocate) after uninitialization.
  379.  *  As with somDefaultInit, a null ctrl can be passed.
  380.  */
  381.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDestruct)
  382.     (this,doFree,ctrl);
  383. }
  384.  
  385.  
  386. /* initializer method: somDefaultCopyInit */
  387. void   somDefaultCopyInit(som3InitCtrl* ctrl, 
  388.         SOMObject* fromObj)
  389. {
  390. /*
  391.  *  A default copy constructor. Use this to make copies of objects for
  392.  *  calling methods with "by-value" argument semantics.
  393.  */
  394.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultCopyInit)
  395.     (this,ctrl,fromObj);
  396. }
  397.  
  398.  
  399. /* method: somDefaultAssign */
  400. SOMPEncoderDecoderAbstract*  somDefaultAssign(som3AssignCtrl* ctrl, 
  401.         SOMObject* fromObj)
  402. {
  403. /*
  404.  *  A default assignment operator. Use this to "assign" the state of one
  405.  *  object to another.
  406.  */
  407.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultAssign)
  408.     (this,ctrl,fromObj);
  409. }
  410.  
  411.  
  412. /* initializer method: somDefaultConstCopyInit */
  413. void   somDefaultConstCopyInit(som3InitCtrl* ctrl, 
  414.         SOMObject* fromObj)
  415. {
  416. /*
  417.  *  A default copy constructor that uses a const fromObj.
  418.  */
  419.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultConstCopyInit)
  420.     (this,ctrl,fromObj);
  421. }
  422.  
  423.  
  424. /* initializer method: somDefaultVCopyInit */
  425. void   somDefaultVCopyInit(som3InitCtrl* ctrl, 
  426.         SOMObject* fromObj)
  427. {
  428. /*
  429.  *  A default copy constructor that uses a volatile fromObj.
  430.  */
  431.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultVCopyInit)
  432.     (this,ctrl,fromObj);
  433. }
  434.  
  435.  
  436. /* initializer method: somDefaultConstVCopyInit */
  437. void   somDefaultConstVCopyInit(som3InitCtrl* ctrl, 
  438.         SOMObject* fromObj)
  439. {
  440. /*
  441.  *  A default copy constructor that uses a const volatile fromObj.
  442.  */
  443.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultConstVCopyInit)
  444.     (this,ctrl,fromObj);
  445. }
  446.  
  447.  
  448. /* method: somDefaultConstAssign */
  449. SOMPEncoderDecoderAbstract*  somDefaultConstAssign(som3AssignCtrl* ctrl, 
  450.         SOMObject* fromObj)
  451. {
  452. /*
  453.  *  A default assignment operator that uses a const fromObj.
  454.  */
  455.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultConstAssign)
  456.     (this,ctrl,fromObj);
  457. }
  458.  
  459.  
  460. /* method: somDefaultVAssign */
  461. SOMPEncoderDecoderAbstract*  somDefaultVAssign(som3AssignCtrl* ctrl, 
  462.         SOMObject* fromObj)
  463. {
  464. /*
  465.  *  A default assignment operator that uses a volatile fromObj.
  466.  */
  467.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultVAssign)
  468.     (this,ctrl,fromObj);
  469. }
  470.  
  471.  
  472. /* method: somDefaultConstVAssign */
  473. SOMPEncoderDecoderAbstract*  somDefaultConstVAssign(som3AssignCtrl* ctrl, 
  474.         SOMObject* fromObj)
  475. {
  476. /*
  477.  *  A default assignment operator that uses a const volatile fromObj.
  478.  */
  479.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDefaultConstVAssign)
  480.     (this,ctrl,fromObj);
  481. }
  482.  
  483.  
  484. /* method: somInit */
  485. void   somInit()
  486. {
  487. /*
  488.  *  Obsolete but still supported. Override somDefaultInit instead of somInit.
  489.  */
  490.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somInit)
  491.     (this);
  492. }
  493.  
  494.  
  495. /* method: somFree */
  496. void   somFree()
  497. {
  498. /*
  499.  *  Use as directed by framework implementations.
  500.  */
  501.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somFree)
  502.     (this);
  503. }
  504.  
  505.  
  506. /* method: somUninit */
  507. void   somUninit()
  508. {
  509. /*
  510.  *  Obsolete but still supported. Override somDestruct instead of somUninit.
  511.  */
  512.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somUninit)
  513.     (this);
  514. }
  515.  
  516.  
  517. /* method: somGetClass */
  518. SOMClass*   somGetClass()
  519. {
  520. /*
  521.  *  Return the receiver's class.
  522.  */
  523.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somGetClass)
  524.     (this);
  525. }
  526.  
  527.  
  528. /* method: somGetClassName */
  529. string   somGetClassName()
  530. {
  531. /*
  532.  *  Return the name of the receiver's class.
  533.  */
  534.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somGetClassName)
  535.     (this);
  536. }
  537.  
  538.  
  539. /* method: somGetSize */
  540. long   somGetSize()
  541. {
  542. /*
  543.  *  Return the size of the receiver.
  544.  */
  545.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somGetSize)
  546.     (this);
  547. }
  548.  
  549.  
  550. /* method: somIsA */
  551. boolean   somIsA(SOMClass* aClassObj)
  552. {
  553. /*
  554.  *  Returns 1 (true) if the receiver responds to methods
  555.  *  introduced by <aClassObj>, and 0 (false) otherwise.
  556.  */
  557.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somIsA)
  558.     (this,aClassObj);
  559. }
  560.  
  561.  
  562. /* method: somIsInstanceOf */
  563. boolean   somIsInstanceOf(SOMClass* aClassObj)
  564. {
  565. /*
  566.  *  Returns 1 (true) if the receiver is an instance of
  567.  *  <aClassObj> and 0 (false) otherwise.
  568.  */
  569.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somIsInstanceOf)
  570.     (this,aClassObj);
  571. }
  572.  
  573.  
  574. /* method: somRespondsTo */
  575. boolean   somRespondsTo(somId mId)
  576. {
  577. /*
  578.  *  Returns 1 (true) if the indicated method can be invoked
  579.  *  on the receiver and 0 (false) otherwise.
  580.  */
  581.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somRespondsTo)
  582.     (this,mId);
  583. }
  584.  
  585.  
  586. /* va_list method: somDispatch */
  587.  
  588. /*
  589.  *  This method provides a generic, class-specific dispatch mechanism.
  590.  *  It accepts as input <retValue> a pointer to the memory area to be
  591.  *  loaded with the result of dispatching the method indicated by
  592.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  593.  *  on which the method is to be invoked as the first argument.
  594.  */
  595. /* the va_list invocation form */
  596. boolean   SOMPEncoderDecoderAbstract_somDispatch(somToken* retValue, 
  597.         somId methodId, 
  598.         va_list ap)
  599. {return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatch)
  600.     (this,retValue,methodId,ap);
  601. }
  602.  
  603. /* the varargs invocation form */
  604. boolean   somDispatch(somToken* retValue, 
  605.         somId methodId, 
  606.         ...)
  607. {
  608. /*
  609.  *  This method provides a generic, class-specific dispatch mechanism.
  610.  *  It accepts as input <retValue> a pointer to the memory area to be
  611.  *  loaded with the result of dispatching the method indicated by
  612.  *  <methodId> using the arguments in <ap>. <ap> contains the object
  613.  *  on which the method is to be invoked as the first argument.
  614.  */
  615.    va_list ap;
  616.    va_start(ap, methodId);
  617.    boolean __somResult = 
  618.       SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatch)
  619.     (this,retValue,methodId,ap);
  620.    va_end(ap);
  621.    return __somResult;
  622. }
  623.  
  624.  
  625. /* va_list method: somClassDispatch */
  626.  
  627. /*
  628.  *  Like somDispatch, but method resolution for static methods is done
  629.  *  according to the clsObj instance method table.
  630.  */
  631. /* the va_list invocation form */
  632. boolean   SOMPEncoderDecoderAbstract_somClassDispatch(SOMClass* clsObj, 
  633.         somToken* retValue, 
  634.         somId methodId, 
  635.         va_list ap)
  636. {return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somClassDispatch)
  637.     (this,clsObj,retValue,methodId,ap);
  638. }
  639.  
  640. /* the varargs invocation form */
  641. boolean   somClassDispatch(SOMClass* clsObj, 
  642.         somToken* retValue, 
  643.         somId methodId, 
  644.         ...)
  645. {
  646. /*
  647.  *  Like somDispatch, but method resolution for static methods is done
  648.  *  according to the clsObj instance method table.
  649.  */
  650.    va_list ap;
  651.    va_start(ap, methodId);
  652.    boolean __somResult = 
  653.       SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somClassDispatch)
  654.     (this,clsObj,retValue,methodId,ap);
  655.    va_end(ap);
  656.    return __somResult;
  657. }
  658.  
  659.  
  660. /* method: somCastObj */
  661. boolean   somCastObj(SOMClass* cls)
  662. {
  663. /*
  664.  *  cast the receiving object to cls (which must be an ancestor of the
  665.  *  objects true class. Returns true on success.
  666.  */
  667.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somCastObj)
  668.     (this,cls);
  669. }
  670.  
  671.  
  672. /* method: somResetObj */
  673. boolean   somResetObj()
  674. {
  675. /*
  676.  *  reset an object to its true class. Returns true always.
  677.  */
  678.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somResetObj)
  679.     (this);
  680. }
  681.  
  682.  
  683. /* va_list method: somDispatchV */
  684.  
  685. /*
  686.  *  Obsolete. Use somDispatch instead.
  687.  */
  688. /* the va_list invocation form */
  689. void   SOMPEncoderDecoderAbstract_somDispatchV(somId methodId, 
  690.         somId descriptor, 
  691.         va_list ap)
  692. {   SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchV)
  693.     (this,methodId,descriptor,ap);
  694. }
  695.  
  696. /* the varargs invocation form */
  697. void   somDispatchV(somId methodId, 
  698.         somId descriptor, 
  699.         ...)
  700. {
  701. /*
  702.  *  Obsolete. Use somDispatch instead.
  703.  */
  704.    va_list ap;
  705.    va_start(ap, descriptor);
  706.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchV)
  707.     (this,methodId,descriptor,ap);
  708.    va_end(ap);
  709. }
  710.  
  711.  
  712. /* va_list method: somDispatchL */
  713.  
  714. /*
  715.  *  Obsolete. Use somDispatch instead.
  716.  */
  717. /* the va_list invocation form */
  718. long   SOMPEncoderDecoderAbstract_somDispatchL(somId methodId, 
  719.         somId descriptor, 
  720.         va_list ap)
  721. {return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchL)
  722.     (this,methodId,descriptor,ap);
  723. }
  724.  
  725. /* the varargs invocation form */
  726. long   somDispatchL(somId methodId, 
  727.         somId descriptor, 
  728.         ...)
  729. {
  730. /*
  731.  *  Obsolete. Use somDispatch instead.
  732.  */
  733.    va_list ap;
  734.    va_start(ap, descriptor);
  735.    long __somResult = 
  736.       SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchL)
  737.     (this,methodId,descriptor,ap);
  738.    va_end(ap);
  739.    return __somResult;
  740. }
  741.  
  742.  
  743. /* va_list method: somDispatchA */
  744.  
  745. /*
  746.  *  Obsolete. Use somDispatch instead.
  747.  */
  748. /* the va_list invocation form */
  749. void*   SOMPEncoderDecoderAbstract_somDispatchA(somId methodId, 
  750.         somId descriptor, 
  751.         va_list ap)
  752. {return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchA)
  753.     (this,methodId,descriptor,ap);
  754. }
  755.  
  756. /* the varargs invocation form */
  757. void*   somDispatchA(somId methodId, 
  758.         somId descriptor, 
  759.         ...)
  760. {
  761. /*
  762.  *  Obsolete. Use somDispatch instead.
  763.  */
  764.    va_list ap;
  765.    va_start(ap, descriptor);
  766.    void* __somResult = 
  767.       SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchA)
  768.     (this,methodId,descriptor,ap);
  769.    va_end(ap);
  770.    return __somResult;
  771. }
  772.  
  773.  
  774. /* va_list method: somDispatchD */
  775.  
  776. /*
  777.  *  Obsolete. Use somDispatch instead.
  778.  */
  779. /* the va_list invocation form */
  780. double   SOMPEncoderDecoderAbstract_somDispatchD(somId methodId, 
  781.         somId descriptor, 
  782.         va_list ap)
  783. {return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchD)
  784.     (this,methodId,descriptor,ap);
  785. }
  786.  
  787. /* the varargs invocation form */
  788. double   somDispatchD(somId methodId, 
  789.         somId descriptor, 
  790.         ...)
  791. {
  792. /*
  793.  *  Obsolete. Use somDispatch instead.
  794.  */
  795.    va_list ap;
  796.    va_start(ap, descriptor);
  797.    double __somResult = 
  798.       SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDispatchD)
  799.     (this,methodId,descriptor,ap);
  800.    va_end(ap);
  801.    return __somResult;
  802. }
  803.  
  804.  
  805. /* method: somPrintSelf */
  806. SOMObject*   somPrintSelf()
  807. {
  808. /*
  809.  *  Uses <SOMOutCharRoutine> to write a brief string with identifying
  810.  *  information about this object.  The default implementation just gives
  811.  *  the object's class name and its address in memory.
  812.  *  <self> is returned.
  813.  */
  814.    return SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somPrintSelf)
  815.     (this);
  816. }
  817.  
  818.  
  819. /* method: somDumpSelf */
  820. void   somDumpSelf(long level)
  821. {
  822. /*
  823.  *  Uses <SOMOutCharRoutine> to write a detailed description of this object
  824.  *  and its current state.
  825.  * 
  826.  *  <level> indicates the nesting level for describing compound objects
  827.  *  it must be greater than or equal to zero.  All lines in the
  828.  *  description will be preceeded by <2*level> spaces.
  829.  * 
  830.  *  This routine only actually writes the data that concerns the object
  831.  *  as a whole, such as class, and uses <somDumpSelfInt> to describe
  832.  *  the object's current state.  This approach allows readable
  833.  *  descriptions of compound objects to be constructed.
  834.  * 
  835.  *  Generally it is not necessary to override this method, if it is
  836.  *  overriden it generally must be completely replaced.
  837.  */
  838.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDumpSelf)
  839.     (this,level);
  840. }
  841.  
  842.  
  843. /* method: somDumpSelfInt */
  844. void   somDumpSelfInt(long level)
  845. {
  846. /*
  847.  *  Uses <SOMOutCharRoutine> to write in the current state of this object.
  848.  *  Generally this method will need to be overridden.  When overriding
  849.  *  it, begin by calling the parent class form of this method and then
  850.  *  write in a description of your class's instance data. This will
  851.  *  result in a description of all the object's instance data going
  852.  *  from its root ancestor class to its specific class.
  853.  */
  854.    SOM_ResolveD(this,SOMPEncoderDecoderAbstract,SOMObject,somDumpSelfInt)
  855.     (this,level);
  856. }
  857.  
  858.  
  859.  
  860. };   /* SOMPEncoderDecoderAbstract */
  861.  
  862.  
  863.  
  864. #endif       /* SOM_SOMPEncoderDecoderAbstract_xh */
  865.