LCOV - code coverage report
Current view: top level - modal_formula/include/mcrl2/modal_formula - translate_user_notation.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 4 5 80.0 %
Date: 2024-04-21 03:44:01 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/translate_user_notation.h
      10             : /// \brief add your file description here.
      11             : 
      12             : #ifndef MCRL2_MODAL_FORMULA_TRANSLATE_USER_NOTATION_H
      13             : #define MCRL2_MODAL_FORMULA_TRANSLATE_USER_NOTATION_H
      14             : 
      15             : #include "mcrl2/data/translate_user_notation.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 translate_user_notation(T& x,
      26             :                              typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value>::type* = 0
      27             :                             )
      28             : {
      29             :   core::make_update_apply_builder<action_formulas::data_expression_builder>(data::detail::translate_user_notation_function()).update(x);
      30             : }
      31             : 
      32             : template <typename T>
      33             : T translate_user_notation(const T& x,
      34             :                           typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value>::type* = nullptr
      35             :                          )
      36             : {
      37             :   T result;
      38             :   core::make_update_apply_builder<action_formulas::data_expression_builder>(data::detail::translate_user_notation_function()).apply(result, x);
      39             :   return result;
      40             : }
      41             : 
      42             : } // namespace action_formulas
      43             : 
      44             : namespace regular_formulas
      45             : {
      46             : 
      47             : template <typename T>
      48             : void translate_user_notation(T& x,
      49             :                              typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value>::type* = 0
      50             :                             )
      51             : {
      52             :   core::make_update_apply_builder<regular_formulas::data_expression_builder>(data::detail::translate_user_notation_function()).update(x);
      53             : }
      54             : 
      55             : template <typename T>
      56             : T translate_user_notation(const T& x,
      57             :                           typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value>::type* = nullptr
      58             :                          )
      59             : {
      60             :   T result;
      61             :   core::make_update_apply_builder<regular_formulas::data_expression_builder>(data::detail::translate_user_notation_function()).apply(result, x);
      62             :   return result;
      63             : }
      64             : 
      65             : } // namespace regular_formulas
      66             : 
      67             : namespace state_formulas
      68             : {
      69             : 
      70             : template <typename T>
      71             : void translate_user_notation(T& x,
      72             :                              typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value>::type* = 0
      73             :                             )
      74             : {
      75             :   core::make_update_apply_builder<state_formulas::data_expression_builder>(data::detail::translate_user_notation_function()).update(x);
      76             : }
      77             : 
      78             : template <typename T>
      79         178 : T translate_user_notation(const T& x,
      80             :                           typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value>::type* = nullptr
      81             :                          )
      82             : {
      83         178 :   T result;
      84         178 :   core::make_update_apply_builder<state_formulas::data_expression_builder>(data::detail::translate_user_notation_function()).apply(result, x);
      85         178 :   return result;
      86           0 : }
      87             : 
      88             : } // namespace state_formulas
      89             : 
      90             : } // namespace mcrl2
      91             : 
      92             : #endif // MCRL2_MODAL_FORMULA_TRANSLATE_USER_NOTATION_H

Generated by: LCOV version 1.14