LCOV - code coverage report
Current view: top level - modal_formula/include/mcrl2/modal_formula - normalize_sorts.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 2 2 100.0 %
Date: 2020-02-21 00:44:40 Functions: 1 1 100.0 %
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/modal_formula/normalize_sorts.h
      10             : /// \brief add your file description here.
      11             : 
      12             : #ifndef MCRL2_MODAL_FORMULA_NORMALIZE_SORTS_H
      13             : #define MCRL2_MODAL_FORMULA_NORMALIZE_SORTS_H
      14             : 
      15             : #include "mcrl2/data/normalize_sorts.h"
      16             : #include "mcrl2/modal_formula/builder.h"
      17             : 
      18             : namespace mcrl2
      19             : {
      20             : 
      21             : namespace action_formulas
      22             : {
      23             : 
      24             : template <typename T>
      25             : 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* = 0
      28             :                     )
      29             : {
      30             :   core::make_update_apply_builder<action_formulas::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).update(x);
      31             : }
      32             : 
      33             : template <typename T>
      34             : 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* = nullptr
      37             :                  )
      38             : {
      39             :   return core::make_update_apply_builder<action_formulas::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).apply(x);
      40             : }
      41             : 
      42             : } // namespace action_formulas
      43             : 
      44             : namespace regular_formulas
      45             : {
      46             : 
      47             : template <typename T>
      48             : void normalize_sorts(T& x,
      49             :                      const data::sort_specification& sortspec,
      50             :                      typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value>::type* = 0
      51             :                     )
      52             : {
      53             :   core::make_update_apply_builder<regular_formulas::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).update(x);
      54             : }
      55             : 
      56             : template <typename T>
      57             : T normalize_sorts(const T& x,
      58             :                   const data::sort_specification& sortspec,
      59             :                   typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value>::type* = nullptr
      60             :                  )
      61             : {
      62             :   return core::make_update_apply_builder<regular_formulas::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).apply(x);
      63             : }
      64             : 
      65             : } // namespace regular_formulas
      66             : 
      67             : namespace state_formulas
      68             : {
      69             : 
      70             : template <typename T>
      71             : void normalize_sorts(T& x,
      72             :                      const data::sort_specification& sortspec,
      73             :                      typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value>::type* = 0
      74             :                     )
      75             : {
      76             :   core::make_update_apply_builder<state_formulas::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).update(x);
      77             : }
      78             : 
      79             : template <typename T>
      80         169 : T normalize_sorts(const T& x,
      81             :                   const data::sort_specification& sortspec,
      82             :                   typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value>::type* = nullptr
      83             :                  )
      84             : {
      85         169 :   return core::make_update_apply_builder<state_formulas::sort_expression_builder>(data::detail::normalize_sorts_function(sortspec)).apply(x);
      86             : }
      87             : 
      88             : } // namespace state_formulas
      89             : 
      90             : } // namespace mcrl2
      91             : 
      92             : #endif // MCRL2_MODAL_FORMULA_NORMALIZE_SORTS_H

Generated by: LCOV version 1.13