ndn::detail::ScopedCancelHandle Class Reference

Cancels an operation automatically upon destruction. More...

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

+ Inheritance diagram for ndn::detail::ScopedCancelHandle:

Public Member Functions

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

Detailed Description

Cancels an operation automatically upon destruction.

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

Constructor & Destructor Documentation

ndn::detail::ScopedCancelHandle::ScopedCancelHandle ( )
defaultnoexcept
ndn::detail::ScopedCancelHandle::ScopedCancelHandle ( CancelHandle  hdl)

Implicit constructor from CancelHandle.

Definition at line 41 of file cancel-handle.cpp.

ndn::detail::ScopedCancelHandle::ScopedCancelHandle ( const ScopedCancelHandle )
delete

Copy construction is disallowed.

ndn::detail::ScopedCancelHandle::ScopedCancelHandle ( ScopedCancelHandle &&  other)

Move constructor.

Definition at line 46 of file cancel-handle.cpp.

ndn::detail::ScopedCancelHandle::~ScopedCancelHandle ( )

Cancel the operation.

Definition at line 59 of file cancel-handle.cpp.

Member Function Documentation

void ndn::detail::ScopedCancelHandle::cancel ( )

Cancel the operation.

Definition at line 65 of file cancel-handle.cpp.

ScopedCancelHandle& ndn::detail::ScopedCancelHandle::operator= ( const ScopedCancelHandle )
delete

Copy assignment is disallowed.

ScopedCancelHandle & ndn::detail::ScopedCancelHandle::operator= ( ScopedCancelHandle &&  other)

Move assignment operator.

Definition at line 52 of file cancel-handle.cpp.

CancelHandle ndn::detail::ScopedCancelHandle::release ( )

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

Returns
the CancelHandle.

Definition at line 71 of file cancel-handle.cpp.