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

Cancels an operation automatically upon destruction. More...

#include <cancel-handle.hpp>

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

Public Member Functions

 ScopedCancelHandle () noexcept
 
 ScopedCancelHandle (HandleT hdl) noexcept
 Implicit constructor from HandleT. More...
 
 ScopedCancelHandle (const ScopedCancelHandle &)=delete
 Copy construction is disallowed. More...
 
 ScopedCancelHandle (ScopedCancelHandle &&other) noexcept
 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...
 
HandleT release () noexcept
 Release the operation so that it won't be cancelled when this ScopedCancelHandle is destructed. More...
 
 operator bool () const noexcept
 

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

◆ 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.

◆ cancel()

◆ 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.

◆ operator bool()

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

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


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