home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Translat.h
-
- Contains: Class definition for XMPAbsTranslation.
-
- Written by: Vincent Lo
-
- Copyright: ⌐ 1993 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <15> 2/4/94 VL Moved to PPC Header and began code cleanup.
- <14> 2/3/94 CG Added fHeap to XMPTypeSet.
- <13> 1/12/94 CG Removed XMPCategorySet.
- <12> 12/10/93 CG Still need "virtual" key word for ASLM?
- <11> 12/10/93 CG Added #define for ASLM class id for
- XMPTypeSet.
- <10> 12/9/93 VL Added toData and toDataSize to Translate.
- Added toView to overloaded Translate.
- <9> 11/1/93 Té added kXMPPlatformTypeSetID and one virtual
- method in the class definition for ASLM
- <8> 10/27/93 CC Added XMPPlatformTypeSet and
- XMPPlatformTypeSetIterator classes.
- <7> 9/24/93 JA Minor syntactic tweaks for THINK C++.
- <6> 9/16/93 CC XMPTypeSet: use XMPTypes instead of
- XMPOSTypes. Added XMPTypeSetIterator.
- XMPAbsTranslation: use XMPTypes instead of
- XMPOSTypes. Added
- GetISOTypeFromPlatformType and
- GetPlatformTypeFromISOType.
- <6> 9/8/93 CC XMPTypeSet: use XMPTypes instead of XMPOSTypes.
- Added XMPTypeSetIterator.
- XMPAbsTranslation: use XMPTypes instead of XMPOSTypes.
- Added GetISOTypeFromPlatformType and
- GetPlatformTypeFromISOType.
- <5> 7/1/93 VL Made XMPTranslation an abstract base class.
- <4> 4/29/93 VL 8.3 Name Change.
- <3> 4/23/93 VL Added Initialize and Purge.
- <2> 4/9/93 VL Include "XMPObject.h".
- <1> 4/9/93 VL first checked in
-
- To Do:
- */
-
- #ifndef _TRANSLAT_
- #define _TRANSLAT_
-
- #ifndef _XMPTYPES_
- #include "XMPTypes.h"
- #endif
-
- #ifndef _XMPOBJ_
- #include "XMPObj.h"
- #endif
-
- //=====================================================================================
- // Constants
- //=====================================================================================
- enum {
- kXMPCannotTranslate,
- kXMPCanTranslate,
- kXMPNative
- };
-
- typedef const enum {
- kXMPPlatformFileType,
- kXMPPlatformDataType
- } XMPPlatformTypeSpace;
-
- //=====================================================================================
- // Scalar Types
- //=====================================================================================
- typedef XMPPtr XMPTranslateMethod;
- typedef XMPULong XMPTranslateResult;
-
- //=====================================================================================
- // Classes defined in this interface
- //=====================================================================================
- class XMPTypeSetIterator;
- class XMPPlatformTypeSet;
- class XMPPlatformTypeSetIterator;
- class XMPAbsTranslation;
-
- //=====================================================================================
- // Classes used by this interface
- //=====================================================================================
- class XMPStorageUnitView;
- class XMPTypeSet;
-
- //=====================================================================================
- // Class XMPAbsTranslation
- //=====================================================================================
-
- class XMPAbsTranslation : public XMPObject
- {
- public:
-
- XMPAbsTranslation() : XMPObject() {}
-
- XMPVMethod ~XMPAbsTranslation() {}
-
- XMPVMethod void InitTranslation()
- = 0;
-
- XMPVMethod XMPSize Purge(XMPSize size)
- = 0;
-
- XMPVMethod XMPBoolean GetTranslateMethod(XMPTypeSet* givenTypes,
- XMPType nativeType,
- XMPTranslateResult* result,
- XMPTranslateMethod* howToTranslate)
- = 0;
-
- XMPVMethod XMPTypeSet* GetTranslationOf(XMPType fromType)
- = 0;
-
- XMPVMethod void Translate(XMPStorageUnitView* fromView,
- XMPTranslateMethod howToTranslate,
- XMPStorageUnitView* toView)
- = 0;
-
- XMPVMethod void Translate(XMPPtr fromData,
- XMPULong fromDataSize,
- XMPType givenType,
- XMPTranslateMethod howToTranslate,
- XMPPtr* toData,
- XMPULong* toDataSize)
- = 0;
-
- XMPVMethod XMPType GetISOTypeFromPlatformType(XMPPlatformType platformType,
- XMPPlatformTypeSpace typeSpace)
- = 0;
-
- XMPVMethod XMPPlatformType GetPlatformTypeFromISOType(XMPType type)
- = 0;
- };
-
- #ifdef PLATFORM_MACINTOSH
- #ifndef _TRANSLAM_
- #include "TranslaM.h"
- #endif
- #endif
-
- #endif // _TRANSLAT_
-