InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDFactory.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Michael Burbidge
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 
24 #ifndef __IDFactory_h__
25 #define __IDFactory_h__
26 
27 // ---------------------------------------------------------------------------------------
28 // ----- Object model ids are registered in the debug build, but by default are not
29 // registered in the release build. Localization can change the #undef to a
30 // #define in the non-debug case below to get ids registered in the release
31 // build. [amb]
32 //
33 #ifdef DEBUG
34 #define REGISTER_OM_IDS
35 #else
36 #undef REGISTER_OM_IDS
37 #endif
38 //
39 // ---------------------------------------------------------------------------------------
40 
41 
42 #ifdef REGISTER_OM_IDS
43 
44 #else
45  #ifdef __ODFRC__
46 #endif
47 #endif
48 
49 #define START_IDS()
50 #define END_IDS()
51 
52 
53 #ifndef __ODFRC__
54 
55 
60 class IDFactory
61 {
62 public:
68  IDFactory(const int32& space, const char* name, const int32& id);
69 
71  static void InstallIDs(PluginID ownerComponent);
72 
73 private:
74  IDFactory* fNextID;
75  const char* fName;
76  int32 fSpace;
77  int32 fId;
78 
79  static IDFactory* fgFirstID;
80 };
81 
82 #endif
83 
84 #else // REGISTER_OM_IDS
85 
91 #else
92  #ifdef __ODFRC__
93 #endif
94 #endif
95 
100 #define START_IDS()
101 #define END_IDS()
102 
103 #endif // REGISTER_OM_IDS
104 
105 #endif // __IDFactory_h__