LCOV - code coverage report
Current view: top level - data/include/mcrl2/data - untyped_set_or_bag_comprehension.h (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 5 5 100.0 %
Date: 2020-09-16 00:45:56 Functions: 2 2 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/data/untyped_set_or_bag_comprehension.h
      10             : /// \brief add your file description here.
      11             : 
      12             : #ifndef MCRL2_DATA_UNTYPED_SET_OR_BAG_COMPREHENSION_H
      13             : #define MCRL2_DATA_UNTYPED_SET_OR_BAG_COMPREHENSION_H
      14             : 
      15             : #include "mcrl2/data/abstraction.h"
      16             : 
      17             : namespace mcrl2 {
      18             : 
      19             : namespace data {
      20             : 
      21             : /// \brief universal quantification.
      22             : ///
      23           9 : class untyped_set_or_bag_comprehension: public abstraction
      24             : {
      25             :   public:
      26             : 
      27             :     /// Constructor.
      28             :     ///
      29             :     /// \param[in] d A data expression.
      30             :     /// \pre d has the interal structure of an abstraction.
      31             :     /// \pre d is a universal quantification.
      32             :     untyped_set_or_bag_comprehension(const data_expression& d)
      33             :       : abstraction(d)
      34             :     {
      35             :       assert(is_abstraction(d));
      36             :       assert(static_cast<abstraction>(d).binding_operator() == untyped_set_or_bag_comprehension_binder());
      37             :     }
      38             : 
      39             :     /// Constructor.
      40             :     ///
      41             :     /// \param[in] variables A nonempty list of binding variables (objects of type variable).
      42             :     /// \param[in] body The body of the untyped_set_or_bag_comprehension abstraction.
      43             :     /// \pre variables is not empty.
      44             :     template < typename Container >
      45           9 :     untyped_set_or_bag_comprehension(const Container& variables,
      46             :            const data_expression& body,
      47             :            typename atermpp::enable_if_container< Container, variable >::type* = nullptr)
      48           9 :       : abstraction(untyped_set_or_bag_comprehension_binder(), variables, body)
      49             :     {
      50           9 :       assert(!variables.empty());
      51           9 :     }
      52             : 
      53             :     /// Move semantics
      54             :     untyped_set_or_bag_comprehension(const untyped_set_or_bag_comprehension&) noexcept = default;
      55             :     untyped_set_or_bag_comprehension(untyped_set_or_bag_comprehension&&) noexcept = default;
      56             :     untyped_set_or_bag_comprehension& operator=(const untyped_set_or_bag_comprehension&) noexcept = default;
      57             :     untyped_set_or_bag_comprehension& operator=(untyped_set_or_bag_comprehension&&) noexcept = default;
      58             : 
      59             : }; // class untyped_set_or_bag_comprehension
      60             : 
      61             : //--- start generated class untyped_set_or_bag_comprehension ---//
      62             : // prototype declaration
      63             : std::string pp(const untyped_set_or_bag_comprehension& x);
      64             : 
      65             : /// \brief Outputs the object to a stream
      66             : /// \param out An output stream
      67             : /// \param x Object x
      68             : /// \return The output stream
      69             : inline
      70             : std::ostream& operator<<(std::ostream& out, const untyped_set_or_bag_comprehension& x)
      71             : {
      72             :   return out << data::pp(x);
      73             : }
      74             : 
      75             : /// \brief swap overload
      76             : inline void swap(untyped_set_or_bag_comprehension& t1, untyped_set_or_bag_comprehension& t2)
      77             : {
      78             :   t1.swap(t2);
      79             : }
      80             : //--- end generated class untyped_set_or_bag_comprehension ---//
      81             : 
      82             : } // namespace data
      83             : 
      84             : } // namespace mcrl2
      85             : 
      86             : #endif // MCRL2_DATA_UNTYPED_SET_OR_BAG_COMPREHENSION_H

Generated by: LCOV version 1.13