Version 3.6.0.4, tag libreoffice-3.6.0.4
[LibreOffice.git] / idl / source / prj / globals.cxx
blob6ed455d1b0357882c81db4b5815b77ba72b02b6f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include <tools/shl.hxx>
32 #include <globals.hxx>
33 #include <database.hxx>
35 IdlDll * GetIdlApp()
37 if( !(*(IdlDll**)GetAppData(SHL_IDL)) )
39 (*(IdlDll**)GetAppData(SHL_IDL)) = new IdlDll();
41 return (*(IdlDll**)GetAppData(SHL_IDL));
44 IdlDll::IdlDll()
45 : pHashTable( NULL )
46 , pClassMgr( NULL )
47 , pGlobalNames( NULL )
50 pClassMgr = new SvClassManager();
51 // File OBJECT.HXX:
52 pClassMgr->SV_CLASS_REGISTER( SvMetaAttribute );
53 pClassMgr->SV_CLASS_REGISTER( SvMetaClass );
54 //File SLOT.HXX:
55 pClassMgr->SV_CLASS_REGISTER( SvMetaSlot );
56 //File MODULE.HXX:
57 pClassMgr->SV_CLASS_REGISTER( SvMetaModule );
58 //File BASOBJ.HXX:
59 pClassMgr->SV_CLASS_REGISTER( SvMetaObject );
60 pClassMgr->SV_CLASS_REGISTER( SvMetaName );
61 pClassMgr->SV_CLASS_REGISTER( SvMetaExtern );
62 pClassMgr->SV_CLASS_REGISTER( SvMetaReference );
63 //File TYPES.HXX:
64 pClassMgr->SV_CLASS_REGISTER( SvMetaType );
65 pClassMgr->SV_CLASS_REGISTER( SvMetaTypeString );
66 pClassMgr->SV_CLASS_REGISTER( SvMetaEnumValue );
67 pClassMgr->SV_CLASS_REGISTER( SvMetaTypeEnum );
68 pClassMgr->SV_CLASS_REGISTER( SvMetaTypevoid );
69 pClassMgr->SV_CLASS_REGISTER( SvClassElement );
72 IdlDll::~IdlDll()
74 delete pGlobalNames;
75 delete pClassMgr;
76 delete pHashTable;
79 inline SvStringHashEntry * INS( const rtl::OString& rName )
81 sal_uInt32 nIdx;
82 IDLAPP->pHashTable->Insert( rName, &nIdx );
83 return (SvStringHashEntry * )IDLAPP->pHashTable->Get( nIdx );
85 #define A_ENTRY( Name ) , MM_##Name( INS( #Name ) )
87 SvGlobalHashNames::SvGlobalHashNames()
88 : MM_Name( INS( "Name" ) )
89 , MM_module( INS( "module" ) )
90 , MM_interface( INS( "interface" ) )
91 , MM_in( INS( "in" ) )
92 , MM_out( INS( "out" ) )
93 , MM_inout( INS( "inout" ) )
94 , MM_String( INS( "String" ) )
95 , MM_UCHAR( INS( "UCHAR" ) )
96 , MM_USHORT( INS( "USHORT" ) )
97 , MM_uuid( INS( "uuid" ) )
98 , MM_HelpContext( INS( "HelpContext" ) )
99 , MM_HelpText( INS( "HelpText" ) )
100 , MM_void( INS( "void" ) )
101 , MM_shell( INS( "shell" ) )
102 , MM_Get( INS( "Get" ) )
103 , MM_Set( INS( "Set" ) )
104 , MM_SlotId( INS( "SlotId" ) )
105 , MM_HasCoreId( INS( "HasCoreId" ) )
106 , MM_Cachable( INS( "Cachable" ) )
107 , MM_Toggle( INS( "Toggle" ) )
108 , MM_AutoUpdate( INS( "AutoUpdate" ) )
109 , MM_Synchron( INS( "Synchron" ) )
110 , MM_Asynchron( INS( "Asynchron" ) )
111 A_ENTRY(RecordPerSet)
112 A_ENTRY(RecordPerItem)
113 A_ENTRY(RecordManual)
114 A_ENTRY(NoRecord)
115 A_ENTRY(RecordAbsolute)
116 A_ENTRY(enum)
117 A_ENTRY(UINT16)
118 A_ENTRY(INT16)
119 A_ENTRY(UINT32)
120 A_ENTRY(INT32)
121 A_ENTRY(int)
122 A_ENTRY(BOOL)
123 A_ENTRY(char)
124 A_ENTRY(BYTE)
125 A_ENTRY(float)
126 A_ENTRY(double)
127 A_ENTRY(item)
128 A_ENTRY(PseudoSlots)
129 A_ENTRY(map)
130 A_ENTRY(Default)
131 A_ENTRY(HelpFile)
132 A_ENTRY(Version)
133 A_ENTRY(import)
134 A_ENTRY(SlotIdFile)
135 A_ENTRY(SvName)
136 A_ENTRY(SbxName)
137 A_ENTRY(ItemName)
138 A_ENTRY(OdlName)
139 A_ENTRY(include)
140 A_ENTRY(ExecMethod)
141 A_ENTRY(StateMethod)
142 A_ENTRY(GroupId)
143 A_ENTRY(HasDialog)
144 A_ENTRY(TypeLibFile)
145 A_ENTRY(Export)
146 A_ENTRY(Automation)
147 A_ENTRY(PseudoPrefix)
148 A_ENTRY(define)
149 A_ENTRY(MenuConfig)
150 A_ENTRY(ToolBoxConfig)
151 A_ENTRY(StatusBarConfig)
152 A_ENTRY(AccelConfig)
153 A_ENTRY(AllConfig)
154 A_ENTRY(FastCall)
155 A_ENTRY(SbxObject)
156 A_ENTRY(Container)
157 A_ENTRY(ImageRotation)
158 A_ENTRY(ImageReflection)
159 A_ENTRY(IsCollection)
160 A_ENTRY(ReadOnlyDoc)
161 A_ENTRY(ConfigName)
162 A_ENTRY(union)
163 A_ENTRY(struct)
164 A_ENTRY(typedef)
165 A_ENTRY(Readonly)
166 A_ENTRY(SlotType)
167 A_ENTRY(ModulePrefix)
168 A_ENTRY(DisableFlags)
169 A_ENTRY(Hidden)
170 A_ENTRY(Description)
171 A_ENTRY(UnoName)
174 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */