NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::detail::ScopedCancelHandle Class Reference

Cancels an operation automatically upon destruction. More...

#include <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...
 
ScopedCancelHandleoperator= (const ScopedCancelHandle &)=delete
 Copy assignment is disallowed. More...
 
ScopedCancelHandleoperator= (ScopedCancelHandle &&other)
 Move assignment operator. More...
 
 ~ScopedCancelHandle ()
 Cancel the operation. More...
 
void cancel ()
 Cancel the operation. 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

◆ ScopedCancelHandle() [1/4]

ndn::detail::ScopedCancelHandle::ScopedCancelHandle ( )
defaultnoexcept

◆ ScopedCancelHandle() [2/4]

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

Implicit constructor from CancelHandle.

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

◆ ScopedCancelHandle() [3/4]

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

Copy construction is disallowed.

◆ ScopedCancelHandle() [4/4]

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

Move constructor.

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

◆ ~ScopedCancelHandle()

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

Cancel the operation.

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

References ndn::detail::CancelHandle::cancel().

Member Function Documentation

◆ operator=() [1/2]

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

Copy assignment is disallowed.

◆ operator=() [2/2]

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

Move assignment operator.

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

References cancel().

◆ cancel()

◆ release()

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.

References nonstd::any_lite::swap().

Referenced by cancel().


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