CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
24 namespace catapult {
namespace utils {
28 template<
typename THandler>
32 template<
typename TOwner>
40 template<
typename... TArgs>
42 return m_handler(std::forward<TArgs>(args)...);
46 const std::shared_ptr<const void>&
owner()
const {
57 template<
typename THandler>
61 template<
typename TOwner>
THandler m_handler
Definition: BufferedPacketIo.cpp:111
ResettableWrappedWithOwnerDecorator(const std::shared_ptr< TOwner > &pOwner, THandler handler)
Wraps handler and keeps pOwner alive.
Definition: WrappedWithOwnerDecorator.h:62
void reset()
Releases all resources associated with this object.
Definition: WrappedWithOwnerDecorator.h:68
Definition: WrappedWithOwnerDecorator.h:58
std::shared_ptr< const void > m_pOwner
Definition: ParallelValidationPolicy.cpp:138
THandler m_handler
Definition: WrappedWithOwnerDecorator.h:52
Definition: AddressExtractionExtension.cpp:28
auto operator()(TArgs &&...args) const
Forwards args to the wrapped handler.
Definition: WrappedWithOwnerDecorator.h:41
Definition: WrappedWithOwnerDecorator.h:29
const std::shared_ptr< const void > & owner() const
A reference to the owning pointer.
Definition: WrappedWithOwnerDecorator.h:46
std::shared_ptr< const void > m_pOwner
Definition: WrappedWithOwnerDecorator.h:51
WrappedWithOwnerDecorator(const std::shared_ptr< TOwner > &pOwner, THandler handler)
Wraps handler and keeps pOwner alive.
Definition: WrappedWithOwnerDecorator.h:33