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

  1. /*
  2.     File:        Translat.h
  3.  
  4.     Contains:    Class definition for XMPAbsTranslation.
  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.         <15>      2/4/94    VL        Moved to PPC Header and began code cleanup.
  13.         <14>      2/3/94    CG        Added fHeap to XMPTypeSet.
  14.         <13>     1/12/94    CG        Removed XMPCategorySet.
  15.         <12>    12/10/93    CG        Still need "virtual" key word for ASLM?
  16.         <11>    12/10/93    CG        Added #define for ASLM class id for
  17.                                     XMPTypeSet.
  18.         <10>     12/9/93    VL        Added toData and toDataSize to Translate.
  19.                                     Added toView to overloaded Translate.
  20.          <9>     11/1/93    Té        added kXMPPlatformTypeSetID and one virtual
  21.                                     method in the class definition for ASLM
  22.          <8>    10/27/93    CC        Added XMPPlatformTypeSet and
  23.                                     XMPPlatformTypeSetIterator classes.
  24.          <7>     9/24/93    JA        Minor syntactic tweaks for THINK C++.
  25.          <6>     9/16/93    CC        XMPTypeSet: use XMPTypes instead of
  26.                                     XMPOSTypes. Added XMPTypeSetIterator.
  27.                                     XMPAbsTranslation: use XMPTypes instead of
  28.                                     XMPOSTypes. Added
  29.                                     GetISOTypeFromPlatformType and
  30.                                     GetPlatformTypeFromISOType.
  31.          <6>      9/8/93    CC        XMPTypeSet: use XMPTypes instead of XMPOSTypes.
  32.                                      Added XMPTypeSetIterator. 
  33.                                      XMPAbsTranslation: use XMPTypes instead of XMPOSTypes.
  34.                                     Added GetISOTypeFromPlatformType and
  35.                                     GetPlatformTypeFromISOType.
  36.          <5>      7/1/93    VL        Made XMPTranslation an abstract base class.
  37.          <4>     4/29/93    VL        8.3 Name Change.
  38.          <3>     4/23/93    VL        Added Initialize and Purge.
  39.          <2>      4/9/93    VL        Include "XMPObject.h".
  40.          <1>      4/9/93    VL        first checked in
  41.  
  42.     To Do:
  43. */
  44.  
  45. #ifndef _TRANSLAT_
  46. #define _TRANSLAT_
  47.  
  48. #ifndef _XMPTYPES_
  49. #include "XMPTypes.h"
  50. #endif
  51.  
  52. #ifndef _XMPOBJ_
  53. #include "XMPObj.h"
  54. #endif
  55.  
  56. //=====================================================================================
  57. // Constants
  58. //=====================================================================================
  59. enum {
  60.     kXMPCannotTranslate,
  61.     kXMPCanTranslate,
  62.     kXMPNative
  63. };
  64.  
  65. typedef const enum {
  66.     kXMPPlatformFileType,
  67.     kXMPPlatformDataType
  68. } XMPPlatformTypeSpace;
  69.  
  70. //=====================================================================================
  71. // Scalar Types
  72. //=====================================================================================
  73. typedef XMPPtr        XMPTranslateMethod;
  74. typedef XMPULong    XMPTranslateResult;
  75.  
  76. //=====================================================================================
  77. // Classes defined in this interface
  78. //=====================================================================================
  79. class XMPTypeSetIterator;
  80. class XMPPlatformTypeSet;
  81. class XMPPlatformTypeSetIterator;
  82. class XMPAbsTranslation;
  83.  
  84. //=====================================================================================
  85. // Classes used by this interface
  86. //=====================================================================================
  87. class XMPStorageUnitView;
  88. class XMPTypeSet;
  89.  
  90. //=====================================================================================
  91. // Class XMPAbsTranslation
  92. //=====================================================================================
  93.  
  94. class XMPAbsTranslation : public XMPObject
  95. {
  96. public:
  97.     
  98.     XMPAbsTranslation() : XMPObject() {}
  99.         
  100.     XMPVMethod ~XMPAbsTranslation() {}
  101.     
  102.     XMPVMethod void InitTranslation()
  103.         = 0;
  104.  
  105.     XMPVMethod XMPSize Purge(XMPSize size)
  106.         = 0;
  107.     
  108.     XMPVMethod XMPBoolean GetTranslateMethod(XMPTypeSet* givenTypes, 
  109.                                             XMPType nativeType,
  110.                                             XMPTranslateResult*    result,
  111.                                             XMPTranslateMethod* howToTranslate)
  112.         = 0;
  113.  
  114.     XMPVMethod XMPTypeSet*  GetTranslationOf(XMPType fromType)
  115.         = 0;
  116.                                             
  117.     XMPVMethod void Translate(XMPStorageUnitView* fromView,
  118.                             XMPTranslateMethod howToTranslate,
  119.                             XMPStorageUnitView* toView)
  120.         = 0;
  121.         
  122.     XMPVMethod void Translate(XMPPtr fromData, 
  123.                             XMPULong fromDataSize,
  124.                             XMPType givenType,
  125.                             XMPTranslateMethod howToTranslate,
  126.                             XMPPtr* toData,
  127.                             XMPULong* toDataSize)
  128.         = 0;
  129.         
  130.     XMPVMethod XMPType GetISOTypeFromPlatformType(XMPPlatformType platformType,
  131.                                                  XMPPlatformTypeSpace typeSpace)
  132.         = 0;
  133.  
  134.     XMPVMethod XMPPlatformType GetPlatformTypeFromISOType(XMPType type)
  135.         = 0;
  136. };
  137.  
  138. #ifdef PLATFORM_MACINTOSH
  139. #ifndef _TRANSLAM_
  140. #include "TranslaM.h"
  141. #endif
  142. #endif
  143.  
  144. #endif // _TRANSLAT_
  145.