LCOV - code coverage report
Current view: top level - lps/include/mcrl2/lps - normalize_sorts.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 7 8 87.5 %
Date: 2024-04-13 03:38:08 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Wieger Wesselink
       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             : /// \file mcrl2/lps/normalize_sorts.h
      10             : /// \brief add your file description here.
      11             : 
      12             : #ifndef MCRL2_LPS_NORMALIZE_SORTS_H
      13             : #define MCRL2_LPS_NORMALIZE_SORTS_H
      14             : 
      15             : #include "mcrl2/data/normalize_sorts.h"
      16             : #include "mcrl2/lps/builder.h"
      17             : 
      18             : namespace mcrl2
      19             : {
      20             : 
      21             : namespace lps
      22             : {
      23             : 
      24             : template <typename T>
      25          16 : void normalize_sorts(T& x,
      26             :                      const data::sort_specification& sortspec,
      27             :                      typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type* = nullptr
      28             :                     )
      29             : {
      30          16 :   core::make_update_apply_builder<lps::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).update(x);
      31          16 : }
      32             : 
      33             : template <typename T>
      34          22 : T normalize_sorts(const T& x,
      35             :                   const data::sort_specification& sortspec,
      36             :                   typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value >::type* = 0
      37             :                  )
      38             : {
      39          44 :   T result;
      40          22 :   core::make_update_apply_builder<lps::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).apply(result, x);
      41          22 :   return result;
      42           0 : }
      43             : 
      44             : } // namespace lps
      45             : 
      46             : } // namespace mcrl2
      47             : 
      48             : #endif // MCRL2_LPS_NORMALIZE_SORTS_H

Generated by: LCOV version 1.14