LCOV - code coverage report
Current view: top level - atermpp/source - aterm_implementation.cpp (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 7 7 100.0 %
Date: 2019-06-20 00:49:45 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Maurice Laveaux
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : 
      10             : #include "mcrl2/atermpp/detail/aterm.h"
      11             : #include "mcrl2/atermpp/detail/global_aterm_pool.h"
      12             : 
      13             : using namespace atermpp;
      14             : using namespace atermpp::detail;
      15             : 
      16             : /// \brief Check for reasonably sized aterm (32 bits, 4 bytes)
      17             : ///        This check might break on perfectly valid architectures
      18             : ///        that have char == 2 bytes, and sizeof(header_type) == 2
      19             : static_assert(sizeof(std::size_t) == sizeof(_aterm*), "The size of an aterm pointer is not equal to the size of type std::size_t. Cannot compile the MCRL2 toolset for this platform.");
      20             : static_assert(sizeof(std::size_t) >= 4,"The size of std::size_t should at least be four bytes. Cannot compile the toolset for this platform.");
      21             : 
      22         377 : void atermpp::add_creation_hook(const function_symbol& function, term_callback callback)
      23             : {
      24         377 :   g_term_pool().add_creation_hook(function, callback);
      25         377 : }
      26             : 
      27         377 : void atermpp::add_deletion_hook(const function_symbol& function, term_callback callback)
      28             : {  
      29         377 :   g_term_pool().add_deletion_hook(function, callback);
      30         377 : }
      31             : 
      32         420 : typename std::aligned_storage<sizeof(aterm_pool), alignof(aterm_pool)>::type atermpp::detail::g_aterm_pool_storage = {};

Generated by: LCOV version 1.12