LCOV - code coverage report
Current view: top level - data/include/mcrl2/data - untyped_possible_sorts.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 9 15 60.0 %
Date: 2024-04-19 03:43:27 Functions: 3 9 33.3 %
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/data/untyped_possible_sorts.h
      10             : /// \brief add your file description here.
      11             : 
      12             : #ifndef MCRL2_DATA_UNTYPED_POSSIBLE_SORTS_H
      13             : #define MCRL2_DATA_UNTYPED_POSSIBLE_SORTS_H
      14             : 
      15             : #include "mcrl2/data/sort_expression.h"
      16             : 
      17             : namespace mcrl2 {
      18             : 
      19             : namespace data {
      20             : 
      21             : //--- start generated class untyped_possible_sorts ---//
      22             : /// \\brief Multiple possible sorts
      23             : class untyped_possible_sorts: public sort_expression
      24             : {
      25             :   public:
      26             :     /// \\brief Default constructor.
      27             :     untyped_possible_sorts()
      28             :       : sort_expression(core::detail::default_values::UntypedSortsPossible)
      29             :     {}
      30             : 
      31             :     /// \\brief Constructor.
      32             :     /// \\param term A term
      33       14329 :     explicit untyped_possible_sorts(const atermpp::aterm& term)
      34       14329 :       : sort_expression(term)
      35             :     {
      36       14329 :       assert(core::detail::check_term_UntypedSortsPossible(*this));
      37       14329 :     }
      38             : 
      39             :     /// \\brief Constructor.
      40        3618 :     explicit untyped_possible_sorts(const sort_expression_list& sorts)
      41        3618 :       : sort_expression(atermpp::aterm_appl(core::detail::function_symbol_UntypedSortsPossible(), sorts))
      42        3618 :     {}
      43             : 
      44             :     /// \\brief Constructor.
      45             :     template <typename Container>
      46           0 :     untyped_possible_sorts(const Container& sorts, typename atermpp::enable_if_container<Container, sort_expression>::type* = nullptr)
      47           0 :       : sort_expression(atermpp::aterm_appl(core::detail::function_symbol_UntypedSortsPossible(), sort_expression_list(sorts.begin(), sorts.end())))
      48           0 :     {}
      49             : 
      50             :     /// Move semantics
      51             :     untyped_possible_sorts(const untyped_possible_sorts&) noexcept = default;
      52             :     untyped_possible_sorts(untyped_possible_sorts&&) noexcept = default;
      53             :     untyped_possible_sorts& operator=(const untyped_possible_sorts&) noexcept = default;
      54             :     untyped_possible_sorts& operator=(untyped_possible_sorts&&) noexcept = default;
      55             : 
      56       76275 :     const sort_expression_list& sorts() const
      57             :     {
      58       76275 :       return atermpp::down_cast<sort_expression_list>((*this)[0]);
      59             :     }
      60             : };
      61             : 
      62             : /// \\brief Make_untyped_possible_sorts constructs a new term into a given address.
      63             : /// \\ \param t The reference into which the new untyped_possible_sorts is constructed. 
      64             : template <class... ARGUMENTS>
      65           0 : inline void make_untyped_possible_sorts(atermpp::aterm_appl& t, const ARGUMENTS&... args)
      66             : {
      67           0 :   atermpp::make_term_appl(t, core::detail::function_symbol_UntypedSortsPossible(), args...);
      68           0 : }
      69             : 
      70             : // prototype declaration
      71             : std::string pp(const untyped_possible_sorts& x);
      72             : 
      73             : /// \\brief Outputs the object to a stream
      74             : /// \\param out An output stream
      75             : /// \\param x Object x
      76             : /// \\return The output stream
      77             : inline
      78             : std::ostream& operator<<(std::ostream& out, const untyped_possible_sorts& x)
      79             : {
      80             :   return out << data::pp(x);
      81             : }
      82             : 
      83             : /// \\brief swap overload
      84             : inline void swap(untyped_possible_sorts& t1, untyped_possible_sorts& t2)
      85             : {
      86             :   t1.swap(t2);
      87             : }
      88             : //--- end generated class untyped_possible_sorts ---//
      89             : 
      90             : } // namespace data
      91             : 
      92             : } // namespace mcrl2
      93             : 
      94             : #endif // MCRL2_DATA_UNTYPED_POSSIBLE_SORTS_H

Generated by: LCOV version 1.14