home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / eda.h < prev    next >
C/C++ Source or Header  |  1999-02-22  |  10KB  |  238 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: eda.h.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.17
  7.  *     SOM Emitter emith: 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_h
  26. #define SOM_SOMPEncoderDecoderAbstract_h
  27.  
  28.  
  29. #include <som.h>
  30.  
  31. /*
  32.  * -- This emitter treats Method Tokens as Thunks by default.
  33.  * -- Use the sc modifier "nothunks" to change this default
  34.  */
  35. #undef somresolve_
  36. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  37.  
  38. /*
  39.  * Define the class name as an object type
  40.  */
  41. #ifndef SOMPEncoderDecoderAbstract
  42. #define SOMPEncoderDecoderAbstract SOMObject
  43. #endif
  44. /*
  45.  *  This is the abstract class for an EncoderDecoder.
  46.  * 
  47.  *  An encoder/decoder is an object which is paired with a persistent object
  48.  *  and handles the reading/writing of that persistent object's instance
  49.  *  data.  A class derived from this abstract class must be created and
  50.  *  paired with a persistent object in order for that persistent object
  51.  *  to be save/restored.
  52.  * 
  53.  *  The derived encoder/decoder class name is bound to a persistent
  54.  *  object with the sompSetEncoderDecoderName method (see po.sc).
  55.  * 
  56.  *  A persistent object's encoder/decoder is instantiated by an
  57.  *  IO Group Mgr at the moment that object is save/restored.
  58.  */
  59. #include <somobj.h>
  60.  
  61. /*
  62.  * Start of bindings for IDL types
  63.  */
  64.  
  65. #ifndef SOMClass
  66.     #define SOMClass SOMObject
  67. #endif /* SOMClass */
  68. #ifndef SOMPMediaInterfaceAbstract
  69.     #define SOMPMediaInterfaceAbstract SOMObject
  70. #endif /* SOMPMediaInterfaceAbstract */
  71. #ifndef SOMPPersistentObject
  72.     #define SOMPPersistentObject SOMObject
  73. #endif /* SOMPPersistentObject */
  74.  
  75. /*
  76.  * End of bindings for IDL types.
  77.  */
  78.  
  79. #define SOMPEncoderDecoderAbstract_MajorVersion 2
  80. #define SOMPEncoderDecoderAbstract_MinorVersion 1
  81.  
  82. /*
  83.  * External name shortening if required
  84.  */
  85. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  86. #define SOMPEncoderDecoderAbstractNewClass c
  87. #pragma linkage(c, system)
  88. #define SOMPEncoderDecoderAbstractClassData d
  89. #define SOMPEncoderDecoderAbstractCClassData x
  90. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  91. /*--------------Migration------------*/
  92. #define SOMPEncoderDecoderAbstract_classObj SOMPEncoderDecoderAbstractClassData.classObject
  93. #define _SOMPEncoderDecoderAbstract SOMPEncoderDecoderAbstract_classObj
  94.  
  95. /*
  96.  * Declare the class creation procedure
  97.  */
  98. SOMEXTERN SOMClass * SOMLINK SOMPEncoderDecoderAbstractNewClass(integer4 somtmajorVersion,
  99.         integer4 somtminorVersion);
  100. #pragma linkage(SOMPEncoderDecoderAbstractNewClass, system)
  101.  
  102. /*
  103.  * Declare the class data structure
  104.  */
  105. SOMEXTERN struct SOMPEncoderDecoderAbstractClassDataStructure {
  106.     SOMClass *classObject;
  107.     somMToken sompEDWrite;
  108.     somMToken sompEDRead;
  109. } SOMDLINK SOMPEncoderDecoderAbstractClassData;
  110.  
  111. /*
  112.  * Declare the C specific class data structure
  113.  */
  114. SOMEXTERN struct SOMPEncoderDecoderAbstractCClassDataStructure {
  115.     somMethodTabs parentMtab;
  116.     somDToken instanceDataToken;
  117. } SOMDLINK SOMPEncoderDecoderAbstractCClassData;
  118.  
  119. /*
  120.  * New and Renew macros for SOMPEncoderDecoderAbstract
  121.  */
  122. #define SOMPEncoderDecoderAbstractNew() \
  123.    ( _SOMPEncoderDecoderAbstract ? \
  124.     _somNew(_SOMPEncoderDecoderAbstract) \
  125.     : ( SOMPEncoderDecoderAbstractNewClass(\
  126.         SOMPEncoderDecoderAbstract_MajorVersion, \
  127.         SOMPEncoderDecoderAbstract_MinorVersion),\
  128.        _somNew(_SOMPEncoderDecoderAbstract)))
  129. #define SOMPEncoderDecoderAbstractRenew(buf) \
  130.    ( _SOMPEncoderDecoderAbstract ? \
  131.     _somRenew(_SOMPEncoderDecoderAbstract, buf) \
  132.     : ( SOMPEncoderDecoderAbstractNewClass(\
  133.         SOMPEncoderDecoderAbstract_MajorVersion, \
  134.         SOMPEncoderDecoderAbstract_MinorVersion),\
  135.        _somRenew(_SOMPEncoderDecoderAbstract, buf)))
  136.  
  137. /*
  138.  * New Method: sompEDWrite
  139.  */
  140. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_sompEDWrite(SOMPEncoderDecoderAbstract *somSelf, Environment *ev, 
  141.         SOMPMediaInterfaceAbstract* thisMedia, 
  142.         SOMPPersistentObject* thisObject);
  143. #pragma linkage(somTP_SOMPEncoderDecoderAbstract_sompEDWrite, system)
  144. typedef somTP_SOMPEncoderDecoderAbstract_sompEDWrite *somTD_SOMPEncoderDecoderAbstract_sompEDWrite;
  145. /*
  146.  *  This method is responsible for writing out the persistent data of
  147.  *  object <thisObject> in a format that is compatible with sompEDRead.
  148.  *  This routine should make use of the media interface that is passed in
  149.  *  as the first argument <thisMedia>.  This method should assume that
  150.  *  the media interface has been initialized and opened.  This method
  151.  *  should also assume that the media interface will be closed by the
  152.  *  caller of this method.
  153.  * 
  154.  *  Refer to the class interface of the media interface passed in for
  155.  *  the methods which can be used to write instance data.
  156.  */
  157. #define somMD_SOMPEncoderDecoderAbstract_sompEDWrite "::SOMPEncoderDecoderAbstract::sompEDWrite"
  158. #define SOMPEncoderDecoderAbstract_sompEDWrite(somSelf,ev,thisMedia,thisObject) \
  159.     (SOM_Resolve(somSelf, SOMPEncoderDecoderAbstract, sompEDWrite) \
  160.     (somSelf,ev,thisMedia,thisObject))
  161. #ifndef SOMGD_sompEDWrite
  162.     #if (defined(_sompEDWrite) || defined(__sompEDWrite))
  163.         #undef _sompEDWrite
  164.         #undef __sompEDWrite
  165.         #define SOMGD_sompEDWrite 1
  166.     #else
  167.         #define _sompEDWrite SOMPEncoderDecoderAbstract_sompEDWrite
  168.     #endif /* _sompEDWrite */
  169. #endif /* SOMGD_sompEDWrite */
  170.  
  171. /*
  172.  * New Method: sompEDRead
  173.  */
  174. typedef void   SOMLINK somTP_SOMPEncoderDecoderAbstract_sompEDRead(SOMPEncoderDecoderAbstract *somSelf, Environment *ev, 
  175.         SOMPMediaInterfaceAbstract* thisMedia, 
  176.         SOMPPersistentObject* thisObject);
  177. #pragma linkage(somTP_SOMPEncoderDecoderAbstract_sompEDRead, system)
  178. typedef somTP_SOMPEncoderDecoderAbstract_sompEDRead *somTD_SOMPEncoderDecoderAbstract_sompEDRead;
  179. /*
  180.  *  This method is responsible for reading in the persistent data of
  181.  *  object <thisObject>.  It should expect the data to be in the format
  182.  *  of sompEDWrite.  This routine should make use of the media interface
  183.  *  that is passed in as the first argument <thisMedia>.  This method
  184.  *  should assume that the media interface has been initialized and
  185.  *  opened.  This method should also assume that the media interface will
  186.  *  be closed by the caller of this method.
  187.  * 
  188.  *  Refer to the class interface of the media interface passed in for
  189.  *  the methods which can be used to read instance data.
  190.  */
  191. #define somMD_SOMPEncoderDecoderAbstract_sompEDRead "::SOMPEncoderDecoderAbstract::sompEDRead"
  192. #define SOMPEncoderDecoderAbstract_sompEDRead(somSelf,ev,thisMedia,thisObject) \
  193.     (SOM_Resolve(somSelf, SOMPEncoderDecoderAbstract, sompEDRead) \
  194.     (somSelf,ev,thisMedia,thisObject))
  195. #ifndef SOMGD_sompEDRead
  196.     #if (defined(_sompEDRead) || defined(__sompEDRead))
  197.         #undef _sompEDRead
  198.         #undef __sompEDRead
  199.         #define SOMGD_sompEDRead 1
  200.     #else
  201.         #define _sompEDRead SOMPEncoderDecoderAbstract_sompEDRead
  202.     #endif /* _sompEDRead */
  203. #endif /* SOMGD_sompEDRead */
  204. #ifndef SOM_DONT_USE_INHERITED_MACROS
  205. #define SOMPEncoderDecoderAbstract_somDefaultInit SOMObject_somDefaultInit
  206. #define SOMPEncoderDecoderAbstract_somDestruct SOMObject_somDestruct
  207. #define SOMPEncoderDecoderAbstract_somDefaultCopyInit SOMObject_somDefaultCopyInit
  208. #define SOMPEncoderDecoderAbstract_somDefaultAssign SOMObject_somDefaultAssign
  209. #define SOMPEncoderDecoderAbstract_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  210. #define SOMPEncoderDecoderAbstract_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  211. #define SOMPEncoderDecoderAbstract_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  212. #define SOMPEncoderDecoderAbstract_somDefaultConstAssign SOMObject_somDefaultConstAssign
  213. #define SOMPEncoderDecoderAbstract_somDefaultVAssign SOMObject_somDefaultVAssign
  214. #define SOMPEncoderDecoderAbstract_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  215. #define SOMPEncoderDecoderAbstract_somInit SOMObject_somInit
  216. #define SOMPEncoderDecoderAbstract_somFree SOMObject_somFree
  217. #define SOMPEncoderDecoderAbstract_somUninit SOMObject_somUninit
  218. #define SOMPEncoderDecoderAbstract_somGetClass SOMObject_somGetClass
  219. #define SOMPEncoderDecoderAbstract_somGetClassName SOMObject_somGetClassName
  220. #define SOMPEncoderDecoderAbstract_somGetSize SOMObject_somGetSize
  221. #define SOMPEncoderDecoderAbstract_somIsA SOMObject_somIsA
  222. #define SOMPEncoderDecoderAbstract_somIsInstanceOf SOMObject_somIsInstanceOf
  223. #define SOMPEncoderDecoderAbstract_somRespondsTo SOMObject_somRespondsTo
  224. #define SOMPEncoderDecoderAbstract_somDispatch SOMObject_somDispatch
  225. #define SOMPEncoderDecoderAbstract_somClassDispatch SOMObject_somClassDispatch
  226. #define SOMPEncoderDecoderAbstract_somCastObj SOMObject_somCastObj
  227. #define SOMPEncoderDecoderAbstract_somResetObj SOMObject_somResetObj
  228. #define SOMPEncoderDecoderAbstract_somDispatchV SOMObject_somDispatchV
  229. #define SOMPEncoderDecoderAbstract_somDispatchL SOMObject_somDispatchL
  230. #define SOMPEncoderDecoderAbstract_somDispatchA SOMObject_somDispatchA
  231. #define SOMPEncoderDecoderAbstract_somDispatchD SOMObject_somDispatchD
  232. #define SOMPEncoderDecoderAbstract_somPrintSelf SOMObject_somPrintSelf
  233. #define SOMPEncoderDecoderAbstract_somDumpSelf SOMObject_somDumpSelf
  234. #define SOMPEncoderDecoderAbstract_somDumpSelfInt SOMObject_somDumpSelfInt
  235. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  236.  
  237. #endif       /* SOM_SOMPEncoderDecoderAbstract_h */
  238.