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

1207  _M_HasCancellationToken(false),
1208  _M_HasScheduler(false)
1209  {
1210  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
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:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:1109
std::shared_ptr< ::Concurrency::scheduler_interface > get_ambient_scheduler()
Definition: pplconcrt.h:64
Concurrency::task_options::task_options ( cancellation_token  _Token)
inline

Task option that specify a cancellation token

1217  _M_CancellationToken(_Token),
1220  _M_HasScheduler(false)
1221  {
1222  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:1109
std::shared_ptr< ::Concurrency::scheduler_interface > get_ambient_scheduler()
Definition: pplconcrt.h:64
Concurrency::task_options::task_options ( task_continuation_context  _ContinuationContext)
inline

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

1230  _M_ContinuationContext(_ContinuationContext),
1231  _M_HasCancellationToken(false),
1232  _M_HasScheduler(false)
1233  {
1234  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
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:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
std::shared_ptr< ::Concurrency::scheduler_interface > get_ambient_scheduler()
Definition: pplconcrt.h:64
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)

1241  _M_CancellationToken(_Token),
1242  _M_ContinuationContext(_ContinuationContext),
1243  _M_HasCancellationToken(false),
1244  _M_HasScheduler(false)
1245  {
1246  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
std::shared_ptr< ::Concurrency::scheduler_interface > get_ambient_scheduler()
Definition: pplconcrt.h:64
template<typename _SchedType >
Concurrency::task_options::task_options ( std::shared_ptr< _SchedType >  _Scheduler)
inline

Task option that specify a scheduler with shared lifetime

1253  : _M_Scheduler(std::move(_Scheduler)),
1256  _M_HasCancellationToken(false),
1257  _M_HasScheduler(true)
1258  {
1259  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:1109
Concurrency::task_options::task_options ( scheduler_interface &  _Scheduler)
inline

Task option that specify a scheduler reference

1265  : _M_Scheduler(&_Scheduler),
1268  _M_HasCancellationToken(false),
1269  _M_HasScheduler(true)
1270  {
1271  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
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:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:1109
Concurrency::task_options::task_options ( scheduler_ptr  _Scheduler)
inline

Task option that specify a scheduler

1277  : _M_Scheduler(std::move(_Scheduler)),
1280  _M_HasCancellationToken(false),
1281  _M_HasScheduler(true)
1282  {
1283  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
static cancellation_token none()
Returns a cancellation token which can never be subject to cancellation.
Definition: pplcancellation_token.h:628
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
static task_continuation_context use_default()
Creates the default task continuation context.
Definition: ppltasks.h:1109
Concurrency::task_options::task_options ( const task_options _TaskOptions)
inline

Task option copy constructor

1289  : _M_Scheduler(_TaskOptions.get_scheduler()),
1290  _M_CancellationToken(_TaskOptions.get_cancellation_token()),
1291  _M_ContinuationContext(_TaskOptions.get_continuation_context()),
1292  _M_HasCancellationToken(_TaskOptions.has_cancellation_token()),
1293  _M_HasScheduler(_TaskOptions.has_scheduler())
1294  {
1295  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool _M_HasScheduler
Definition: ppltasks.h:1365
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
bool _M_HasCancellationToken
Definition: ppltasks.h:1364

Member Function Documentation

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

Returns the cancellation token

1326  {
1327  return _M_CancellationToken;
1328  }
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
task_continuation_context Concurrency::task_options::get_continuation_context ( ) const
inline

Returns the continuation context

1334  {
1335  return _M_ContinuationContext;
1336  }
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362
scheduler_ptr Concurrency::task_options::get_scheduler ( ) const
inline

Returns the scheduler

1350  {
1351  return _M_Scheduler;
1352  }
scheduler_ptr _M_Scheduler
Definition: ppltasks.h:1360
bool Concurrency::task_options::has_cancellation_token ( ) const
inline

Indicates whether a cancellation token was specified by the user

1318  {
1319  return _M_HasCancellationToken;
1320  }
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
bool Concurrency::task_options::has_scheduler ( ) const
inline

Indicates whether a scheduler n was specified by the user

1342  {
1343  return _M_HasScheduler;
1344  }
bool _M_HasScheduler
Definition: ppltasks.h:1365
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

1301  {
1302  _M_CancellationToken = _Token;
1303  _M_HasCancellationToken = true;
1304  }
cancellation_token _M_CancellationToken
Definition: ppltasks.h:1361
bool _M_HasCancellationToken
Definition: ppltasks.h:1364
void Concurrency::task_options::set_continuation_context ( task_continuation_context  _ContinuationContext)
inline

Sets the given continuation context in the options

1310  {
1311  _M_ContinuationContext = _ContinuationContext;
1312  }
task_continuation_context _M_ContinuationContext
Definition: ppltasks.h:1362

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: