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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: defedidl.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_SOMPAttrEncoderDecoder_h
  26. #define SOM_SOMPAttrEncoderDecoder_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 SOMPAttrEncoderDecoder
  42. #define SOMPAttrEncoderDecoder SOMObject
  43. #endif
  44. /*
  45.  *  This class is an EncoderDecoder which can save/restore the IDL
  46.  *  attributes of a given persistent object.
  47.  * 
  48.  *  NOTE: This encoder/decoder assumes structure members have been
  49.  *        aligned. This is the default for most compilers. See your
  50.  *        compiler's documentation for discussion of aligned structures.
  51.  *        The encoder/decoder will also handle structures
  52.  *        which are naturally packed (e.g. a structure containing
  53.  *        members which are all declared "long") however, some compilers
  54.  *        allow options which will pack all structures. This encoder/
  55.  *        decoder will not handle these structures.
  56.  * 
  57.  *  For example, suppose you have an IDL Interface definition with attributes:
  58.  * 
  59.  *   attribute string   name;
  60.  *   attribute string   food;
  61.  *   attribute long     weight;
  62.  *   attribute short    height;
  63.  * 
  64.  *  You would make attributes "name" and "weight" persistent by specifying
  65.  *  the following SOM modifiers in the SOM implementation section of the
  66.  *  interface definition:
  67.  * 
  68.  *   name: persistent;
  69.  *   weight: persistent;
  70.  * 
  71.  *  An encoder/decoder is an object which is paired with a persistent object
  72.  *  and handles the reading/writing of that persistent object's
  73.  *  data.
  74.  * 
  75.  *  A persistent object's encoder/decoder is instantiated by an
  76.  *  IO Group Mgr at the moment that object is save/restored.
  77.  *  typedef enum mytckind {tk_null, tk_long} TCKind;
  78.  *  TCKind is a CORBA enumerated type. This type is definded by SOM
  79.  *  however, not in IDL and therefore this declaration.
  80.  */
  81. #include <eda.h>
  82.  
  83. /*
  84.  * Start of bindings for IDL types
  85.  */
  86.  
  87. #ifndef SOMClass
  88.     #define SOMClass SOMObject
  89. #endif /* SOMClass */
  90. #ifndef SOMPMediaInterfaceAbstract
  91.     #define SOMPMediaInterfaceAbstract SOMObject
  92. #endif /* SOMPMediaInterfaceAbstract */
  93. #ifndef SOMPPersistentObject
  94.     #define SOMPPersistentObject SOMObject
  95. #endif /* SOMPPersistentObject */
  96. #ifndef Container
  97.     #define Container SOMObject
  98. #endif /* Container */
  99. #ifndef Repository
  100.     #define Repository SOMObject
  101. #endif /* Repository */
  102.  
  103. /*
  104.  * End of bindings for IDL types.
  105.  */
  106.  
  107. #define SOMPAttrEncoderDecoder_MajorVersion 2
  108. #define SOMPAttrEncoderDecoder_MinorVersion 1
  109.  
  110. /*
  111.  * External name shortening if required
  112.  */
  113. #ifdef SOM_USE_SHORT_EXTERNAL_NAMES
  114. #define SOMPAttrEncoderDecoderNewClass c
  115. #pragma linkage(c, system)
  116. #define SOMPAttrEncoderDecoderClassData d
  117. #define SOMPAttrEncoderDecoderCClassData x
  118. #endif /* SOM_USE_SHORT_EXTERNAL_NAMES */
  119. /*--------------Migration------------*/
  120. #define SOMPAttrEncoderDecoder_classObj SOMPAttrEncoderDecoderClassData.classObject
  121. #define _SOMPAttrEncoderDecoder SOMPAttrEncoderDecoder_classObj
  122.  
  123. /*
  124.  * Declare the class creation procedure
  125.  */
  126. SOMEXTERN SOMClass * SOMLINK SOMPAttrEncoderDecoderNewClass(integer4 somtmajorVersion,
  127.         integer4 somtminorVersion);
  128. #pragma linkage(SOMPAttrEncoderDecoderNewClass, system)
  129.  
  130. /*
  131.  * Declare the class data structure
  132.  */
  133. SOMEXTERN struct SOMPAttrEncoderDecoderClassDataStructure {
  134.     SOMClass *classObject;
  135.     somMToken sompGetObjectAttributes;
  136.     somMToken sompGetAttribute;
  137.     somMToken sompSetObjectAttributes;
  138.     somMToken sompSetAttribute;
  139.     somMToken sompAttributeSize;
  140.     somMToken sompStoreBuffer;
  141.     somMToken sompRestoreBuffer;
  142.     somMToken sompDispatchSet;
  143.     somMToken sompPadSize;
  144.     somMToken sompCallStyleIDL;
  145.     somMToken sompLookupModifier;
  146. } SOMDLINK SOMPAttrEncoderDecoderClassData;
  147.  
  148. /*
  149.  * Declare the C specific class data structure
  150.  */
  151. SOMEXTERN struct SOMPAttrEncoderDecoderCClassDataStructure {
  152.     somMethodTabs parentMtab;
  153.     somDToken instanceDataToken;
  154. } SOMDLINK SOMPAttrEncoderDecoderCClassData;
  155.  
  156. /*
  157.  * New and Renew macros for SOMPAttrEncoderDecoder
  158.  */
  159. #define SOMPAttrEncoderDecoderNew() \
  160.    ( _SOMPAttrEncoderDecoder ? \
  161.     _somNew(_SOMPAttrEncoderDecoder) \
  162.     : ( SOMPAttrEncoderDecoderNewClass(\
  163.         SOMPAttrEncoderDecoder_MajorVersion, \
  164.         SOMPAttrEncoderDecoder_MinorVersion),\
  165.        _somNew(_SOMPAttrEncoderDecoder)))
  166. #define SOMPAttrEncoderDecoderRenew(buf) \
  167.    ( _SOMPAttrEncoderDecoder ? \
  168.     _somRenew(_SOMPAttrEncoderDecoder, buf) \
  169.     : ( SOMPAttrEncoderDecoderNewClass(\
  170.         SOMPAttrEncoderDecoder_MajorVersion, \
  171.         SOMPAttrEncoderDecoder_MinorVersion),\
  172.        _somRenew(_SOMPAttrEncoderDecoder, buf)))
  173.  
  174. /*
  175.  * Override method: somInit
  176.  */
  177. #define SOMPAttrEncoderDecoder_somInit(somSelf) \
  178.     SOMObject_somInit(somSelf)
  179.  
  180. /*
  181.  * Override method: sompEDWrite
  182.  */
  183. #define SOMPAttrEncoderDecoder_sompEDWrite(somSelf,ev,thisMedia,thisObject) \
  184.     SOMPEncoderDecoderAbstract_sompEDWrite(somSelf,ev,thisMedia,thisObject)
  185.  
  186. /*
  187.  * Override method: sompEDRead
  188.  */
  189. #define SOMPAttrEncoderDecoder_sompEDRead(somSelf,ev,thisMedia,thisObject) \
  190.     SOMPEncoderDecoderAbstract_sompEDRead(somSelf,ev,thisMedia,thisObject)
  191. #ifndef SOM_DONT_USE_INHERITED_MACROS
  192. #define SOMPAttrEncoderDecoder_somDefaultInit SOMObject_somDefaultInit
  193. #define SOMPAttrEncoderDecoder_somDestruct SOMObject_somDestruct
  194. #define SOMPAttrEncoderDecoder_somDefaultCopyInit SOMObject_somDefaultCopyInit
  195. #define SOMPAttrEncoderDecoder_somDefaultAssign SOMObject_somDefaultAssign
  196. #define SOMPAttrEncoderDecoder_somDefaultConstCopyInit SOMObject_somDefaultConstCopyInit
  197. #define SOMPAttrEncoderDecoder_somDefaultVCopyInit SOMObject_somDefaultVCopyInit
  198. #define SOMPAttrEncoderDecoder_somDefaultConstVCopyInit SOMObject_somDefaultConstVCopyInit
  199. #define SOMPAttrEncoderDecoder_somDefaultConstAssign SOMObject_somDefaultConstAssign
  200. #define SOMPAttrEncoderDecoder_somDefaultVAssign SOMObject_somDefaultVAssign
  201. #define SOMPAttrEncoderDecoder_somDefaultConstVAssign SOMObject_somDefaultConstVAssign
  202. #define SOMPAttrEncoderDecoder_somFree SOMObject_somFree
  203. #define SOMPAttrEncoderDecoder_somUninit SOMObject_somUninit
  204. #define SOMPAttrEncoderDecoder_somGetClass SOMObject_somGetClass
  205. #define SOMPAttrEncoderDecoder_somGetClassName SOMObject_somGetClassName
  206. #define SOMPAttrEncoderDecoder_somGetSize SOMObject_somGetSize
  207. #define SOMPAttrEncoderDecoder_somIsA SOMObject_somIsA
  208. #define SOMPAttrEncoderDecoder_somIsInstanceOf SOMObject_somIsInstanceOf
  209. #define SOMPAttrEncoderDecoder_somRespondsTo SOMObject_somRespondsTo
  210. #define SOMPAttrEncoderDecoder_somDispatch SOMObject_somDispatch
  211. #define SOMPAttrEncoderDecoder_somClassDispatch SOMObject_somClassDispatch
  212. #define SOMPAttrEncoderDecoder_somCastObj SOMObject_somCastObj
  213. #define SOMPAttrEncoderDecoder_somResetObj SOMObject_somResetObj
  214. #define SOMPAttrEncoderDecoder_somDispatchV SOMObject_somDispatchV
  215. #define SOMPAttrEncoderDecoder_somDispatchL SOMObject_somDispatchL
  216. #define SOMPAttrEncoderDecoder_somDispatchA SOMObject_somDispatchA
  217. #define SOMPAttrEncoderDecoder_somDispatchD SOMObject_somDispatchD
  218. #define SOMPAttrEncoderDecoder_somPrintSelf SOMObject_somPrintSelf
  219. #define SOMPAttrEncoderDecoder_somDumpSelf SOMObject_somDumpSelf
  220. #define SOMPAttrEncoderDecoder_somDumpSelfInt SOMObject_somDumpSelfInt
  221. #endif /* SOM_DONT_USE_INHERITED_MACROS */
  222.  
  223. #endif       /* SOM_SOMPAttrEncoderDecoder_h */
  224.