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

  1. //
  2. //   COMPONENT_NAME: somp
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) 2.9 src/somp/defedidl.idl, somp, som2.1 12/26/95 16:53:37 [7/30/96 14:46:48]
  14.  
  15.  
  16. #ifndef defedidl_idl
  17. #define defedidl_idl
  18.  
  19. #include <somp.idl>
  20. #include <eda.idl>
  21. #include <somperrd.idl>
  22. #include <intfacdf.idl>
  23.  
  24. // Forward references
  25. interface Repository;
  26. interface SOMPMediaInterfaceAbstract;
  27. interface SOMPPersistentObject;
  28.  
  29. interface SOMPAttrEncoderDecoder : SOMPEncoderDecoderAbstract
  30.  
  31. // This class is an EncoderDecoder which can save/restore the IDL
  32. // attributes of a given persistent object.
  33. //
  34. // NOTE: This encoder/decoder assumes structure members have been
  35. //       aligned. This is the default for most compilers. See your
  36. //       compiler's documentation for discussion of aligned structures.
  37. //       The encoder/decoder will also handle structures
  38. //       which are naturally packed (e.g. a structure containing
  39. //       members which are all declared "long") however, some compilers
  40. //       allow options which will pack all structures. This encoder/
  41. //       decoder will not handle these structures.
  42. //
  43. // For example, suppose you have an IDL Interface definition with attributes:
  44. //
  45. //  attribute string   name;
  46. //  attribute string   food;
  47. //  attribute long     weight;
  48. //  attribute short    height;
  49. //
  50. // You would make attributes "name" and "weight" persistent by specifying
  51. // the following SOM modifiers in the SOM implementation section of the
  52. // interface definition:
  53. //
  54. //  name: persistent;
  55. //  weight: persistent;
  56. //
  57. // An encoder/decoder is an object which is paired with a persistent object
  58. // and handles the reading/writing of that persistent object's
  59. // data.
  60. //
  61. // A persistent object's encoder/decoder is instantiated by an
  62. // IO Group Mgr at the moment that object is save/restored.
  63.  
  64. {
  65.  
  66. // typedef enum mytckind {tk_null, tk_long} TCKind;
  67. // TCKind is a CORBA enumerated type. This type is definded by SOM
  68. // however, not in IDL and therefore this declaration.
  69.  
  70.  
  71. #ifdef OLDIDL
  72. };
  73. #endif
  74.  
  75. #ifdef __SOMIDL__
  76.  
  77. #ifdef OLDIDL
  78. class SOMPAttrEncoderDecoder
  79. #else
  80. implementation
  81. #endif
  82. {
  83.    callstyle=idl;
  84.    dllname="somp.dll";
  85.  
  86.    releaseorder: sompGetObjectAttributes, sompGetAttribute,
  87.          sompSetObjectAttributes, sompSetAttribute,
  88.          sompAttributeSize, sompStoreBuffer,
  89.          sompRestoreBuffer, sompDispatchSet,
  90.          sompPadSize, sompCallStyleIDL,
  91.          sompLookupModifier;
  92.  
  93. // Class Modifiers
  94.    majorversion = 2;
  95.    minorversion = 1;
  96.    filestem = defedidl;
  97.  
  98.  
  99. // Method Modifiers
  100.    somInit: override;
  101.    sompEDWrite: override;
  102.    sompEDRead: override;
  103.  
  104. };
  105. #endif /* __SOMIDL__ */
  106. #ifndef OLDIDL
  107. };
  108. #endif
  109.  
  110. #endif  /* defedidl_idl */
  111.