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::task_options Class Reference

Represents the allowed options for creating a task More...

#include <ppltasks.h>

Public Member Functions

 task_options ()
 Default list of task creation options More...
 
 task_options (cancellation_token _Token)
 Task option that specify a cancellation token More...
 
 task_options (task_continuation_context _ContinuationContext)
 Task option that specify a continuation context. This is valid only for continuations (then) More...
 
 task_options (cancellation_token _Token, task_continuation_context _ContinuationContext)
 Task option that specify a cancellation token and a continuation context. This is valid only for continuations (then) More...
 
template<typename _SchedType >
 task_options (std::shared_ptr< _SchedType > _Scheduler)
 Task option that specify a scheduler with shared lifetime More...
 
 task_options (scheduler_interface &_Scheduler)
 Task option that specify a scheduler reference More...
 
 task_options (scheduler_ptr _Scheduler)
 Task option that specify a scheduler More...
 
 task_options (const task_options &_TaskOptions)
 Task option copy constructor More...
 
void set_cancellation_token (cancellation_token _Token)
 Sets the given token in the options More...
 
void set_continuation_context (task_continuation_context _ContinuationContext)
 Sets the given continuation context in the options More...
 
bool has_cancellation_token () const
 Indicates whether a cancellation token was specified by the user More...
 
cancellation_token get_cancellation_token () const
 Returns the cancellation token More...
 
task_continuation_context get_continuation_context () const
 Returns the continuation context More...
 
bool has_scheduler () const
 Indicates whether a scheduler n was specified by the user More...
 
scheduler_ptr get_scheduler () const
 Returns the scheduler More...
 

Private Member Functions

task_options const & operator= (task_options const &_Right)
 

Private Attributes

scheduler_ptr _M_Scheduler
 
cancellation_token _M_CancellationToken
 
task_continuation_context _M_ContinuationContext
 
details::_Internal_task_options _M_InternalTaskOptions
 
bool _M_HasCancellationToken
 
bool _M_HasScheduler
 

Friends

details::_Internal_task_optionsdetails::_get_internal_task_options (task_options &)
 
const details::_Internal_task_optionsdetails::_get_internal_task_options (const task_options &)
 

Detailed Description

Represents the allowed options for creating a task

Constructor & Destructor Documentation

Concurrency::task_options::task_options ( )
inline

Default list of task creation options

1072  _M_HasCancellationToken(false),
1073  _M_HasScheduler(false)
1074  {
1075  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
const ::std::shared_ptr< scheduler_interface > & get_ambient_scheduler()
Definition: pplwin.h:88
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:937
Concurrency::task_options::task_options ( cancellation_token  _Token)
inline

Task option that specify a cancellation token

1082  _M_CancellationToken(_Token),
1085  _M_HasScheduler(false)
1086  {
1087  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
const ::std::shared_ptr< scheduler_interface > & get_ambient_scheduler()
Definition: pplwin.h:88
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:937
Concurrency::task_options::task_options ( task_continuation_context  _ContinuationContext)
inline

Task option that specify a continuation context. This is valid only for continuations (then)

1095  _M_ContinuationContext(_ContinuationContext),
1096  _M_HasCancellationToken(false),
1097  _M_HasScheduler(false)
1098  {
1099  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
const ::std::shared_ptr< scheduler_interface > & get_ambient_scheduler()
Definition: pplwin.h:88
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
Concurrency::task_options::task_options ( cancellation_token  _Token,
task_continuation_context  _ContinuationContext 
)
inline

Task option that specify a cancellation token and a continuation context. This is valid only for continuations (then)

1106  _M_CancellationToken(_Token),
1107  _M_ContinuationContext(_ContinuationContext),
1109  _M_HasScheduler(false)
1110  {
1111  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
const ::std::shared_ptr< scheduler_interface > & get_ambient_scheduler()
Definition: pplwin.h:88
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
template<typename _SchedType >
Concurrency::task_options::task_options ( std::shared_ptr< _SchedType >  _Scheduler)
inline

Task option that specify a scheduler with shared lifetime

1118  : _M_Scheduler(std::move(_Scheduler)),
1121  _M_HasCancellationToken(false),
1122  _M_HasScheduler(true)
1123  {
1124  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:937
Concurrency::task_options::task_options ( scheduler_interface &  _Scheduler)
inline

Task option that specify a scheduler reference

1130  : _M_Scheduler(&_Scheduler),
1133  _M_HasCancellationToken(false),
1134  _M_HasScheduler(true)
1135  {
1136  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:937
Concurrency::task_options::task_options ( scheduler_ptr  _Scheduler)
inline

Task option that specify a scheduler

1142  : _M_Scheduler(std::move(_Scheduler)),
1145  _M_HasCancellationToken(false),
1146  _M_HasScheduler(true)
1147  {
1148  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:937
Concurrency::task_options::task_options ( const task_options _TaskOptions)
inline

Task option copy constructor

1154  : _M_Scheduler(_TaskOptions.get_scheduler()),
1155  _M_CancellationToken(_TaskOptions.get_cancellation_token()),
1156  _M_ContinuationContext(_TaskOptions.get_continuation_context()),
1157  _M_HasCancellationToken(_TaskOptions.has_cancellation_token()),
1158  _M_HasScheduler(_TaskOptions.has_scheduler())
1159  {
1160  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool _M_HasScheduler
Definition: ppltasks.h:1230
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
bool _M_HasCancellationToken
Definition: ppltasks.h:1229

Member Function Documentation

cancellation_token Concurrency::task_options::get_cancellation_token ( ) const
inline

Returns the cancellation token

1191  {
1192  return _M_CancellationToken;
1193  }
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
task_continuation_context Concurrency::task_options::get_continuation_context ( ) const
inline

Returns the continuation context

1199  {
1200  return _M_ContinuationContext;
1201  }
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227
scheduler_ptr Concurrency::task_options::get_scheduler ( ) const
inline

Returns the scheduler

1215  {
1216  return _M_Scheduler;
1217  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1225
bool Concurrency::task_options::has_cancellation_token ( ) const
inline

Indicates whether a cancellation token was specified by the user

1183  {
1184  return _M_HasCancellationToken;
1185  }
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
bool Concurrency::task_options::has_scheduler ( ) const
inline

Indicates whether a scheduler n was specified by the user

1207  {
1208  return _M_HasScheduler;
1209  }
bool _M_HasScheduler
Definition: ppltasks.h:1230
task_options const& Concurrency::task_options::operator= ( task_options const &  _Right)
private
void Concurrency::task_options::set_cancellation_token ( cancellation_token  _Token)
inline

Sets the given token in the options

1166  {
1167  _M_CancellationToken = _Token;
1168  _M_HasCancellationToken = true;
1169  }
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1226
bool _M_HasCancellationToken
Definition: ppltasks.h:1229
void Concurrency::task_options::set_continuation_context ( task_continuation_context  _ContinuationContext)
inline

Sets the given continuation context in the options

1175  {
1176  _M_ContinuationContext = _ContinuationContext;
1177  }
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1227

Friends And Related Function Documentation

Member Data Documentation

cancellation_token Concurrency::task_options::_M_CancellationToken
private
task_continuation_context Concurrency::task_options::_M_ContinuationContext
private
bool Concurrency::task_options::_M_HasCancellationToken
private
bool Concurrency::task_options::_M_HasScheduler
private
details::_Internal_task_options Concurrency::task_options::_M_InternalTaskOptions
private
scheduler_ptr Concurrency::task_options::_M_Scheduler
private

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