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

  1. /*
  2.     File:        XMPObj.h
  3.  
  4.     Contains:    Class definition for XMPObject
  5.  
  6.     Written by:    Joshua Susser
  7.  
  8.     Protocols:    Extensions
  9.  
  10.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  11.  
  12.     Change History (most recent first):
  13.  
  14.         <11>     1/11/94    Té        Init... changes
  15.         <10>    12/15/93    Té        InitObject changes
  16.          <9>      8/9/93    NP        Added class id string.
  17.          <8>     7/21/93    NP        Added a virtual keyword (temporary for
  18.                                     ASLM).
  19.          <7>     6/10/93    NP        Changed XMPName to XMPType.
  20.          <6>      5/4/93    NP        Unvirtualed Initialize.
  21.          <5>     4/29/93    VL        8.3 Name Change.
  22.          <3>     4/12/93    VL        Made functions public.
  23.          <2>      4/8/93    VL        Added Purge and Initialize.
  24.          <1>      4/6/93    VL        first checked in
  25.  
  26. */
  27.  
  28. #ifndef _XMPOBJ_
  29. #define _XMPOBJ_
  30.  
  31. #ifndef _PLFMDEF_
  32. #include "PlfmDef.h"
  33. #endif
  34.  
  35. #ifndef _XMPTYPES_
  36. #include "XMPTypes.h"
  37. #endif
  38.  
  39. //==============================================================================
  40. // Theory of Operation
  41. //==============================================================================
  42.  
  43. /*
  44.     This file defines class XMPObject.  This class is the common base class
  45.     for most XMP classes.  It provides for extensibility through the
  46.     Extensions protocol.
  47. */
  48.  
  49. //==============================================================================
  50. // Classes defined in this interface
  51. //==============================================================================
  52.  
  53. class XMPObject;
  54.  
  55. //==============================================================================
  56. // Classes used by this interface
  57. //==============================================================================
  58.  
  59. class XMPExtension;
  60.  
  61. //==============================================================================
  62. // XMPObject
  63. //==============================================================================
  64.  
  65. #define kXMPObjectID "appl:object$class,1.0.0"
  66.  
  67. class XMPObject
  68. {
  69.  
  70. public:
  71.  
  72.     XMPObject();
  73.     
  74.     virtual ~XMPObject();
  75.  
  76.     XMPNVMethod    void    InitObject();
  77.     
  78.     //-------------------------------------------------------------------------
  79.     // From Extensions protocol
  80.     //-------------------------------------------------------------------------
  81.  
  82.     XMPVMethod XMPBoolean    HasExtension(XMPType extensionName);
  83.  
  84.         // answer whether this object supports the specified extension interface
  85.     
  86.     XMPVMethod XMPExtension*    GetExtension(XMPType extensionName);
  87.     
  88.         // return the specified extension interface
  89.  
  90.     XMPVMethod void            ReleaseExtension(XMPExtension* extension);
  91.  
  92.         // release resources associated with the specified extension interface.
  93.         // may count references if necessary.
  94.  
  95.     //-------------------------------------------------------------------------
  96.     // From Memory protocol
  97.     //-------------------------------------------------------------------------
  98.     
  99.     XMPVMethod    XMPSize    Purge(XMPSize size)
  100.         = 0;
  101.     
  102.         // Get rid of any unnecessary memory.
  103.         
  104. protected:
  105.     XMPBoolean fInitialized;
  106. };
  107.  
  108. #endif // _XMPOBJ_
  109.