40 template <
typename SignalT>
43 template <
typename T>
friend class output_impl;
44 friend class detail::access;
46 using signal_ptr_t = std::shared_ptr<SignalT>;
48 const signal_ptr_t& signal()
const {
return signal_; }
51 using value_type = meta::value_t<SignalT>;
53 output_impl() =
default;
54 output_impl(output_impl&&) =
default;
55 output_impl& operator=(output_impl&&) =
default;
56 output_impl(
const output_impl&) =
delete;
57 output_impl& operator=(
const output_impl&) =
delete;
60 output_impl& operator=(output_impl<T>&& x)
62 signal_ = std::move(x.signal_);
67 output_impl(output_impl<T>&& x)
68 : signal_(
std::move(x.signal_))
71 output_impl(signal_ptr_t sig)
72 : signal_(
std::move(sig)) {}
77 return signal_->send_up(std::forward<T>(value));
89 class output :
public detail::output_impl<detail::up_down_signal<T> >
91 using base_t = detail::output_impl<detail::up_down_signal<T> >;
94 using base_t::operator=;
101 template <
typename OutT>
105 detail::output_impl<detail::signal_type_t<OutT> > >
107 return detail::access::signal(std::forward<OutT>(
object));
auto out(OutT &&object) -> estd::enable_if_t< (Out_value< OutT >()), detail::output_impl< detail::signal_type_t< OutT > > >
Creates an out from another out value.
typename std::enable_if< X, T >::type enable_if_t
Similar to C++14 std::enable_if_t.
Provides access to writing values of type T.
This module implements the signal flow in funken.
C++ amazing templates and reusable implementations awesomeness.