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

Generated by: LCOV version 1.10