19 #include <type_traits> 46 template <
class R,
class W,
class... Handlers>
49 template <
class R,
class W>
58 template <
class Handler>
64 template <
class Handler>
68 template <
class R,
class W,
class Handler,
class... Handlers>
71 ,
public std::conditional<std::is_abstract<Handler>::value,
72 BaseWithoutOptional<Handler>,
73 BaseWithOptional<Handler>>
::type {
75 using Ptr = std::shared_ptr<StaticPipeline>;
77 template <
class... HandlerArgs>
79 auto ptr = std::shared_ptr<StaticPipeline>(
92 template <
class... HandlerArgs>
98 template <
class HandlerArg,
class... HandlerArgs>
102 HandlerArgs&&... handlers)
105 std::forward<HandlerArgs>(handlers)...) {
107 setHandler(std::forward<HandlerArg>(
handler));
118 template <
class HandlerArg>
119 typename std::enable_if<std::is_same<
125 handlerPtr_ = std::shared_ptr<Handler>(
130 template <
class HandlerArg>
131 typename std::enable_if<std::is_same<
133 std::shared_ptr<Handler>
136 handlerPtr_ = std::forward<HandlerArg>(arg);
139 template <
class HandlerArg>
140 typename std::enable_if<std::is_same<
141 typename std::decay<HandlerArg>::type,
145 handlerPtr_ = std::shared_ptr<Handler>(arg, [](Handler*){});
std::shared_ptr< StaticPipeline > Ptr
void addContextFront(Context *ctx)
static Ptr create(HandlerArgs &&...handlers)
std::shared_ptr< Handler > handlerPtr_
StaticPipeline(bool isFirst, HandlerArg &&handler, HandlerArgs &&...handlers)
std::shared_ptr< FizzServerContext > ctx_
std::enable_if< std::is_same< typename std::decay< HandlerArg >::type, Handler * >::value >::type setHandler(HandlerArg &&arg)
void handler(int, siginfo_t *, void *)
std::conditional< Handler::dir==HandlerDir::BOTH, ContextImpl< Handler >, typename std::conditional< Handler::dir==HandlerDir::IN, InboundContextImpl< Handler >, OutboundContextImpl< Handler > >::type >::type type
folly::Optional< Handler > handler_
static const char *const value
StaticPipeline(HandlerArgs &&...handlers)
std::enable_if< std::is_same< typename std::decay< HandlerArg >::type, std::shared_ptr< Handler > >::value >::type setHandler(HandlerArg &&arg)
~StaticPipeline() override
std::enable_if< std::is_same< typename std::remove_reference< HandlerArg >::type, Handler >::value >::type setHandler(HandlerArg &&arg)
ContextType< Handler >::type ctx_