-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRxActionChain.cpp
executable file
·66 lines (50 loc) · 1.77 KB
/
RxActionChain.cpp
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "RxStreamer/RxActionChain.h"
namespace Reactor
{
RxActionChain::RxActionChain(Templates::ActionContextPtr rxContext, RxData::CacheDescription masterCacheId, DataAccessControllerPolicy policy)
: dataAccessController_(RxDataAccessController::Create(masterCacheId, policy, rxContext))
{ }
RxActionChain::~RxActionChain()
{}
// --------------------------------------------------
// Factory functions
// --------------------------------------------------
RxActionChain RxActionChain::Empty()
{
return RxActionChain(Templates::ActionContextPtr( new Templates::ActionContext()), RxData::CacheDescription::Empty(), DataAccessControllerPolicy::Default());
}
RxActionChain RxActionChain::Create(Templates::ActionContextPtr actionContext, RxData::CacheDescription cacheId)
{
return RxActionChain(actionContext, cacheId, DataAccessControllerPolicy::Default());
}
RxActionChain RxActionChain::Create(Templates::ActionContextPtr actionContext, RxData::CacheDescription cacheId, DataAccessControllerPolicy policy)
{
return RxActionChain(actionContext, cacheId, policy);
}
// --------------------------------------------------
// Access state
// --------------------------------------------------
DataAccessController::Ptr RxActionChain::Controller() const
{
return dataAccessController_.Controller();
}
bool RxActionChain::Subscribe()
{
return dataAccessController_.Controller()->Subscribe();
}
bool RxActionChain::IsInitialized()
{
return true;
}
// --------------------------------------------------
// Create and add groups
// --------------------------------------------------
RxDataAccessGroup RxActionChain::Sequential()
{
return dataAccessController_.Sequential();
}
RxDataAccessGroup RxActionChain::Parallel()
{
return dataAccessController_.Parallel();
}
}