39 template <
typename SignalT>
41 :
private watchable<meta::value_t<SignalT> >
43 template <
typename T>
friend class input_impl;
44 friend class detail::access;
46 using base_t = watchable<meta::value_t<SignalT> >;
47 using signal_ptr_t = std::shared_ptr<SignalT>;
50 const signal_ptr_t& signal()
const {
return signal_; }
53 using value_type = meta::value_t<SignalT>;
55 input_impl() =
default;
56 input_impl(input_impl&&) =
default;
57 input_impl& operator=(input_impl&&) =
default;
58 input_impl(
const input_impl&) =
delete;
59 input_impl& operator=(
const input_impl&) =
delete;
62 input_impl& operator=(input_impl<T>&& x)
64 base_t::operator=(std::move(x));
65 signal_ = std::move(x.signal_);
70 input_impl(input_impl<T>&& x)
71 : base_t(
std::move(x))
72 , signal_(
std::move(x.signal_))
75 input_impl(signal_ptr_t sig)
76 : signal_(
std::move(sig)) {}
90 class input :
public detail::input_impl<detail::down_signal<T> >
92 using base_t = detail::input_impl<detail::down_signal<T> >;
95 using base_t::operator=;
102 template <
typename InT>
103 auto in(InT&&
object)
106 detail::input_impl<detail::signal_type_t<InT> > >
108 return detail::access::signal(std::forward<InT>(
object));
#define ABL_DECLTYPE_RETURN(body_expr)
Utility for defining generic functions with a deduced return type, that are composed of a single expr...
typename std::enable_if< X, T >::type enable_if_t
Similar to C++14 std::enable_if_t.
auto in(InT &&object) -> estd::enable_if_t< (In_value< InT >()), detail::input_impl< detail::signal_type_t< InT > > >
Creates an in from another in value.
This module implements the signal flow in funken.
C++ amazing templates and reusable implementations awesomeness.