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

  1. /*
  2.     File:        PstObj.h
  3.  
  4.     Contains:    Class definition for XMPPersistentObject
  5.  
  6.     Written by:    Vincent Lo
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <12>     1/27/94    VL        Added ReleaseAll.
  13.         <11>     1/11/94    Té        Init... changes
  14.         <10>    12/14/93    Té        more InitPersistentObject changes.
  15.                                     Internalize, Initialize went away.
  16.          <9>    12/13/93    Té        InitPersistentObject changes
  17.          <8>    11/18/93    Té        make InitializePersistent & Externalize not
  18.                                     pure virtual
  19.          <7>     9/29/93    VL        Added InitializePersistent.
  20.          <6>      8/9/93    NP        Added class id string.
  21.          <5>     7/21/93    NP        Added a virtual keyword (temporary
  22.                                      for ASLM).
  23.          <4>     4/29/93    VL        8.3 Name Change.
  24.          <3>      4/9/93    VL        Added Constructor and Destructor.
  25.          <2>      4/9/93    VL        Added fID and fSU private fields.
  26.          <1>      4/8/93    VL        first checked in
  27.  
  28. */
  29.  
  30. #ifndef _PSTOBJ_
  31. #define _PSTOBJ_
  32.  
  33. #ifndef _PLFMDEF_
  34. #include "PlfmDef.h"
  35. #endif
  36.  
  37. #ifndef _XMPTYPES_
  38. #include "XMPTypes.h"
  39. #endif
  40.  
  41. #ifndef _REFCTOBJ_
  42. #include "RefCtObj.h"
  43. #endif
  44.  
  45. //==============================================================================
  46. // Theory of Operation
  47. //==============================================================================
  48.  
  49. /*
  50.     This file defines class XMPPersistentObject.  This class is the common base
  51.     class for all XMP classes whose objects require persistent storage.
  52. */
  53.  
  54. //==============================================================================
  55. // Classes defined in this interface
  56. //==============================================================================
  57.  
  58. class XMPPersistentObject;
  59.  
  60. //==============================================================================
  61. // Classes used by this interface
  62. //==============================================================================
  63.  
  64. class XMPStorageUnit;
  65.  
  66. //==============================================================================
  67. // XMPObject
  68. //==============================================================================
  69.  
  70. #define kXMPPersistentObjectID "appl:persistentobject$class,1.0.0"
  71.  
  72. class XMPPersistentObject : public XMPRefCntObject
  73. {
  74. public:
  75.  
  76.     XMPPersistentObject();
  77.     
  78.     virtual ~XMPPersistentObject();
  79.     
  80.     XMPNVMethod void    InitPersistentObject(XMPStorageUnit* storageUnit);
  81.     XMPNVMethod void    InitPersistentObjectFromStorage(XMPStorageUnit* storageUnit);
  82.         
  83.     XMPVMethod    void    ReleaseAll();
  84.     
  85.     XMPVMethod    void    Externalize();
  86.                                     
  87.     XMPVMethod    XMPStorageUnit* GetStorageUnit();
  88.     
  89.         // Returns the storage unit of this object.
  90.     
  91.     XMPVMethod    XMPID     GetID();
  92.     
  93.         // Returns the ID of the object.
  94.         
  95. private:
  96.  
  97.     XMPStorageUnit*    fSU;
  98.     XMPID            fID;
  99. };
  100.  
  101. #endif // _PSTOBJ_
  102.