18 #include <type_traits>
31 template <
typename Signature,
typename Traits_,
bool isLegacy>
35 template <
typename Out,
typename... In,
typename Traits_>
38 using DataHandleMixin<std::tuple<Out>,
filter_evtcontext<In...>, Traits_>::DataHandleMixin;
43 if constexpr (
sizeof...( In ) == 0 ) {
44 put( std::get<0>( this->m_outputs ), ( *
this )() );
45 }
else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) {
48 put( std::get<0>( this->m_outputs ), filter_evtcontext_t<In...>::apply( *
this, this->m_inputs ) );
50 return FilterDecision::PASSED;
61 template <
typename Out,
typename... In,
typename Traits_>
64 using DataHandleMixin<std::tuple<Out>,
filter_evtcontext<In...>, Traits_>::DataHandleMixin;
69 if constexpr (
sizeof...( In ) == 0 ) {
70 put( std::get<0>( this->m_outputs ), ( *
this )() );
71 }
else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) {
72 put( std::get<0>( this->m_outputs ), ( *
this )(
ctx ) );
74 put( std::get<0>( this->m_outputs ), filter_evtcontext_t<In...>::apply( *
this,
ctx, this->m_inputs ) );
76 return FilterDecision::PASSED;
90 template <
typename Signature,
typename Traits_,
bool isLegacy>
93 template <
typename... Out,
typename... In,
typename Traits_>
95 : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> {
102 [
this](
auto&... ohandle ) {
105 if constexpr (
sizeof...( In ) == 0 ) {
106 std::apply( [&ohandle...](
107 auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); },
108 std::as_const( *
this )() );
110 std::apply( [&ohandle...](
111 auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); },
112 filter_evtcontext_t<In...>::apply( std::as_const( *
this ), this->m_inputs ) );
117 return FilterDecision::PASSED;
128 template <
typename... Out,
typename... In,
typename Traits_>
130 : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> {
138 [
this, &
ctx](
auto&... ohandle ) {
139 if constexpr (
sizeof...( In ) == 0 ) {
140 std::apply( [&ohandle...](
141 auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); },
143 }
else if constexpr ( std::tuple_size_v<filter_evtcontext<In...>> == 0 ) {
144 std::apply( [&ohandle...](
145 auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); },
148 std::apply( [&ohandle...](
149 auto&&... data ) { ( put( ohandle, std::forward<decltype( data )>( data ) ), ... ); },
150 filter_evtcontext_t<In...>::apply( *
this,
ctx, this->m_inputs ) );
155 return FilterDecision::PASSED;
169 template <
typename Signature,
typename Traits_,
bool isLegacy>
172 template <
typename... Out,
typename... In,
typename Traits_>
174 : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> {
181 [&](
auto&... ohandle ) {
184 [&ohandle...](
bool passed,
auto&&... data ) {
185 ( put( ohandle, std::forward<decltype( data )>( data ) ), ... );
188 filter_evtcontext_t<In...>::apply( *
this, this->m_inputs ) );
192 ? FilterDecision::PASSED
193 : FilterDecision::FAILED;
204 template <
typename... Out,
typename... In,
typename Traits_>
206 : DataHandleMixin<std::tuple<Out...>, filter_evtcontext<In...>, Traits_> {
215 [&ohandle...](
bool passed,
auto&&... data ) {
216 ( put( ohandle, std::forward<decltype( data )>( data ) ), ... );
219 filter_evtcontext_t<In...>::apply( *
this,
ctx, this->m_inputs ) );
224 ? FilterDecision::PASSED
225 : FilterDecision::FAILED;
237 template <
typename Signature,
typename Traits_ = Traits::useDefaults>
240 template <
typename Signature,
typename Traits_ = Traits::useDefaults>
243 template <
typename Signature,
typename Traits_ = Traits::useDefaults>