LCOV - code coverage report
Current view: top level - libreoffice/idl/source/prj - globals.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 33 33 100.0 %
Date: 2012-12-27 Functions: 5 5 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #include <tools/shl.hxx>
      22             : 
      23             : #include <globals.hxx>
      24             : #include <database.hxx>
      25             : 
      26    14994259 : IdlDll * GetIdlApp()
      27             : {
      28    14994259 :     if( !(*(IdlDll**)GetAppData(SHL_IDL)) )
      29             :     {
      30           8 :         (*(IdlDll**)GetAppData(SHL_IDL)) = new IdlDll();
      31             :     }
      32    14994259 :     return (*(IdlDll**)GetAppData(SHL_IDL));
      33             : }
      34             : 
      35           8 : IdlDll::IdlDll()
      36             :     : pHashTable( NULL )
      37             :     , pClassMgr( NULL )
      38           8 :     , pGlobalNames( NULL )
      39             : 
      40             : {
      41           8 :     pClassMgr   = new SvClassManager();
      42             :     // File OBJECT.HXX:
      43           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaAttribute );
      44           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaClass );
      45             :     //File SLOT.HXX:
      46           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaSlot );
      47             :     //File MODULE.HXX:
      48           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaModule );
      49             :     //File BASOBJ.HXX:
      50           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaObject );
      51           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaName );
      52           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaExtern );
      53           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaReference );
      54             :     //File TYPES.HXX:
      55           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaType );
      56           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaTypeString );
      57           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaEnumValue );
      58           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaTypeEnum );
      59           8 :     pClassMgr->SV_CLASS_REGISTER( SvMetaTypevoid );
      60           8 :     pClassMgr->SV_CLASS_REGISTER( SvClassElement );
      61           8 : }
      62             : 
      63           8 : IdlDll::~IdlDll()
      64             : {
      65           8 :     delete pGlobalNames;
      66           8 :     delete pClassMgr;
      67           8 :     delete pHashTable;
      68           8 : }
      69             : 
      70         672 : inline SvStringHashEntry * INS( const rtl::OString& rName )
      71             : {
      72             :     sal_uInt32  nIdx;
      73         672 :     IDLAPP->pHashTable->Insert( rName, &nIdx );
      74         672 :     return (SvStringHashEntry * )IDLAPP->pHashTable->Get( nIdx );
      75             : }
      76             : #define A_ENTRY( Name ) , MM_##Name( INS( #Name ) )
      77             : 
      78           8 : SvGlobalHashNames::SvGlobalHashNames()
      79             :     : MM_Name( INS( "Name" ) )
      80             :     , MM_module( INS( "module" ) )
      81             :     , MM_interface( INS( "interface" ) )
      82             :     , MM_in( INS( "in" ) )
      83             :     , MM_out( INS( "out" ) )
      84             :     , MM_inout( INS( "inout" ) )
      85             :     , MM_String( INS( "String" ) )
      86             :     , MM_UCHAR( INS( "UCHAR" ) )
      87             :     , MM_USHORT( INS( "USHORT" ) )
      88             :     , MM_uuid( INS( "uuid" ) )
      89             :     , MM_HelpContext( INS( "HelpContext" ) )
      90             :     , MM_HelpText( INS( "HelpText" ) )
      91             :     , MM_void( INS( "void" ) )
      92             :     , MM_shell( INS( "shell" ) )
      93             :     , MM_Get( INS( "Get" ) )
      94             :     , MM_Set( INS( "Set" ) )
      95             :     , MM_SlotId( INS( "SlotId" ) )
      96             :     , MM_HasCoreId( INS( "HasCoreId" ) )
      97             :     , MM_Cachable( INS( "Cachable" ) )
      98             :     , MM_Toggle( INS( "Toggle" ) )
      99             :     , MM_AutoUpdate( INS( "AutoUpdate" ) )
     100             :     , MM_Synchron( INS( "Synchron" ) )
     101             :     , MM_Asynchron( INS( "Asynchron" ) )
     102             :     A_ENTRY(RecordPerSet)
     103             :     A_ENTRY(RecordPerItem)
     104             :     A_ENTRY(RecordManual)
     105             :     A_ENTRY(NoRecord)
     106             :     A_ENTRY(RecordAbsolute)
     107             :     A_ENTRY(enum)
     108             :     A_ENTRY(UINT16)
     109             :     A_ENTRY(INT16)
     110             :     A_ENTRY(UINT32)
     111             :     A_ENTRY(INT32)
     112             :     A_ENTRY(int)
     113             :     A_ENTRY(BOOL)
     114             :     A_ENTRY(char)
     115             :     A_ENTRY(BYTE)
     116             :     A_ENTRY(float)
     117             :     A_ENTRY(double)
     118             :     A_ENTRY(item)
     119             :     A_ENTRY(PseudoSlots)
     120             :     A_ENTRY(map)
     121             :     A_ENTRY(Default)
     122             :     A_ENTRY(HelpFile)
     123             :     A_ENTRY(Version)
     124             :     A_ENTRY(import)
     125             :     A_ENTRY(SlotIdFile)
     126             :     A_ENTRY(SvName)
     127             :     A_ENTRY(SbxName)
     128             :     A_ENTRY(ItemName)
     129             :     A_ENTRY(OdlName)
     130             :     A_ENTRY(include)
     131             :     A_ENTRY(ExecMethod)
     132             :     A_ENTRY(StateMethod)
     133             :     A_ENTRY(GroupId)
     134             :     A_ENTRY(HasDialog)
     135             :     A_ENTRY(TypeLibFile)
     136             :     A_ENTRY(Export)
     137             :     A_ENTRY(Automation)
     138             :     A_ENTRY(PseudoPrefix)
     139             :     A_ENTRY(define)
     140             :     A_ENTRY(MenuConfig)
     141             :     A_ENTRY(ToolBoxConfig)
     142             :     A_ENTRY(StatusBarConfig)
     143             :     A_ENTRY(AccelConfig)
     144             :     A_ENTRY(AllConfig)
     145             :     A_ENTRY(FastCall)
     146             :     A_ENTRY(SbxObject)
     147             :     A_ENTRY(Container)
     148             :     A_ENTRY(ImageRotation)
     149             :     A_ENTRY(ImageReflection)
     150             :     A_ENTRY(IsCollection)
     151             :     A_ENTRY(ReadOnlyDoc)
     152             :     A_ENTRY(ConfigName)
     153             :     A_ENTRY(union)
     154             :     A_ENTRY(struct)
     155             :     A_ENTRY(typedef)
     156             :     A_ENTRY(Readonly)
     157             :     A_ENTRY(SlotType)
     158             :     A_ENTRY(ModulePrefix)
     159             :     A_ENTRY(DisableFlags)
     160             :     A_ENTRY(Hidden)
     161             :     A_ENTRY(Description)
     162           8 :     A_ENTRY(UnoName)
     163           8 : {}
     164             : 
     165             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10