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

  1. /*
  2.     File:        XMPCtr.h
  3.  
  4.     Contains:    Definition of XMPContainer
  5.  
  6.     Written by:    Vincent Lo, Tantek I. Celik
  7.  
  8.     Copyright:    ⌐ 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <1>      2/4/94    VL        first checked in
  13.         <16>      2/4/94    VL        Moved to PPC Header and began code cleanup.
  14.         <15>     1/12/94    VL        Init Changes
  15.         <14>     7/30/93    VL        XMPContainerName* should be
  16.                                     XMPContainerName.
  17.         <13>      7/6/93    PH        Inline con/destructor and fix
  18.                                     XMPContainerName
  19.         <12>     6/29/93    RCR        Moved typedefs to XMPTypes
  20.         <11>     5/27/93    VL        Made XMPContainer into an abstract base
  21.                                     class.
  22.         <10>     5/18/93    VL        Removed subType from constructor because
  23.                                     the class should encapsulate what the type
  24.                                     of the container is. Removed private field
  25.                                     fSubType.
  26.          <9>     4/29/93    VL        Make fContainer public by convention for
  27.                                     now.
  28.          <8>     4/29/93    VL        8.3 Name Change.
  29.          <8>     4/29/93    VL        8.3 Name Change.
  30.          <7>     4/29/93    VL        Adding private field fContRefCount.
  31.          <6>     4/22/93    VL        Modified ContainerTypes and
  32.                                     ContainerSubTypes. XMPContainerName* should
  33.                                     be XMPContainerName in GetName and SetName.
  34.                                     kDefaultDocument to kXMPDefaultDocument.
  35.                                     XMPStorageSytem to XMPStorageSystem.
  36.          <5>      4/9/93    VL        XMPContainer is a subclass of
  37.                                     XMPRefCntObject.
  38.          <4>      4/8/93    VL        Removed private fSession because it was
  39.                                     only an implementation detail.
  40.          <3>      4/7/93    VL        Moved parameters from Initialize to
  41.                                     constructor.
  42.          <2>      4/6/93    VL        Fixed up comments.
  43.          <1>      4/6/93    VL        first checked in
  44.  
  45.     To Do:
  46.         1) Document.h is included only for XMPDocumentID.
  47. */
  48.  
  49. #ifndef _XMPCTR_
  50. #define _XMPCTR_
  51.  
  52. #ifndef _XMPTYPES_
  53. #include "XMPTypes.h"
  54. #endif
  55.  
  56. #ifndef _REFCTOBJ_
  57. #include "RefCtObj.h"
  58. #endif
  59.  
  60. #ifndef _DOCUMENT_
  61. #include "Document.h"
  62. #endif
  63.  
  64. //==============================================================================
  65. // Constants
  66. //==============================================================================
  67. const XMPDocumentID    kXMPDefaultDocument = 1;
  68.  
  69. //==============================================================================
  70. // Classes used by this interface
  71. //==============================================================================
  72. class    XMPStorageSystem; 
  73. class    XMPDocument;
  74.  
  75. //==============================================================================
  76. // Classes defined in this interface
  77. //==============================================================================
  78. class    XMPContainer;
  79.  
  80. //==============================================================================
  81. // XMPContainer
  82. //==============================================================================
  83.  
  84. class XMPContainer : public XMPRefCntObject {
  85.  
  86. public:
  87.  
  88.     XMPVMethod    XMPStorageSystem* GetStorageSystem()
  89.         = 0;
  90.     
  91.     XMPVMethod    XMPContainerID GetID()
  92.         = 0;
  93.     
  94.     XMPVMethod    XMPContainerName GetName()
  95.         = 0;
  96.                 
  97.     XMPVMethod    void SetName(XMPContainerName name)
  98.         = 0;
  99.  
  100.     XMPVMethod XMPDocument* GetDocument(XMPDocumentID id)
  101.         = 0;
  102.  
  103.     XMPVMethod    void    IncrementRefCount()
  104.         = 0;
  105.  
  106.     XMPVMethod    void    Release()
  107.         = 0;
  108.                 
  109. public:    // private by convention
  110.  
  111.     XMPContainer() {}
  112.         
  113.     XMPVMethod ~XMPContainer() {}
  114.  
  115.     XMPVMethod void InitContainer(XMPStorageSystem* system, XMPContainerID id)
  116.         = 0;
  117.  
  118.     XMPVMethod XMPContainer* Create()
  119.         = 0;
  120.             
  121.     XMPVMethod XMPContainer* Open()
  122.         = 0;
  123.     
  124.     XMPVMethod XMPContainer* Close()
  125.         = 0;
  126.  
  127.     XMPVMethod XMPSize Purge(XMPSize size)
  128.         = 0;
  129.  
  130.     XMPVMethod XMPContainer* ReleaseDocument(XMPDocument* document)
  131.         = 0;
  132. };
  133.  
  134.  
  135. #endif    // _XMPCTR_
  136.