1 #ifndef VCSN_CORE_AUTOMATON_DECORATOR_HH
2 # define VCSN_CORE_AUTOMATON_DECORATOR_HH
17 template <
typename Aut,
18 typename Context = context_t_of<Aut>>
28 =
typename automaton_t::element_type::automaton_nocv_t;
31 using kind_t =
typename context_t::kind_t;
35 using label_t =
typename labelset_t::value_t;
39 using weight_t =
typename weightset_t::value_t;
45 =
typename Aut::element_type::transitions_output_t;
62 std::swap(
aut_, aut.aut_);
68 aut_ = std::move(that.aut_);
89 # define DEFINE(Name) \
90 template <typename... Args> \
93 Name(Args&&... args) \
94 -> decltype(automaton_t::element_type::Name(std::forward<Args>(args)...)) \
96 return automaton_t::element_type::Name(std::forward<Args>(args)...); \
111 # define DEFINE(Name) \
112 template <typename... Args> \
114 Name(Args&&... args) const \
115 -> decltype(aut_->Name(std::forward<Args>(args)...)) \
117 return aut_->Name(std::forward<Args>(args)...); \
162 # define DEFINE(Name) \
163 template <typename... Args> \
165 Name(Args&&... args) \
166 -> decltype(aut_->Name(std::forward<Args>(args)...)) \
168 return aut_->Name(std::forward<Args>(args)...); \
195 #endif // !VCSN_CORE_AUTOMATON_DECORATOR_HH
auto add_final(Args &&...args) -> decltype(aut_-> add_ final(std
automaton_decorator(const context_t &ctx)
auto num_finals(Args &&...args) const -> decltype(aut_-> num_ final s(std
auto print_state_name(Args &&...args) const -> decltype(aut_-> print_state_name(std::forward< Args >(args)...))
auto rmul_weight(Args &&...args) -> decltype(aut_-> rmul_weight(std::forward< Args >(args)...))
auto weight_of(Args &&...args) const -> decltype(aut_-> weight_of(std::forward< Args >(args)...))
auto del_state(Args &&...args) -> decltype(aut_-> del_state(std::forward< Args >(args)...))
auto unset_final(Args &&...args) -> decltype(aut_-> unset_ final(std
auto outin(Args &&...args) const -> decltype(aut_-> outin(std::forward< Args >(args)...))
auto labelset(Args &&...args) const -> decltype(aut_-> labelset(std::forward< Args >(args)...))
auto is_final(Args &&...args) const -> decltype(aut_-> is_ final(std
auto states(Args &&...args) const -> decltype(aut_-> states(std::forward< Args >(args)...))
auto get_initial_weight(Args &&...args) const -> decltype(aut_-> get_initial_weight(std::forward< Args >(args)...))
static constexpr auto sname(Args &&...args) -> decltype(automaton_t::element_type::sname(std::forward< Args >(args)...))
auto num_all_states(Args &&...args) const -> decltype(aut_-> num_all_states(std::forward< Args >(args)...))
typename labelset_t::value_t label_t
auto lmul_weight(Args &&...args) -> decltype(aut_-> lmul_weight(std::forward< Args >(args)...))
auto all_out(Args &&...args) const -> decltype(aut_-> all_out(std::forward< Args >(args)...))
auto all_in(Args &&...args) const -> decltype(aut_-> all_in(std::forward< Args >(args)...))
auto set_weight(Args &&...args) -> decltype(aut_-> set_weight(std::forward< Args >(args)...))
auto add_initial(Args &&...args) -> decltype(aut_-> add_initial(std::forward< Args >(args)...))
typename context_t::weightset_t weightset_t
transition_t_of< automaton_t > transition_t
auto final_transitions(Args &&...args) const -> decltype(aut_-> final _transitions(std
auto unset_initial(Args &&...args) -> decltype(aut_-> unset_initial(std::forward< Args >(args)...))
auto dst_of(Args &&...args) const -> decltype(aut_-> dst_of(std::forward< Args >(args)...))
state_t_of< automaton_t > state_t
auto set_transition(Args &&...args) -> decltype(aut_-> set_transition(std::forward< Args >(args)...))
auto num_initials(Args &&...args) const -> decltype(aut_-> num_initials(std::forward< Args >(args)...))
auto vname(Args &&...args) const -> decltype(aut_-> vname(std::forward< Args >(args)...))
auto new_state(Args &&...args) -> decltype(aut_-> new_state(std::forward< Args >(args)...))
auto num_states(Args &&...args) const -> decltype(aut_-> num_states(std::forward< Args >(args)...))
auto set_initial(Args &&...args) -> decltype(aut_-> set_initial(std::forward< Args >(args)...))
automaton_decorator(automaton_decorator &&aut)
auto add_transition_copy(Args &&...args) -> decltype(aut_-> add_transition_copy(std::forward< Args >(args)...))
auto all_transitions(Args &&...args) const -> decltype(aut_-> all_transitions(std::forward< Args >(args)...))
typename context_t::labelset_t labelset_t
auto has_transition(Args &&...args) const -> decltype(aut_-> has_transition(std::forward< Args >(args)...))
auto weightset(Args &&...args) const -> decltype(aut_-> weightset(std::forward< Args >(args)...))
auto has_state(Args &&...args) const -> decltype(aut_-> has_state(std::forward< Args >(args)...))
Aggregate an automaton, and forward calls to it.
auto transitions(Args &&...args) const -> decltype(aut_-> transitions(std::forward< Args >(args)...))
auto get_final_weight(Args &&...args) const -> decltype(aut_-> get_ final _weight(std
auto get_transition(Args &&...args) const -> decltype(aut_-> get_transition(std::forward< Args >(args)...))
typename context_t::weightset_ptr weightset_ptr
auto set_final(Args &&...args) -> decltype(aut_-> set_ final(std
automaton_decorator(automaton_t aut)
typename detail::transition_t_of_impl< base_t< ValueSet >>::type transition_t_of
automaton_decorator(const automaton_decorator &aut)
auto is_initial(Args &&...args) const -> decltype(aut_-> is_initial(std::forward< Args >(args)...))
typename context_t::kind_t kind_t
typename mutable_automaton< context_t_of< Aut > >::element_type::transitions_output_t transitions_output_t
auto all_states(Args &&...args) const -> decltype(aut_-> all_states(std::forward< Args >(args)...))
auto initial_transitions(Args &&...args) const -> decltype(aut_-> initial_transitions(std::forward< Args >(args)...))
auto num_transitions(Args &&...args) const -> decltype(aut_-> num_transitions(std::forward< Args >(args)...))
typename weightset_t::value_t weight_t
auto label_of(Args &&...args) const -> decltype(aut_-> label_of(std::forward< Args >(args)...))
auto new_transition_copy(Args &&...args) -> decltype(aut_-> new_transition_copy(std::forward< Args >(args)...))
auto add_weight(Args &&...args) -> decltype(aut_-> add_weight(std::forward< Args >(args)...))
auto src_of(Args &&...args) const -> decltype(aut_-> src_of(std::forward< Args >(args)...))
typename automaton_t::element_type::automaton_nocv_t automaton_nocv_t
The (shared pointer) type to use it we have to create an automaton of the same (underlying) type...
static constexpr auto pre(Args &&...args) -> decltype(automaton_t::element_type::pre(std::forward< Args >(args)...))
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
automaton_decorator & operator=(automaton_decorator &&that)
auto add_transition(Args &&...args) -> decltype(aut_-> add_transition(std::forward< Args >(args)...))
typename context_t::labelset_ptr labelset_ptr
SharedPtr make_shared_ptr(Args &&...args)
Same as std::make_shared, but parameterized by the shared_ptr type, not the (pointed to) element_type...
static constexpr auto null_transition(Args &&...args) -> decltype(automaton_t::element_type::null_transition(std::forward< Args >(args)...))
auto state_has_name(Args &&...args) const -> decltype(aut_-> state_has_name(std::forward< Args >(args)...))
auto in(Args &&...args) const -> decltype(aut_-> in(std::forward< Args >(args)...))
static constexpr auto null_state(Args &&...args) -> decltype(automaton_t::element_type::null_state(std::forward< Args >(args)...))
auto new_transition(Args &&...args) -> decltype(aut_-> new_transition(std::forward< Args >(args)...))
auto print_state(Args &&...args) const -> decltype(aut_-> print_state(std::forward< Args >(args)...))
auto del_transition(Args &&...args) -> decltype(aut_-> del_transition(std::forward< Args >(args)...))
static constexpr auto post(Args &&...args) -> decltype(automaton_t::element_type::post(std::forward< Args >(args)...))
Aut automaton_t
The type of automaton to wrap.
automaton_t aut_
The wrapped automaton, possibly const.
auto out(Args &&...args) const -> decltype(aut_-> out(std::forward< Args >(args)...))