InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GUID.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Jonathan W. Brown
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Note: Run 'guidgen.exe' on Windows if you need to generate GUIDs
24 //
25 //========================================================================================
26 
27 #ifndef __GUIDTypes__
28 #define __GUIDTypes__
29 
30  #ifdef __ODFRC__
31 
32  type GuidType
33  {
34  longint ;
35  integer ;
36  integer ;
37  array [8]
38  {
39  byte ;
40  } ;
41  } ;
42 
43  #define DECLARE_GUID( guid, kguid )
44 
45  #else //__ODFRC__
46 
47  #if defined (MACINTOSH) || defined (WASM)
48 
49  #ifndef GUID_DEFINED
50  #define GUID_DEFINED
51 
52  struct GUID {
53  uint32 Data1;
54  uint16 Data2;
55  uint16 Data3;
56  uchar Data4[8];
57  bool16 operator==( const GUID& guid ) const
58  { return ( Data1 == guid.Data1 && Data2 == guid.Data2 &&
59  Data3 == guid.Data3 && 0 == memcmp( Data4, guid.Data4, sizeof( Data4 ) ) ) ; }
60  bool16 operator!=( const GUID& guid ) const
61  { return !( *this == guid ) ; }
62  } ;
63 
64  #endif // !GUID_DEFINED
65 
66  #endif //MACINTOSH
67 
68  #define DECLARE_GUID( guid, kguid ) \
69  static const GUID guid = kguid
70 
71  class IPMStream ;
72  void ReadWriteGUID( IPMStream* s, GUID& guid ) ;
73 
74 #endif
75 
76 #define kInvalid_CLSID { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } }
77  DECLARE_GUID( k_invalid_CLSID, kInvalid_CLSID ) ; //Use DECLARE_GUID for any GUID that is referenced in C++ code
78 
79 #endif //__GUIDTypes__