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