home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / bento / headers / linkspec.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  2.7 KB  |  92 lines

  1. /*
  2.     File:        LinkSpec.h
  3.  
  4.     Contains:    Class definition for XMPAbsLinkSpec.
  5.  
  6.     Written by:    Craig Carper 
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>     12/8/93    CC        CopyToProperty -> WriteToProperty
  13.                                     CopyFromProperty -> ReadFromProperty
  14.          <1>    11/15/93    CC        first checked in
  15.     To Do:
  16. */
  17.  
  18. #ifndef _LINKSPEC_
  19. #define _LINKSPEC_
  20.  
  21. #ifndef _PLFMDEF_
  22. #include "PlfmDef.h"
  23. #endif
  24.  
  25. #ifndef _XMPTYPES_
  26. #include "XMPTypes.h"
  27. #endif
  28.  
  29. //=====================================================================================
  30. // Theory of Operation
  31. //=====================================================================================
  32.  
  33. /*
  34.     LinkSpecs are created by a part to indicate that content may be pasted as a link.
  35.     A part advertises the ability to source a link by calling its draft to create a
  36.     link spec and then putting that link spec on the clipboard (in a standard property
  37.     in the root storage unit of the clipboard).  Once it has created the link spec,
  38.     the source part should call CopyToProperty() to write the link spec as a value,
  39.     after focusing the clipboard storage unit to the appropriate property.  The 
  40.     receiving part should create a LinkSpec object and call CopyFromProperty() to
  41.     initialize the object from the clipboard storage unit.  The receiving part calls
  42.     its draft's GetLink() method to get the actual link from the LinkSpec.
  43. */
  44.  
  45. //==============================================================================
  46. // Classes defined in this interface
  47. //==============================================================================
  48.  
  49. class XMPAbsLinkSpec;
  50.  
  51. //=====================================================================================
  52. // Classes used by this interface
  53. //=====================================================================================
  54.  
  55. class XMPStorageUnit;
  56.  
  57. //==============================================================================
  58. // XMPAbsLinkSpec
  59. //==============================================================================
  60.  
  61. class XMPAbsLinkSpec
  62. {
  63. public:
  64.  
  65.     // ----------------------------------------
  66.     // Parts may call
  67.  
  68.     XMPAbsLinkSpec() {};
  69.     
  70.     XMPVMethod ~XMPAbsLinkSpec() {};
  71.     
  72.     XMPVMethod void WriteToProperty(XMPStorageUnit* su)
  73.         = 0;
  74.  
  75.         // Write this object into the pre-focused storage unit.
  76.         // The argument storage unit must be pre-focused to a property.
  77.     
  78.     XMPVMethod void ReadFromProperty(XMPStorageUnit* su)
  79.         = 0;
  80.  
  81.         // Initialize this object from the value in the pre-focused storage unit.
  82.         // The argument storage unit must be pre-focused to a property containing
  83.         // a link spec value.
  84.  
  85. };
  86.  
  87. #ifndef _LINKSPEM_
  88. #include "LinkSpeM.h"
  89. #endif
  90.  
  91. #endif
  92.