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/process/action_name_multiset.h 10 : /// \brief add your file description here. 11 : 12 : #ifndef MCRL2_PROCESS_ACTION_NAME_MULTISET_H 13 : #define MCRL2_PROCESS_ACTION_NAME_MULTISET_H 14 : 15 : #include "mcrl2/data/data_specification.h" 16 : 17 : namespace mcrl2 18 : { 19 : 20 : namespace process 21 : { 22 : 23 : //--- start generated class action_name_multiset ---// 24 : /// \\brief A multiset of action names 25 : class action_name_multiset: public atermpp::aterm_appl 26 : { 27 : public: 28 : /// \\brief Default constructor. 29 851 : action_name_multiset() 30 851 : : atermpp::aterm_appl(core::detail::default_values::MultActName) 31 851 : {} 32 : 33 : /// \\brief Constructor. 34 : /// \\param term A term 35 46271 : explicit action_name_multiset(const atermpp::aterm& term) 36 46271 : : atermpp::aterm_appl(term) 37 : { 38 46271 : assert(core::detail::check_term_MultActName(*this)); 39 46271 : } 40 : 41 : /// \\brief Constructor. 42 944 : explicit action_name_multiset(const core::identifier_string_list& names) 43 944 : : atermpp::aterm_appl(core::detail::function_symbol_MultActName(), names) 44 944 : {} 45 : 46 : /// Move semantics 47 : action_name_multiset(const action_name_multiset&) noexcept = default; 48 318 : action_name_multiset(action_name_multiset&&) noexcept = default; 49 : action_name_multiset& operator=(const action_name_multiset&) noexcept = default; 50 178 : action_name_multiset& operator=(action_name_multiset&&) noexcept = default; 51 : 52 141288 : const core::identifier_string_list& names() const 53 : { 54 141288 : return atermpp::down_cast<core::identifier_string_list>((*this)[0]); 55 : } 56 : }; 57 : 58 : /// \\brief Make_action_name_multiset constructs a new term into a given address. 59 : /// \\ \param t The reference into which the new action_name_multiset is constructed. 60 : template <class... ARGUMENTS> 61 : inline void make_action_name_multiset(atermpp::aterm_appl& t, const ARGUMENTS&... args) 62 : { 63 : atermpp::make_term_appl(t, core::detail::function_symbol_MultActName(), args...); 64 : } 65 : 66 : /// \\brief list of action_name_multisets 67 : typedef atermpp::term_list<action_name_multiset> action_name_multiset_list; 68 : 69 : /// \\brief vector of action_name_multisets 70 : typedef std::vector<action_name_multiset> action_name_multiset_vector; 71 : 72 : /// \\brief Test for a action_name_multiset expression 73 : /// \\param x A term 74 : /// \\return True if \\a x is a action_name_multiset expression 75 : inline 76 : bool is_action_name_multiset(const atermpp::aterm_appl& x) 77 : { 78 : return x.function() == core::detail::function_symbols::MultActName; 79 : } 80 : 81 : // prototype declaration 82 : std::string pp(const action_name_multiset& x); 83 : 84 : /// \\brief Outputs the object to a stream 85 : /// \\param out An output stream 86 : /// \\param x Object x 87 : /// \\return The output stream 88 : inline 89 : std::ostream& operator<<(std::ostream& out, const action_name_multiset& x) 90 : { 91 : return out << process::pp(x); 92 : } 93 : 94 : /// \\brief swap overload 95 : inline void swap(action_name_multiset& t1, action_name_multiset& t2) 96 : { 97 : t1.swap(t2); 98 : } 99 : //--- end generated class action_name_multiset ---// 100 : 101 : } // namespace process 102 : 103 : } // namespace mcrl2 104 : 105 : #endif // MCRL2_PROCESS_ACTION_NAME_MULTISET_H