xref: /aoo4110/main/idl/source/prj/globals.cxx (revision b1cdbd2c)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_idl.hxx"
26 
27 /****************** I N C L U D E S **************************************/
28 #include <tools/shl.hxx>
29 
30 #include <globals.hxx>
31 #include <database.hxx>
32 
33 /****************** G L O B A L S ****************************************/
GetIdlApp()34 IdlDll * GetIdlApp()
35 {
36     if( !(*(IdlDll**)GetAppData(SHL_IDL)) )
37     {
38         (*(IdlDll**)GetAppData(SHL_IDL)) = new IdlDll();
39         // Temporaer, sonst nur wenn Compiler
40         //GetIdlApp()->pHashTable      = new SvStringHashTable( 2801 );
41         //GetIdlApp()->pGlobalNames    = new SvGlobalHashNames();
42     }
43     return (*(IdlDll**)GetAppData(SHL_IDL));
44 }
45 
IdlDll()46 IdlDll::IdlDll()
47     : pHashTable( NULL )
48     , pClassMgr( NULL )
49     , pGlobalNames( NULL )
50 
51 {
52     pClassMgr   = new SvClassManager();
53     // File OBJECT.HXX:
54     pClassMgr->SV_CLASS_REGISTER( SvMetaAttribute );
55     pClassMgr->SV_CLASS_REGISTER( SvMetaClass );
56     //File SLOT.HXX:
57     pClassMgr->SV_CLASS_REGISTER( SvMetaSlot );
58     //File MODULE.HXX:
59     pClassMgr->SV_CLASS_REGISTER( SvMetaModule );
60     //File BASOBJ.HXX:
61     pClassMgr->SV_CLASS_REGISTER( SvMetaObject );
62     pClassMgr->SV_CLASS_REGISTER( SvMetaName );
63     pClassMgr->SV_CLASS_REGISTER( SvMetaExtern );
64     pClassMgr->SV_CLASS_REGISTER( SvMetaReference );
65     //File TYPES.HXX:
66     pClassMgr->SV_CLASS_REGISTER( SvMetaType );
67     pClassMgr->SV_CLASS_REGISTER( SvMetaTypeString );
68     pClassMgr->SV_CLASS_REGISTER( SvMetaEnumValue );
69     pClassMgr->SV_CLASS_REGISTER( SvMetaTypeEnum );
70     pClassMgr->SV_CLASS_REGISTER( SvMetaTypevoid );
71     pClassMgr->SV_CLASS_REGISTER( SvClassElement );
72 }
73 
~IdlDll()74 IdlDll::~IdlDll()
75 {
76     delete pGlobalNames;
77     delete pClassMgr;
78     delete pHashTable;
79 }
80 
81 /*************************************************************************
82 |*
83 |*    SvGlobalHashNames::SvGlobalHashNames()
84 |*
85 |*    Beschreibung
86 |*    Ersterstellung    MM 08.08.91
87 |*    Letzte Aenderung  MM 08.08.91
88 |*
89 *************************************************************************/
INS(const ByteString & rName)90 inline SvStringHashEntry * INS( const ByteString & rName )
91 {
92     sal_uInt32  nIdx;
93     IDLAPP->pHashTable->Insert( rName, &nIdx );
94     return (SvStringHashEntry * )IDLAPP->pHashTable->Get( nIdx );
95 }
96 #define A_ENTRY( Name ) , MM_##Name( INS( #Name ) )
97 
SvGlobalHashNames()98 SvGlobalHashNames::SvGlobalHashNames()
99     : MM_Name( INS( "Name" ) )
100     , MM_module( INS( "module" ) )
101     , MM_interface( INS( "interface" ) )
102     , MM_in( INS( "in" ) )
103     , MM_out( INS( "out" ) )
104     , MM_inout( INS( "inout" ) )
105     , MM_String( INS( "String" ) )
106     , MM_UCHAR( INS( "UCHAR" ) )
107     , MM_USHORT( INS( "USHORT" ) )
108     , MM_uuid( INS( "uuid" ) )
109     , MM_HelpContext( INS( "HelpContext" ) )
110     , MM_HelpText( INS( "HelpText" ) )
111     , MM_void( INS( "void" ) )
112     , MM_shell( INS( "shell" ) )
113     , MM_Get( INS( "Get" ) )
114     , MM_Set( INS( "Set" ) )
115     , MM_SlotId( INS( "SlotId" ) )
116     , MM_HasCoreId( INS( "HasCoreId" ) )
117     , MM_Cachable( INS( "Cachable" ) )
118 //    , MM_Volatile( INS( "Volatile" ) )
119     , MM_Toggle( INS( "Toggle" ) )
120     , MM_AutoUpdate( INS( "AutoUpdate" ) )
121     , MM_Synchron( INS( "Synchron" ) )
122     , MM_Asynchron( INS( "Asynchron" ) )
123     A_ENTRY(RecordPerSet)
124     A_ENTRY(RecordPerItem)
125     A_ENTRY(RecordManual)
126     A_ENTRY(NoRecord)
127     A_ENTRY(RecordAbsolute)
128     A_ENTRY(enum)
129     A_ENTRY(UINT16)
130     A_ENTRY(INT16)
131     A_ENTRY(UINT32)
132     A_ENTRY(INT32)
133     A_ENTRY(int)
134     A_ENTRY(BOOL)
135     A_ENTRY(char)
136     A_ENTRY(BYTE)
137     A_ENTRY(float)
138     A_ENTRY(double)
139     A_ENTRY(item)
140     A_ENTRY(PseudoSlots)
141     A_ENTRY(map)
142     A_ENTRY(Default)
143     A_ENTRY(HelpFile)
144     A_ENTRY(Version)
145     A_ENTRY(import)
146     A_ENTRY(SlotIdFile)
147     A_ENTRY(SvName)
148     A_ENTRY(SbxName)
149     A_ENTRY(ItemName)
150     A_ENTRY(OdlName)
151     A_ENTRY(include)
152     A_ENTRY(ExecMethod)
153     A_ENTRY(StateMethod)
154     A_ENTRY(GroupId)
155     A_ENTRY(HasDialog)
156     A_ENTRY(TypeLibFile)
157     A_ENTRY(Export)
158     A_ENTRY(Automation)
159     A_ENTRY(PseudoPrefix)
160     A_ENTRY(define)
161     A_ENTRY(MenuConfig)
162     A_ENTRY(ToolBoxConfig)
163     A_ENTRY(StatusBarConfig)
164     A_ENTRY(AccelConfig)
165     A_ENTRY(AllConfig)
166     A_ENTRY(FastCall)
167     A_ENTRY(SbxObject)
168     A_ENTRY(Container)
169     A_ENTRY(ImageRotation)
170     A_ENTRY(ImageReflection)
171     A_ENTRY(IsCollection)
172     A_ENTRY(ReadOnlyDoc)
173     A_ENTRY(ConfigName)
174     A_ENTRY(union)
175     A_ENTRY(struct)
176     A_ENTRY(typedef)
177     A_ENTRY(Readonly)
178     A_ENTRY(SlotType)
179 	A_ENTRY(ModulePrefix)
180 	A_ENTRY(DisableFlags)
181     A_ENTRY(Hidden)
182     A_ENTRY(Description)
183     A_ENTRY(UnoName)
184 {}
185 
186