comparison Framework/Deprecated/Loaders/LoaderStateMachine.h @ 1310:9bea7e15b519 broker

- first pass at changes to cope with the refactoring of the loading system - global loader-related data accessible through ILoadersContext::ILock - many changes in legacy loaders (CT, RTSTRUCT, DOSE) + loader cache - NOT FINISHED! there are shared_from_this calls in ctors! this will crash!
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 09 Mar 2020 14:53:22 +0100
parents 7ec8fea061b9
children 9b126de2cde2
comparison
equal deleted inserted replaced
1309:1f877e0846fe 1310:9bea7e15b519
30 #include "../../Oracle/OrthancRestApiCommand.h" 30 #include "../../Oracle/OrthancRestApiCommand.h"
31 31
32 #include <Core/IDynamicObject.h> 32 #include <Core/IDynamicObject.h>
33 33
34 #include <list> 34 #include <list>
35
36 namespace OrthancStone
37 {
38 class ILoadersContext;
39 }
35 40
36 namespace Deprecated 41 namespace Deprecated
37 { 42 {
38 /** 43 /**
39 This class is supplied with Oracle commands and will schedule up to 44 This class is supplied with Oracle commands and will schedule up to
92 template <typename T> 97 template <typename T>
93 void HandleSuccessMessage(const T& message); 98 void HandleSuccessMessage(const T& message);
94 99
95 typedef std::list<OrthancStone::IOracleCommand*> PendingCommands; 100 typedef std::list<OrthancStone::IOracleCommand*> PendingCommands;
96 101
97 OrthancStone::IOracle& oracle_; 102 OrthancStone::ILoadersContext& loadersContext_;
98 bool active_; 103 bool active_;
99 unsigned int simultaneousDownloads_; 104 unsigned int simultaneousDownloads_;
100 PendingCommands pendingCommands_; 105 PendingCommands pendingCommands_;
101 unsigned int activeCommands_; 106 unsigned int activeCommands_;
102 107
103 public: 108 public:
104 LoaderStateMachine(OrthancStone::IOracle& oracle, 109 LoaderStateMachine(OrthancStone::ILoadersContext& loadersContext);
105 OrthancStone::IObservable& oracleObservable);
106 110
107 virtual ~LoaderStateMachine(); 111 virtual ~LoaderStateMachine();
108 112
109 bool IsActive() const 113 bool IsActive() const
110 { 114 {