Plasma Engine  2.0
Loading...
Searching...
No Matches
LongOpWorkerManager.h
1#pragma once
2
3#include <EditorEngineProcessFramework/LongOps/Implementation/LongOpManager.h>
4
5#include <Foundation/Containers/DynamicArray.h>
6#include <Foundation/Threading/Implementation/TaskSystemDeclarations.h>
7#include <Foundation/Utilities/Progress.h>
8
10struct plProgressEvent;
12
17class PL_EDITORENGINEPROCESSFRAMEWORK_DLL plLongOpWorkerManager final : public plLongOpManager
18{
19 PL_DECLARE_SINGLETON(plLongOpWorkerManager);
20
21public:
24
25private:
26 friend class plLongOpTask;
27
28 struct WorkerOpInfo
29 {
31 plTaskGroupID m_TaskID;
32 plUuid m_DocumentGuid;
33 plUuid m_OperationGuid;
34 plProgress m_Progress;
35 plEvent<const plProgressEvent&>::Unsubscriber m_ProgressSubscription;
36 };
37
38 virtual void ProcessCommunicationChannelEventHandler(const plProcessCommunicationChannel::Event& e) override;
39 WorkerOpInfo* GetOperation(const plUuid& opGuid) const;
40 void LaunchWorkerOperation(WorkerOpInfo& opInfo, plStreamReader& config);
41 void WorkerProgressBarEventHandler(const plProgressEvent& e);
42 void RemoveOperation(plUuid opGuid);
43 void SendProgress(WorkerOpInfo& opInfo);
44 void WorkerOperationFinished(plUuid operationGuid, plResult result, plDataBuffer&& resultData);
45
47};
Base class with shared functionality for plLongOpControllerManager and plLongOpWorkerManager.
Definition LongOpManager.h:12
Worker long ops are executed by the editor engine process.
Definition LongOps.h:52
The LongOp worker manager is active in the engine process of the editor.
Definition LongOpWorkerManager.h:18
Manages the way a progress bar is subdivided and advanced.
Definition Progress.h:36
Interface for binary in (read) streams.
Definition Stream.h:22
Given out by plTaskSystem::CreateTaskGroup to identify a task group.
Definition TaskSystemDeclarations.h:103
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition Uuid.h:11
Definition ProcessCommunicationChannel.h:33
Through these events the state of an plProgress instance is communicated.
Definition Progress.h:16
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54