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

  1. /*
  2.     File:        RefCtObj.h
  3.  
  4.     Contains:    Class definition for XMPRefCntObject
  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.          <9>     1/11/94    Té        Init... changes
  13.          <8>    12/15/93    Té        InitObject changes
  14.          <7>      8/9/93    NP        Added class id string.
  15.          <6>      8/6/93    VL        Added GetRefCount.
  16.          <5>     7/21/93    NP        Added a virtual keyword (temporary for
  17.                                     ASLM).
  18.          <4>     6/16/93    VL        Added protected field fRefCount.
  19.          <3>     4/29/93    VL        8.3 Name Change.
  20.          <1>      4/8/93    VL        first checked in
  21.  
  22.     To Do:
  23. */
  24.  
  25. #ifndef _REFCTOBJ_
  26. #define _REFCTOBJ_
  27.  
  28. #ifndef _PLFMDEF_
  29. #include "PlfmDef.h"
  30. #endif
  31.  
  32. #ifndef _XMPTYPES_
  33. #include "XMPTypes.h"
  34. #endif
  35.  
  36. #ifndef _XMPOBJ_
  37. #include "XMPObj.h"
  38. #endif
  39.  
  40. //==============================================================================
  41. // Theory of Operation
  42. //==============================================================================
  43.  
  44. /*
  45.     This file defines class XMPRefCntObject.  This class is the common base class
  46.     for all XMP classes whose objects require ref counting.
  47. */
  48.  
  49. //==============================================================================
  50. // Classes defined in this interface
  51. //==============================================================================
  52.  
  53. class XMPRefCntObject;
  54.  
  55. //==============================================================================
  56. // XMPObject
  57. //==============================================================================
  58.  
  59. #define kXMPRefCntObjectID "appl:refcntobject$class,1.0.0"
  60.  
  61. class XMPRefCntObject : public XMPObject
  62. {
  63.  
  64. public:
  65.  
  66.     XMPRefCntObject();
  67.     
  68.     virtual ~XMPRefCntObject();
  69.     
  70.     XMPNVMethod void    InitRefCntObject();
  71.     
  72.     //-------------------------------------------------------------------------
  73.     // From ObjectStorage protocol
  74.     //-------------------------------------------------------------------------
  75.  
  76.     XMPVMethod    void    IncrementRefCount();
  77.     
  78.         // Increments the ref count for the object.
  79.     
  80.     XMPVMethod    void    Release();
  81.     
  82.         // Decrements the ref count for the object.
  83.         
  84.     XMPVMethod    XMPULong    GetRefCount();
  85.         
  86. protected:
  87.  
  88.     XMPULong    fRefCount;
  89.         
  90.         
  91. };
  92.  
  93. #endif // _REFCTOBJ_
  94.