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

  1. //
  2. //   COMPONENT_NAME: somr
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
  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.8 src/somr/linear.idl, somr, som2.1 9/1/94 15:50:45 [7/30/96 14:49:24]
  14.  
  15.  
  16.  
  17. #ifndef linear_idl
  18. #define linear_idl
  19.  
  20. #include <somobj.idl>
  21. interface SOMRLinearizable : SOMObject
  22.  
  23. //This is a mixin class which defines the property "linearizable".
  24. //Any object that supports the two methods "somrGetState" and
  25. //"somrSetState" is linearizable.  This is an abstract base class
  26. //and hence any derived class MUST OVERRIDE these two methods.
  27.  
  28. {
  29.   void somrGetState(inout string buf);
  30.  
  31.   // Converts its internal state into a linear string and returns a
  32.   // pointer to the string (the length of the string is in the
  33.   // first sizeof(int) bytes of this string).   The implementer of this
  34.   // method should allocate the necessary memory for the string.
  35.   // The OWNERSHIP of this string is transferred to the caller of this method.
  36.  
  37.   void somrSetState(in string buf);
  38.  
  39.   // The reverse of Get State. It converts the given linear string into
  40.   // its internal state.  The ownership of buf stays with the caller.
  41.  
  42.  
  43.    #ifdef __SOMIDL__
  44.  
  45.    implementation
  46.    {
  47.       callstyle=idl;
  48.  
  49.       releaseorder: somrGetState, somrSetState;
  50.  
  51.       // Class Modifiers
  52.       majorversion = 2;
  53.       minorversion = 1;
  54.       filestem = linear;
  55.       // Internal Instance Variables
  56.  
  57.     };
  58.     #endif /* __SOMIDL__ */
  59.  
  60. };
  61. #endif  /* linear_idl */
  62.