xref: /aoo41x/main/idl/inc/globals.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _GLOBALS_HXX
29*cdf0e10cSrcweir #define _GLOBALS_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #ifdef IDL_COMPILER
32*cdf0e10cSrcweir #include <hash.hxx>
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir #ifdef ICC
35*cdf0e10cSrcweir #undef _Export
36*cdf0e10cSrcweir #endif
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir class SvIdlWorkingBase;
39*cdf0e10cSrcweir class SvClassManager;
40*cdf0e10cSrcweir struct SvGlobalHashNames
41*cdf0e10cSrcweir {
42*cdf0e10cSrcweir     SvStringHashEntryRef MM_Name;
43*cdf0e10cSrcweir     SvStringHashEntryRef MM_module;
44*cdf0e10cSrcweir     SvStringHashEntryRef MM_interface;
45*cdf0e10cSrcweir     SvStringHashEntryRef MM_in;
46*cdf0e10cSrcweir     SvStringHashEntryRef MM_out;
47*cdf0e10cSrcweir     SvStringHashEntryRef MM_inout;
48*cdf0e10cSrcweir     SvStringHashEntryRef MM_String;
49*cdf0e10cSrcweir     SvStringHashEntryRef MM_UCHAR;
50*cdf0e10cSrcweir     SvStringHashEntryRef MM_USHORT;
51*cdf0e10cSrcweir     SvStringHashEntryRef MM_uuid;
52*cdf0e10cSrcweir     SvStringHashEntryRef MM_HelpContext;
53*cdf0e10cSrcweir     SvStringHashEntryRef MM_HelpText;
54*cdf0e10cSrcweir     SvStringHashEntryRef MM_void;
55*cdf0e10cSrcweir     SvStringHashEntryRef MM_shell;
56*cdf0e10cSrcweir     SvStringHashEntryRef MM_Get;
57*cdf0e10cSrcweir     SvStringHashEntryRef MM_Set;
58*cdf0e10cSrcweir     SvStringHashEntryRef MM_SlotId;
59*cdf0e10cSrcweir     SvStringHashEntryRef MM_HasCoreId;
60*cdf0e10cSrcweir     SvStringHashEntryRef MM_Cachable;
61*cdf0e10cSrcweir     SvStringHashEntryRef MM_Volatile;
62*cdf0e10cSrcweir     SvStringHashEntryRef MM_Toggle;
63*cdf0e10cSrcweir     SvStringHashEntryRef MM_AutoUpdate;
64*cdf0e10cSrcweir     SvStringHashEntryRef MM_Synchron;
65*cdf0e10cSrcweir     SvStringHashEntryRef MM_Asynchron;
66*cdf0e10cSrcweir     SvStringHashEntryRef MM_RecordPerSet;
67*cdf0e10cSrcweir     SvStringHashEntryRef MM_RecordPerItem;
68*cdf0e10cSrcweir     SvStringHashEntryRef MM_RecordManual;
69*cdf0e10cSrcweir     SvStringHashEntryRef MM_NoRecord;
70*cdf0e10cSrcweir     SvStringHashEntryRef MM_RecordAbsolute;
71*cdf0e10cSrcweir     SvStringHashEntryRef MM_enum;
72*cdf0e10cSrcweir     SvStringHashEntryRef MM_UINT16;
73*cdf0e10cSrcweir     SvStringHashEntryRef MM_INT16;
74*cdf0e10cSrcweir     SvStringHashEntryRef MM_UINT32;
75*cdf0e10cSrcweir     SvStringHashEntryRef MM_INT32;
76*cdf0e10cSrcweir     SvStringHashEntryRef MM_int;
77*cdf0e10cSrcweir     SvStringHashEntryRef MM_BOOL;
78*cdf0e10cSrcweir     SvStringHashEntryRef MM_char;
79*cdf0e10cSrcweir     SvStringHashEntryRef MM_BYTE;
80*cdf0e10cSrcweir     SvStringHashEntryRef MM_float;
81*cdf0e10cSrcweir     SvStringHashEntryRef MM_double;
82*cdf0e10cSrcweir     SvStringHashEntryRef MM_item;
83*cdf0e10cSrcweir     SvStringHashEntryRef MM_PseudoSlots;
84*cdf0e10cSrcweir     SvStringHashEntryRef MM_map;
85*cdf0e10cSrcweir     SvStringHashEntryRef MM_Default;
86*cdf0e10cSrcweir     SvStringHashEntryRef MM_HelpFile;
87*cdf0e10cSrcweir     SvStringHashEntryRef MM_Version;
88*cdf0e10cSrcweir     SvStringHashEntryRef MM_import;
89*cdf0e10cSrcweir     SvStringHashEntryRef MM_SlotIdFile;
90*cdf0e10cSrcweir     SvStringHashEntryRef MM_SvName;
91*cdf0e10cSrcweir     SvStringHashEntryRef MM_SbxName;
92*cdf0e10cSrcweir     SvStringHashEntryRef MM_ItemName;
93*cdf0e10cSrcweir     SvStringHashEntryRef MM_OdlName;
94*cdf0e10cSrcweir     SvStringHashEntryRef MM_include;
95*cdf0e10cSrcweir     SvStringHashEntryRef MM_ExecMethod;
96*cdf0e10cSrcweir     SvStringHashEntryRef MM_StateMethod;
97*cdf0e10cSrcweir     SvStringHashEntryRef MM_GroupId;
98*cdf0e10cSrcweir     SvStringHashEntryRef MM_HasDialog;
99*cdf0e10cSrcweir     SvStringHashEntryRef MM_TypeLibFile;
100*cdf0e10cSrcweir     SvStringHashEntryRef MM_Export;
101*cdf0e10cSrcweir     SvStringHashEntryRef MM_Automation;
102*cdf0e10cSrcweir     SvStringHashEntryRef MM_PseudoPrefix;
103*cdf0e10cSrcweir     SvStringHashEntryRef MM_define;
104*cdf0e10cSrcweir     SvStringHashEntryRef MM_MenuConfig;
105*cdf0e10cSrcweir     SvStringHashEntryRef MM_ToolBoxConfig;
106*cdf0e10cSrcweir     SvStringHashEntryRef MM_StatusBarConfig;
107*cdf0e10cSrcweir     SvStringHashEntryRef MM_AccelConfig;
108*cdf0e10cSrcweir     SvStringHashEntryRef MM_AllConfig;
109*cdf0e10cSrcweir     SvStringHashEntryRef MM_FastCall;
110*cdf0e10cSrcweir     SvStringHashEntryRef MM_SbxObject;
111*cdf0e10cSrcweir     SvStringHashEntryRef MM_Container;
112*cdf0e10cSrcweir     SvStringHashEntryRef MM_ImageRotation;
113*cdf0e10cSrcweir     SvStringHashEntryRef MM_ImageReflection;
114*cdf0e10cSrcweir     SvStringHashEntryRef MM_IsCollection;
115*cdf0e10cSrcweir     SvStringHashEntryRef MM_ReadOnlyDoc;
116*cdf0e10cSrcweir     SvStringHashEntryRef MM_ConfigName;
117*cdf0e10cSrcweir     SvStringHashEntryRef MM_union;
118*cdf0e10cSrcweir     SvStringHashEntryRef MM_struct;
119*cdf0e10cSrcweir     SvStringHashEntryRef MM_typedef;
120*cdf0e10cSrcweir     SvStringHashEntryRef MM_Readonly;
121*cdf0e10cSrcweir     SvStringHashEntryRef MM_SlotType;
122*cdf0e10cSrcweir     SvStringHashEntryRef MM_ModulePrefix;
123*cdf0e10cSrcweir 	SvStringHashEntryRef MM_DisableFlags;
124*cdf0e10cSrcweir     SvStringHashEntryRef MM_Hidden;
125*cdf0e10cSrcweir     SvStringHashEntryRef MM_Description;
126*cdf0e10cSrcweir     SvStringHashEntryRef MM_UnoName;
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir     SvGlobalHashNames();
129*cdf0e10cSrcweir };
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir class IdlDll
132*cdf0e10cSrcweir {
133*cdf0e10cSrcweir public:
134*cdf0e10cSrcweir     SvStringHashTable * pHashTable;
135*cdf0e10cSrcweir     SvClassManager    * pClassMgr;
136*cdf0e10cSrcweir     SvGlobalHashNames * pGlobalNames;
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir                 IdlDll();
139*cdf0e10cSrcweir                 ~IdlDll();
140*cdf0e10cSrcweir };
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir IdlDll * GetIdlApp();
143*cdf0e10cSrcweir #define IDLAPP GetIdlApp()
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir #define SV_GLOBAL_HASH_ACCESS( Name )                           \
146*cdf0e10cSrcweir     if( !IDLAPP->pGlobalNames )                                 \
147*cdf0e10cSrcweir         IDLAPP->pGlobalNames = new SvGlobalHashNames();         \
148*cdf0e10cSrcweir     return IDLAPP->pGlobalNames->MM_##Name;
149*cdf0e10cSrcweir 
150*cdf0e10cSrcweir #define HASH_INLINE( Name )                                             \
151*cdf0e10cSrcweir inline SvStringHashEntry * SvHash_##Name() { SV_GLOBAL_HASH_ACCESS( Name ) }
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir HASH_INLINE(Name)
154*cdf0e10cSrcweir HASH_INLINE(module)
155*cdf0e10cSrcweir HASH_INLINE(interface)
156*cdf0e10cSrcweir HASH_INLINE(in)
157*cdf0e10cSrcweir HASH_INLINE(out)
158*cdf0e10cSrcweir HASH_INLINE(inout)
159*cdf0e10cSrcweir HASH_INLINE(String)
160*cdf0e10cSrcweir HASH_INLINE(UCHAR)
161*cdf0e10cSrcweir HASH_INLINE(USHORT)
162*cdf0e10cSrcweir HASH_INLINE(uuid)
163*cdf0e10cSrcweir HASH_INLINE(HelpContext)
164*cdf0e10cSrcweir HASH_INLINE(HelpText)
165*cdf0e10cSrcweir HASH_INLINE(void)
166*cdf0e10cSrcweir HASH_INLINE(shell)
167*cdf0e10cSrcweir HASH_INLINE(Get)
168*cdf0e10cSrcweir HASH_INLINE(Set)
169*cdf0e10cSrcweir HASH_INLINE(SlotId)
170*cdf0e10cSrcweir HASH_INLINE(HasCoreId)
171*cdf0e10cSrcweir HASH_INLINE(Cachable)
172*cdf0e10cSrcweir HASH_INLINE(Volatile)
173*cdf0e10cSrcweir HASH_INLINE(Toggle)
174*cdf0e10cSrcweir HASH_INLINE(AutoUpdate)
175*cdf0e10cSrcweir HASH_INLINE(Synchron)
176*cdf0e10cSrcweir HASH_INLINE(Asynchron)
177*cdf0e10cSrcweir HASH_INLINE(RecordPerItem)
178*cdf0e10cSrcweir HASH_INLINE(RecordPerSet)
179*cdf0e10cSrcweir HASH_INLINE(RecordManual)
180*cdf0e10cSrcweir HASH_INLINE(NoRecord)
181*cdf0e10cSrcweir HASH_INLINE(RecordAbsolute)
182*cdf0e10cSrcweir HASH_INLINE(enum)
183*cdf0e10cSrcweir HASH_INLINE(UINT16)
184*cdf0e10cSrcweir HASH_INLINE(INT16)
185*cdf0e10cSrcweir HASH_INLINE(UINT32)
186*cdf0e10cSrcweir HASH_INLINE(INT32)
187*cdf0e10cSrcweir HASH_INLINE(int)
188*cdf0e10cSrcweir HASH_INLINE(BOOL)
189*cdf0e10cSrcweir HASH_INLINE(char)
190*cdf0e10cSrcweir HASH_INLINE(BYTE)
191*cdf0e10cSrcweir HASH_INLINE(item)
192*cdf0e10cSrcweir HASH_INLINE(PseudoSlots)
193*cdf0e10cSrcweir HASH_INLINE(map)
194*cdf0e10cSrcweir HASH_INLINE(Default)
195*cdf0e10cSrcweir HASH_INLINE(HelpFile)
196*cdf0e10cSrcweir HASH_INLINE(Version)
197*cdf0e10cSrcweir HASH_INLINE(import)
198*cdf0e10cSrcweir HASH_INLINE(SlotIdFile)
199*cdf0e10cSrcweir HASH_INLINE(SvName)
200*cdf0e10cSrcweir HASH_INLINE(SbxName)
201*cdf0e10cSrcweir HASH_INLINE(ItemName)
202*cdf0e10cSrcweir HASH_INLINE(OdlName)
203*cdf0e10cSrcweir HASH_INLINE(include)
204*cdf0e10cSrcweir HASH_INLINE(ExecMethod)
205*cdf0e10cSrcweir HASH_INLINE(StateMethod)
206*cdf0e10cSrcweir HASH_INLINE(GroupId)
207*cdf0e10cSrcweir HASH_INLINE(float)
208*cdf0e10cSrcweir HASH_INLINE(double)
209*cdf0e10cSrcweir HASH_INLINE(HasDialog)
210*cdf0e10cSrcweir HASH_INLINE(TypeLibFile)
211*cdf0e10cSrcweir HASH_INLINE(Export)
212*cdf0e10cSrcweir HASH_INLINE(Automation)
213*cdf0e10cSrcweir HASH_INLINE(PseudoPrefix)
214*cdf0e10cSrcweir HASH_INLINE(define)
215*cdf0e10cSrcweir HASH_INLINE(MenuConfig)
216*cdf0e10cSrcweir HASH_INLINE(ToolBoxConfig)
217*cdf0e10cSrcweir HASH_INLINE(StatusBarConfig)
218*cdf0e10cSrcweir HASH_INLINE(AccelConfig)
219*cdf0e10cSrcweir HASH_INLINE(AllConfig)
220*cdf0e10cSrcweir HASH_INLINE(FastCall)
221*cdf0e10cSrcweir HASH_INLINE(SbxObject)
222*cdf0e10cSrcweir HASH_INLINE(Container)
223*cdf0e10cSrcweir HASH_INLINE(ImageRotation)
224*cdf0e10cSrcweir HASH_INLINE(ImageReflection)
225*cdf0e10cSrcweir HASH_INLINE(IsCollection)
226*cdf0e10cSrcweir HASH_INLINE(ReadOnlyDoc)
227*cdf0e10cSrcweir HASH_INLINE(ConfigName)
228*cdf0e10cSrcweir HASH_INLINE(union)
229*cdf0e10cSrcweir HASH_INLINE(struct)
230*cdf0e10cSrcweir HASH_INLINE(typedef)
231*cdf0e10cSrcweir HASH_INLINE(Readonly)
232*cdf0e10cSrcweir HASH_INLINE(SlotType)
233*cdf0e10cSrcweir HASH_INLINE(ModulePrefix)
234*cdf0e10cSrcweir HASH_INLINE(DisableFlags)
235*cdf0e10cSrcweir HASH_INLINE(Hidden)
236*cdf0e10cSrcweir HASH_INLINE(Description)
237*cdf0e10cSrcweir HASH_INLINE(UnoName)
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir #endif // IDL_COMPILER
241*cdf0e10cSrcweir #endif // _GLOBALS_HXX
242*cdf0e10cSrcweir 
243