mCRL2
Loading...
Searching...
No Matches
where_clause.h
Go to the documentation of this file.
1// Author(s): Jeroen Keiren
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//
11
12#ifndef MCRL2_DATA_WHERE_CLAUSE_H
13#define MCRL2_DATA_WHERE_CLAUSE_H
14
16
17namespace mcrl2
18{
19
20namespace data
21{
22
23//--- start generated class where_clause ---//
26{
27 public:
30 : data_expression(core::detail::default_values::Whr)
31 {}
32
35 explicit where_clause(const atermpp::aterm& term)
36 : data_expression(term)
37 {
38 assert(core::detail::check_term_Whr(*this));
39 }
40
43 : data_expression(atermpp::aterm(core::detail::function_symbol_Whr(), body, declarations))
44 {}
45
47 template <typename Container>
49 : data_expression(atermpp::aterm(core::detail::function_symbol_Whr(), body, assignment_expression_list(declarations.begin(), declarations.end())))
50 {}
51
53 where_clause(const where_clause&) noexcept = default;
54 where_clause(where_clause&&) noexcept = default;
55 where_clause& operator=(const where_clause&) noexcept = default;
56 where_clause& operator=(where_clause&&) noexcept = default;
57
58 const data_expression& body() const
59 {
60 return atermpp::down_cast<data_expression>((*this)[0]);
61 }
62
64 {
65 return atermpp::down_cast<assignment_expression_list>((*this)[1]);
66 }
67//--- start user section where_clause ---//
69 {
70 return atermpp::down_cast<const assignment_list>((*this)[1]);
71 }
72//--- end user section where_clause ---//
73};
74
77template <class... ARGUMENTS>
78inline void make_where_clause(atermpp::aterm& t, const ARGUMENTS&... args)
79{
81}
82
83// prototype declaration
84std::string pp(const where_clause& x);
85
90inline
91std::ostream& operator<<(std::ostream& out, const where_clause& x)
92{
93 return out << data::pp(x);
94}
95
97inline void swap(where_clause& t1, where_clause& t2)
98{
99 t1.swap(t2);
100}
101//--- end generated class where_clause ---//
102
103} // namespace data
104
105} // namespace mcrl2
106
107#endif // MCRL2_DATA_WHERE_CLAUSE_H
108
The class assignment.
aterm()
Default constructor.
Definition aterm.h:48
A list of aterm objects.
Definition aterm_list.h:24
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
const_iterator end() const
const_iterator begin() const
\brief A where expression
const assignment_list & assignments() const
where_clause(const where_clause &) noexcept=default
Move semantics.
where_clause(const atermpp::aterm &term)
const data_expression & body() const
const assignment_expression_list & declarations() const
where_clause()
\brief Default constructor X3.
where_clause(const data_expression &body, const Container &declarations, typename atermpp::enable_if_container< Container, assignment_expression >::type *=nullptr)
\brief Constructor Z2.
where_clause(where_clause &&) noexcept=default
where_clause(const data_expression &body, const assignment_expression_list &declarations)
\brief Constructor Z14.
The main namespace for the aterm++ library.
Definition algorithm.h:21
void make_term_appl(Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
Constructor an aterm in a variable based on a function symbol and an forward iterator providing the a...
Definition aterm.h:213
bool check_term_Whr(const Term &t)
const atermpp::function_symbol & function_symbol_Whr()
void swap(abstraction &t1, abstraction &t2)
\brief swap overload
void make_where_clause(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const abstraction &x)
Definition data.cpp:39
std::ostream & operator<<(std::ostream &out, const abstraction &x)
Definition abstraction.h:94
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72