-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFlowController.h
41 lines (31 loc) · 1.09 KB
/
FlowController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include"RxConcurrent/CommonDefines.h"
namespace BaseLib { namespace Concurrent
{
template <typename V>
class FlowController
: public Templates::Action0<bool>
, public Templates::ResumeMethod
, public Templates::IsResumedMethod
, public Templates::SuspendMethod
, public Templates::TriggerMethod
, public Templates::IsSuspendedMethod
, public Templates::IsEmptyMethod
, public Templates::InitializeMethods
, public Templates::ReactorMethods<bool, V, BaseLib::Exception>
, public ENABLE_SHARED_FROM_THIS_T1(FlowController, V)
{
public:
virtual ~FlowController() {}
CLASS_TRAITS(FlowController)
typename FlowController<V>::Ptr GetPtr()
{
return this->shared_from_this();
}
virtual std::list<V> Pull() = 0;
virtual std::list<V> History() const = 0;
virtual bool Set(Templates::Action0<bool>::Ptr action) = 0;
virtual const FlowControllerStatus& Status() const = 0;
virtual Duration NextSchedule(const Status::ExecutionStatus &status, const TaskPolicy &policy) = 0;
};
}}