CatapultServer  v0.5.0.1 (Elephant)
catapult::utils::ResettableWrappedWithOwnerDecorator< THandler > Class Template Reference
Inheritance diagram for catapult::utils::ResettableWrappedWithOwnerDecorator< THandler >:
Collaboration diagram for catapult::utils::ResettableWrappedWithOwnerDecorator< THandler >:

Public Member Functions

template<typename TOwner >
 ResettableWrappedWithOwnerDecorator (const std::shared_ptr< TOwner > &pOwner, THandler handler)
 Wraps handler and keeps pOwner alive. More...
 
void reset ()
 Releases all resources associated with this object. More...
 
- Public Member Functions inherited from catapult::utils::WrappedWithOwnerDecorator< THandler >
template<typename TOwner >
 WrappedWithOwnerDecorator (const std::shared_ptr< TOwner > &pOwner, THandler handler)
 Wraps handler and keeps pOwner alive. More...
 
template<typename... TArgs>
auto operator() (TArgs &&...args) const
 Forwards args to the wrapped handler. More...
 
const std::shared_ptr< const void > & owner () const
 A reference to the owning pointer. More...
 

Additional Inherited Members

- Protected Attributes inherited from catapult::utils::WrappedWithOwnerDecorator< THandler >
std::shared_ptr< const void > m_pOwner
 
THandler m_handler
 

Detailed Description

template<typename THandler>
class catapult::utils::ResettableWrappedWithOwnerDecorator< THandler >

Decorates a handler by additionally capturing a shared pointer to an owning object, which extends that object's lifetime. This decorator supports reset.

Constructor & Destructor Documentation

◆ ResettableWrappedWithOwnerDecorator()

template<typename THandler >
template<typename TOwner >
catapult::utils::ResettableWrappedWithOwnerDecorator< THandler >::ResettableWrappedWithOwnerDecorator ( const std::shared_ptr< TOwner > &  pOwner,
THandler  handler 
)
inline

Wraps handler and keeps pOwner alive.

Member Function Documentation

◆ reset()

template<typename THandler >
void catapult::utils::ResettableWrappedWithOwnerDecorator< THandler >::reset ( )
inline

Releases all resources associated with this object.


The documentation for this class was generated from the following file: