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

  1. /*
  2.     File:        Extensn.h
  3.  
  4.     Contains:    Interface to XMPExtension class
  5.  
  6.     Written by:    Nick Pilch
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <7>      2/9/94    NP        Tiger Team cleanup.
  13.          <6>     1/14/94    NP        Init changes.
  14.          <5>      8/9/93    NP        Added class id string.
  15.          <4>     7/21/93    NP        Added a virtual keyword (temporary for
  16.                                     ASLM).
  17.          <3>     4/28/93    NP        File name changes.
  18.          <2>     4/23/93    NP        Fixed constructor.
  19.          <1>     4/23/93    NP        first checked in
  20.  
  21.     To Do:
  22. */
  23.  
  24. #ifndef _EXTENSN_
  25. #define _EXTENSN_
  26.  
  27. #ifndef _PLFMDEF_
  28. #include "PlfmDef.h"
  29. #endif
  30.  
  31. //==============================================================================
  32. // Theory of Operation
  33. //==============================================================================
  34.  
  35. /*
  36.     XMPExtension is the abstract base class from which object extension interfaces
  37.     are derived.  The base class itself has minimal behavior.  It knows which
  38.     object it is an extension of, and how to release resources in itself and in
  39.     its object.  Further behavior should be implemented in derived classes.
  40. */
  41.  
  42. //==============================================================================
  43. // Classes defined in this interface
  44. //==============================================================================
  45.  
  46. class XMPExtension;
  47.  
  48. //==============================================================================
  49. // Classes used by this interface
  50. //==============================================================================
  51.  
  52. class XMPObject;
  53.  
  54. //==============================================================================
  55. // XMPExtension
  56. //==============================================================================
  57.  
  58. #define kXMPExtensionID "appl:extension$class,1.0.0"
  59.  
  60. class XMPExtension
  61. {
  62.   public:
  63.  
  64.     //-------------------------------------------------------------------------
  65.     // From Extensions protocol
  66.     //-------------------------------------------------------------------------
  67.  
  68.     XMPVMethod XMPObject*    GetBase();    
  69.         
  70.     XMPVMethod void            Release()
  71.         = 0;
  72.         
  73.   protected:
  74.  
  75.     XMPExtension();
  76.     XMPNVMethod void InitExtension(XMPObject* base);
  77.     virtual ~XMPExtension();
  78.  
  79.   private:
  80.  
  81.     XMPObject* fBase;
  82. };
  83.  
  84.  
  85. #endif // _EXTENSN_
  86.