STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Concurrency::cancellation_token_registration Class Reference

The cancellation_token_registration class represents a callback notification from a cancellation_token. When the register method on a cancellation_token is used to receive notification of when cancellation occurs, a cancellation_token_registration object is returned as a handle to the callback so that the caller can request a specific callback no longer be made through use of the deregister method. More...

#include <pplcancellation_token.h>

Public Member Functions

 cancellation_token_registration ()
 
 ~cancellation_token_registration ()
 
 cancellation_token_registration (const cancellation_token_registration &_Src)
 
 cancellation_token_registration (cancellation_token_registration &&_Src)
 
cancellation_token_registrationoperator= (const cancellation_token_registration &_Src)
 
cancellation_token_registrationoperator= (cancellation_token_registration &&_Src)
 
bool operator== (const cancellation_token_registration &_Rhs) const
 
bool operator!= (const cancellation_token_registration &_Rhs) const
 

Private Member Functions

 cancellation_token_registration (_In_ details::_CancellationTokenRegistration *_PRegistration)
 
void _Clear ()
 
void _Assign (_In_ details::_CancellationTokenRegistration *_PRegistration)
 
void _Move (_In_ details::_CancellationTokenRegistration *&_PRegistration)
 

Private Attributes

details::_CancellationTokenRegistration_M_pRegistration
 

Friends

class cancellation_token
 

Detailed Description

The cancellation_token_registration class represents a callback notification from a cancellation_token. When the register method on a cancellation_token is used to receive notification of when cancellation occurs, a cancellation_token_registration object is returned as a handle to the callback so that the caller can request a specific callback no longer be made through use of the deregister method.

Constructor & Destructor Documentation

Concurrency::cancellation_token_registration::cancellation_token_registration ( )
inline
524  :
526  {
527  }
#define NULL
Definition: vcruntime.h:236
details::_CancellationTokenRegistration * _M_pRegistration
Definition: pplcancellation_token.h:607
Concurrency::cancellation_token_registration::~cancellation_token_registration ( )
inline
530  {
531  _Clear();
532  }
void _Clear()
Definition: pplcancellation_token.h:583
Concurrency::cancellation_token_registration::cancellation_token_registration ( const cancellation_token_registration _Src)
inline
535  {
536  _Assign(_Src._M_pRegistration);
537  }
void _Assign(_In_ details::_CancellationTokenRegistration *_PRegistration)
Definition: pplcancellation_token.h:592
Concurrency::cancellation_token_registration::cancellation_token_registration ( cancellation_token_registration &&  _Src)
inline
540  {
541  _Move(_Src._M_pRegistration);
542  }
void _Move(_In_ details::_CancellationTokenRegistration *&_PRegistration)
Definition: pplcancellation_token.h:601
Concurrency::cancellation_token_registration::cancellation_token_registration ( _In_ details::_CancellationTokenRegistration _PRegistration)
inlineprivate
578  :
579  _M_pRegistration(_PRegistration)
580  {
581  }
details::_CancellationTokenRegistration * _M_pRegistration
Definition: pplcancellation_token.h:607

Member Function Documentation

void Concurrency::cancellation_token_registration::_Assign ( _In_ details::_CancellationTokenRegistration _PRegistration)
inlineprivate
593  {
594  if (_PRegistration != NULL)
595  {
596  _PRegistration->_Reference();
597  }
598  _M_pRegistration = _PRegistration;
599  }
#define NULL
Definition: vcruntime.h:236
details::_CancellationTokenRegistration * _M_pRegistration
Definition: pplcancellation_token.h:607
void Concurrency::cancellation_token_registration::_Clear ( )
inlineprivate
584  {
585  if (_M_pRegistration != NULL)
586  {
588  }
590  }
#define NULL
Definition: vcruntime.h:236
long _Release()
Definition: pplcancellation_token.h:73
details::_CancellationTokenRegistration * _M_pRegistration
Definition: pplcancellation_token.h:607
void Concurrency::cancellation_token_registration::_Move ( _In_ details::_CancellationTokenRegistration *&  _PRegistration)
inlineprivate
602  {
603  _M_pRegistration = _PRegistration;
604  _PRegistration = NULL;
605  }
#define NULL
Definition: vcruntime.h:236
details::_CancellationTokenRegistration * _M_pRegistration
Definition: pplcancellation_token.h:607
bool Concurrency::cancellation_token_registration::operator!= ( const cancellation_token_registration _Rhs) const
inline
570  {
571  return !(operator==(_Rhs));
572  }
bool operator==(const cancellation_token_registration &_Rhs) const
Definition: pplcancellation_token.h:564
cancellation_token_registration& Concurrency::cancellation_token_registration::operator= ( const cancellation_token_registration _Src)
inline
545  {
546  if (this != &_Src)
547  {
548  _Clear();
549  _Assign(_Src._M_pRegistration);
550  }
551  return *this;
552  }
void _Clear()
Definition: pplcancellation_token.h:583
void _Assign(_In_ details::_CancellationTokenRegistration *_PRegistration)
Definition: pplcancellation_token.h:592
cancellation_token_registration& Concurrency::cancellation_token_registration::operator= ( cancellation_token_registration &&  _Src)
inline
555  {
556  if (this != &_Src)
557  {
558  _Clear();
559  _Move(_Src._M_pRegistration);
560  }
561  return *this;
562  }
void _Move(_In_ details::_CancellationTokenRegistration *&_PRegistration)
Definition: pplcancellation_token.h:601
void _Clear()
Definition: pplcancellation_token.h:583
bool Concurrency::cancellation_token_registration::operator== ( const cancellation_token_registration _Rhs) const
inline
565  {
566  return _M_pRegistration == _Rhs._M_pRegistration;
567  }
details::_CancellationTokenRegistration * _M_pRegistration
Definition: pplcancellation_token.h:607

Friends And Related Function Documentation

friend class cancellation_token
friend

Member Data Documentation

details::_CancellationTokenRegistration* Concurrency::cancellation_token_registration::_M_pRegistration
private

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