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-17 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         372 :         rtlMemorySingleton()
      29             :         {
      30         372 :             rtl_memory_init();
      31         372 :         }
      32         372 :         ~rtlMemorySingleton()
      33             :         {
      34         372 :             rtl_memory_fini();
      35         372 :         }
      36             :     };
      37             :     class theMemorySingleton
      38             :         : public rtl::Static<rtlMemorySingleton, theMemorySingleton>{};
      39             : }
      40             : 
      41         372 : void ensureMemorySingleton()
      42             : {
      43         372 :     theMemorySingleton::get();
      44         372 : }
      45             : 
      46             : namespace
      47             : {
      48             :     struct rtlCacheSingleton
      49             :     {
      50         552 :         rtlCacheSingleton()
      51             :         {
      52         552 :             rtl_cache_init();
      53         552 :         }
      54         552 :         ~rtlCacheSingleton()
      55             :         {
      56         552 :             rtl_cache_fini();
      57         552 :         }
      58             :     };
      59             :     class theCacheSingleton
      60             :         : public rtl::Static<rtlCacheSingleton, theCacheSingleton>{};
      61             : }
      62             : 
      63         552 : void ensureCacheSingleton()
      64             : {
      65         552 :     theCacheSingleton::get();
      66         552 : }
      67             : 
      68             : namespace
      69             : {
      70             :     struct rtlArenaSingleton
      71             :     {
      72         552 :         rtlArenaSingleton()
      73             :         {
      74         552 :             rtl_arena_init();
      75         552 :         }
      76         552 :         ~rtlArenaSingleton()
      77             :         {
      78         552 :             rtl_arena_fini();
      79         552 :         }
      80             :     };
      81             :     class theArenaSingleton
      82             :         : public rtl::Static<rtlArenaSingleton, theArenaSingleton>{};
      83             : }
      84             : 
      85         552 : void ensureArenaSingleton()
      86             : {
      87         552 :     theArenaSingleton::get();
      88         552 : }
      89             : 
      90             : namespace
      91             : {
      92             :     struct rtlLocaleSingleton
      93             :     {
      94         552 :         rtlLocaleSingleton()
      95             :         {
      96         552 :             rtl_locale_init();
      97         552 :         }
      98         552 :         ~rtlLocaleSingleton()
      99             :         {
     100         552 :             rtl_locale_fini();
     101         552 :         }
     102             :     };
     103             :     class theLocaleSingleton
     104             :         : public rtl::Static<rtlLocaleSingleton, theLocaleSingleton>{};
     105             : }
     106             : 
     107         588 : void ensureLocaleSingleton()
     108             : {
     109         588 :     theLocaleSingleton::get();
     110         588 : }
     111             : 
     112             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10