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

Represents a pointer to a scheduler. This class exists to allow the the specification of a shared lifetime by using shared_ptr or just a plain reference by using raw pointer. More...

#include <pplinterface.h>

Public Member Functions

 scheduler_ptr (std::shared_ptr< scheduler_interface > _Scheduler)
 Creates a scheduler pointer from shared_ptr to scheduler More...
 
 scheduler_ptr (_In_opt_ scheduler_interface *_PScheduler)
 Creates a scheduler pointer from raw pointer to scheduler More...
 
scheduler_interface * operator-> () const
 Behave like a pointer More...
 
scheduler_interface * get () const
 Returns the raw pointer to the scheduler More...
 
 operator bool () const
 Test whether the scheduler pointer is non-null More...
 

Private Attributes

std::shared_ptr< scheduler_interface > _M_sharedScheduler
 
scheduler_interface * _M_scheduler
 

Detailed Description

Represents a pointer to a scheduler. This class exists to allow the the specification of a shared lifetime by using shared_ptr or just a plain reference by using raw pointer.

Constructor & Destructor Documentation

Concurrency::scheduler_ptr::scheduler_ptr ( std::shared_ptr< scheduler_interface >  _Scheduler)
inlineexplicit

Creates a scheduler pointer from shared_ptr to scheduler

52  : _M_sharedScheduler(std::move(_Scheduler))
53  {
55  }
scheduler_interface * _M_scheduler
Definition: pplinterface.h:88
std::shared_ptr< scheduler_interface > _M_sharedScheduler
Definition: pplinterface.h:87
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
Concurrency::scheduler_ptr::scheduler_ptr ( _In_opt_ scheduler_interface *  _PScheduler)
inlineexplicit

Creates a scheduler pointer from raw pointer to scheduler

60  : _M_scheduler(_PScheduler)
61  {
62  }
scheduler_interface * _M_scheduler
Definition: pplinterface.h:88

Member Function Documentation

scheduler_interface* Concurrency::scheduler_ptr::get ( ) const
inline

Returns the raw pointer to the scheduler

76  {
77  return _M_scheduler;
78  }
scheduler_interface * _M_scheduler
Definition: pplinterface.h:88
Concurrency::scheduler_ptr::operator bool ( ) const
inline

Test whether the scheduler pointer is non-null

83 { return get() != nullptr; }
scheduler_interface* Concurrency::scheduler_ptr::operator-> ( ) const
inline

Behave like a pointer

68  {
69  return get();
70  }

Member Data Documentation

scheduler_interface* Concurrency::scheduler_ptr::_M_scheduler
private
std::shared_ptr<scheduler_interface> Concurrency::scheduler_ptr::_M_sharedScheduler
private

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