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