AsyncTaskRunnerFactory.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <Bentley/Tasks/Tasks.h>
13 
15 
16 /*--------------------------------------------------------------------------------------+
17 * @bsiclass Bentley Systems
18 +---------------+---------------+---------------+---------------+---------------+------*/
20  {
21  public:
22  virtual std::shared_ptr<ITaskRunner> CreateRunner () = 0;
23  };
24 
25 /*--------------------------------------------------------------------------------------+
26 * @bsiclass Bentley Systems
27 +---------------+---------------+---------------+---------------+---------------+------*/
28 template<typename R>
30  {
31  public:
32  /*--------------------------------------------------------------------------------------+
33  * @bsimethod Bentley Systems
34  +---------------+---------------+---------------+---------------+---------------+------*/
35  std::shared_ptr<ITaskRunner> CreateRunner () override
36  {
37  return R::Create ();
38  }
39  };
40 
std::shared_ptr< ITaskRunner > CreateRunner() override
Definition: AsyncTaskRunnerFactory.h:35
#define BEGIN_BENTLEY_TASKS_NAMESPACE
Definition: Tasks.h:13
Definition: AsyncTaskRunnerFactory.h:29
Definition: AsyncTaskRunnerFactory.h:19
#define END_BENTLEY_TASKS_NAMESPACE
Definition: Tasks.h:14

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.