event dispatcher
This commit is contained in:
@@ -6,9 +6,10 @@
|
||||
#include "RuntimeStore.h"
|
||||
#include <windows.h>
|
||||
|
||||
ControlServices::ControlServices() :
|
||||
ControlServices::ControlServices(RuntimeEventDispatcher& runtimeEventDispatcher) :
|
||||
mControlServer(std::make_unique<ControlServer>()),
|
||||
mOscServer(std::make_unique<OscServer>()),
|
||||
mRuntimeEventDispatcher(runtimeEventDispatcher),
|
||||
mPollRunning(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
class ControlServer;
|
||||
class OpenGLComposite;
|
||||
class OscServer;
|
||||
class RuntimeEventDispatcher;
|
||||
class RuntimeStore;
|
||||
|
||||
struct RuntimeCoordinatorServiceResult
|
||||
@@ -40,7 +41,7 @@ public:
|
||||
uint64_t generation = 0;
|
||||
};
|
||||
|
||||
ControlServices();
|
||||
explicit ControlServices(RuntimeEventDispatcher& runtimeEventDispatcher);
|
||||
~ControlServices();
|
||||
|
||||
bool Start(OpenGLComposite& composite, RuntimeStore& runtimeStore, std::string& error);
|
||||
@@ -79,6 +80,7 @@ private:
|
||||
|
||||
std::unique_ptr<ControlServer> mControlServer;
|
||||
std::unique_ptr<OscServer> mOscServer;
|
||||
RuntimeEventDispatcher& mRuntimeEventDispatcher;
|
||||
std::thread mPollThread;
|
||||
std::atomic<bool> mPollRunning;
|
||||
std::mutex mRuntimeCoordinatorResultMutex;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
#include "RuntimeStore.h"
|
||||
|
||||
RuntimeServices::RuntimeServices() :
|
||||
mControlServices(std::make_unique<ControlServices>())
|
||||
RuntimeServices::RuntimeServices(RuntimeEventDispatcher& runtimeEventDispatcher) :
|
||||
mControlServices(std::make_unique<ControlServices>(runtimeEventDispatcher))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <string>
|
||||
class OpenGLComposite;
|
||||
class RuntimeCoordinator;
|
||||
class RuntimeEventDispatcher;
|
||||
class RuntimeStore;
|
||||
|
||||
class RuntimeServices
|
||||
@@ -14,7 +15,7 @@ public:
|
||||
using AppliedOscUpdate = ControlServices::AppliedOscUpdate;
|
||||
using CompletedOscCommit = ControlServices::CompletedOscCommit;
|
||||
|
||||
RuntimeServices();
|
||||
explicit RuntimeServices(RuntimeEventDispatcher& runtimeEventDispatcher);
|
||||
~RuntimeServices();
|
||||
|
||||
bool Start(OpenGLComposite& composite, RuntimeStore& runtimeStore, std::string& error);
|
||||
|
||||
Reference in New Issue
Block a user