LCOV - code coverage report
Current view: top level - sal/rtl - alloc_fini.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 27 36 75.0 %
Date: 2014-04-14 Functions: 9 12 75.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             : #include <rtl/instance.hxx>
      21             : 
      22             : #include "internal/rtllifecycle.h"
      23             : 
      24             : namespace
      25             : {
      26             :     struct rtlMemorySingleton
      27             :     {
      28           0 :         rtlMemorySingleton()
      29             :         {
      30           0 :             rtl_memory_init();
      31           0 :         }
      32           0 :         ~rtlMemorySingleton()
      33             :         {
      34           0 :             rtl_memory_fini();
      35           0 :         }
      36             :     };
      37             :     class theMemorySingleton
      38             :         : public rtl::Static<rtlMemorySingleton, theMemorySingleton>{};
      39             : }
      40             : 
      41           0 : void ensureMemorySingleton()
      42             : {
      43           0 :     theMemorySingleton::get();
      44           0 : }
      45             : 
      46             : namespace
      47             : {
      48             :     struct rtlCacheSingleton
      49             :     {
      50       85011 :         rtlCacheSingleton()
      51             :         {
      52       85011 :             rtl_cache_init();
      53       85011 :         }
      54       85011 :         ~rtlCacheSingleton()
      55             :         {
      56       85011 :             rtl_cache_fini();
      57       85011 :         }
      58             :     };
      59             :     class theCacheSingleton
      60             :         : public rtl::Static<rtlCacheSingleton, theCacheSingleton>{};
      61             : }
      62             : 
      63       85011 : void ensureCacheSingleton()
      64             : {
      65       85011 :     theCacheSingleton::get();
      66       85011 : }
      67             : 
      68             : namespace
      69             : {
      70             :     struct rtlArenaSingleton
      71             :     {
      72       85011 :         rtlArenaSingleton()
      73             :         {
      74       85011 :             rtl_arena_init();
      75       85011 :         }
      76       85011 :         ~rtlArenaSingleton()
      77             :         {
      78       85011 :             rtl_arena_fini();
      79       85011 :         }
      80             :     };
      81             :     class theArenaSingleton
      82             :         : public rtl::Static<rtlArenaSingleton, theArenaSingleton>{};
      83             : }
      84             : 
      85       85011 : void ensureArenaSingleton()
      86             : {
      87       85011 :     theArenaSingleton::get();
      88       85011 : }
      89             : 
      90             : namespace
      91             : {
      92             :     struct rtlLocaleSingleton
      93             :     {
      94       85011 :         rtlLocaleSingleton()
      95             :         {
      96       85011 :             rtl_locale_init();
      97       85011 :         }
      98       85011 :         ~rtlLocaleSingleton()
      99             :         {
     100       85011 :             rtl_locale_fini();
     101       85011 :         }
     102             :     };
     103             :     class theLocaleSingleton
     104             :         : public rtl::Static<rtlLocaleSingleton, theLocaleSingleton>{};
     105             : }
     106             : 
     107       85011 : void ensureLocaleSingleton()
     108             : {
     109       85011 :     theLocaleSingleton::get();
     110       85011 : }
     111             : 
     112             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10