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

1071  _M_HasCancellationToken(false),
1072  _M_HasScheduler(false)
1073  {
1074  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1224
bool _M_HasScheduler
Definition: ppltasks.h:1229
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:1225
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1226
bool _M_HasCancellationToken
Definition: ppltasks.h:1228
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:936
Concurrency::task_options::task_options ( cancellation_token  _Token)
inline

Task option that specify a cancellation token

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

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

1094  _M_ContinuationContext(_ContinuationContext),
1095  _M_HasCancellationToken(false),
1096  _M_HasScheduler(false)
1097  {
1098  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1224
bool _M_HasScheduler
Definition: ppltasks.h:1229
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:1225
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1226
bool _M_HasCancellationToken
Definition: ppltasks.h:1228
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)

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

Task option that specify a scheduler with shared lifetime

1117  : _M_Scheduler(std::move(_Scheduler)),
1120  _M_HasCancellationToken(false),
1121  _M_HasScheduler(true)
1122  {
1123  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1224
bool _M_HasScheduler
Definition: ppltasks.h:1229
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:1225
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1226
bool _M_HasCancellationToken
Definition: ppltasks.h:1228
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:936
Concurrency::task_options::task_options ( scheduler_interface &  _Scheduler)
inline

Task option that specify a scheduler reference

1129  : _M_Scheduler(&_Scheduler),
1132  _M_HasCancellationToken(false),
1133  _M_HasScheduler(true)
1134  {
1135  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1224
bool _M_HasScheduler
Definition: ppltasks.h:1229
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:1225
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1226
bool _M_HasCancellationToken
Definition: ppltasks.h:1228
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:936
Concurrency::task_options::task_options ( scheduler_ptr  _Scheduler)
inline

Task option that specify a scheduler

1141  : _M_Scheduler(std::move(_Scheduler)),
1144  _M_HasCancellationToken(false),
1145  _M_HasScheduler(true)
1146  {
1147  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1224
bool _M_HasScheduler
Definition: ppltasks.h:1229
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:1225
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1226
bool _M_HasCancellationToken
Definition: ppltasks.h:1228
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:936
Concurrency::task_options::task_options ( const task_options _TaskOptions)
inline

Task option copy constructor

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

Member Function Documentation

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

Returns the cancellation token

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

Returns the continuation context

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

Returns the scheduler

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

Indicates whether a cancellation token was specified by the user

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

Indicates whether a scheduler n was specified by the user

1206  {
1207  return _M_HasScheduler;
1208  }
bool _M_HasScheduler
Definition: ppltasks.h:1229
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

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

Sets the given continuation context in the options

1174  {
1175  _M_ContinuationContext = _ContinuationContext;
1176  }
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1226

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: