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