ndn::detail::ScopedCancelHandle< HandleT > Class Template Reference

Cancels an operation automatically upon destruction. More...

#include <ndn-cxx/detail/cancel-handle.hpp>

+ Inheritance diagram for ndn::detail::ScopedCancelHandle< HandleT >:

Public Member Functions

 ScopedCancelHandle () noexcept
 
 ScopedCancelHandle (const ScopedCancelHandle &)=delete
 Copy construction is disallowed. More...
 
 ScopedCancelHandle (HandleT hdl) noexcept
 Implicit constructor from HandleT. More...
 
 ScopedCancelHandle (ScopedCancelHandle &&other) noexcept
 Move constructor. More...
 
 ~ScopedCancelHandle ()
 Cancel the operation. More...
 
void cancel ()
 Cancel the operation. More...
 
 operator bool () const noexcept
 
ScopedCancelHandleoperator= (const ScopedCancelHandle &)=delete
 Copy assignment is disallowed. More...
 
ScopedCancelHandleoperator= (ScopedCancelHandle &&other)
 Move assignment operator. More...
 
HandleT release () noexcept
 Release the operation so that it won't be cancelled when this ScopedCancelHandle is destructed. More...
 

Detailed Description

template<typename HandleT>
class ndn::detail::ScopedCancelHandle< HandleT >

Cancels an operation automatically upon destruction.

Definition at line 58 of file cancel-handle.hpp.

Constructor & Destructor Documentation

◆ ScopedCancelHandle() [1/4]

template<typename T >
ndn::detail::ScopedCancelHandle< T >::ScopedCancelHandle ( )
defaultnoexcept

◆ ScopedCancelHandle() [2/4]

template<typename HandleT >
ndn::detail::ScopedCancelHandle< HandleT >::ScopedCancelHandle ( HandleT  hdl)
inlinenoexcept

Implicit constructor from HandleT.

Definition at line 68 of file cancel-handle.hpp.

◆ ScopedCancelHandle() [3/4]

template<typename HandleT >
ndn::detail::ScopedCancelHandle< HandleT >::ScopedCancelHandle ( const ScopedCancelHandle< HandleT > &  )
delete

Copy construction is disallowed.

◆ ScopedCancelHandle() [4/4]

template<typename HandleT >
ndn::detail::ScopedCancelHandle< HandleT >::ScopedCancelHandle ( ScopedCancelHandle< HandleT > &&  other)
inlinenoexcept

Move constructor.

Definition at line 79 of file cancel-handle.hpp.

◆ ~ScopedCancelHandle()

template<typename HandleT >
ndn::detail::ScopedCancelHandle< HandleT >::~ScopedCancelHandle ( )
inline

Cancel the operation.

Definition at line 101 of file cancel-handle.hpp.

Member Function Documentation

◆ cancel()

template<typename HandleT >
void ndn::detail::ScopedCancelHandle< HandleT >::cancel ( )
inline

Cancel the operation.

Definition at line 109 of file cancel-handle.hpp.

◆ operator bool()

template<typename HandleT >
ndn::detail::ScopedCancelHandle< HandleT >::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 124 of file cancel-handle.hpp.

◆ operator=() [1/2]

template<typename HandleT >
ScopedCancelHandle& ndn::detail::ScopedCancelHandle< HandleT >::operator= ( const ScopedCancelHandle< HandleT > &  )
delete

Copy assignment is disallowed.

◆ operator=() [2/2]

template<typename HandleT >
ScopedCancelHandle& ndn::detail::ScopedCancelHandle< HandleT >::operator= ( ScopedCancelHandle< HandleT > &&  other)
inline

Move assignment operator.

Definition at line 92 of file cancel-handle.hpp.

◆ release()

template<typename HandleT >
HandleT ndn::detail::ScopedCancelHandle< HandleT >::release ( )
inlinenoexcept

Release the operation so that it won't be cancelled when this ScopedCancelHandle is destructed.

Definition at line 118 of file cancel-handle.hpp.