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

Generated by: LCOV version 1.10