3#include <EditorFramework/EditorFrameworkDLL.h>
4#include <EditorFramework/IPC/EditorProcessCommunicationChannel.h>
5#include <Foundation/Configuration/Singleton.h>
6#include <Foundation/Logging/Log.h>
7#include <Foundation/Logging/LogEntry.h>
8#include <Foundation/Threading/AtomicInteger.h>
9#include <Foundation/Threading/TaskSystem.h>
10#include <Foundation/Threading/Thread.h>
11#include <Foundation/Types/UniquePtr.h>
12#include <ToolsFoundation/FileSystem/DataDirPath.h>
34 ProcessTaskStateChanged
50 virtual plUInt32
Run()
override;
69 plUInt32 m_uiProcessorID;
71 bool Tick(
bool bStartNewWork);
75 bool HasProcessCrashed();
79 void ShutdownProcess();
89 State m_State = State::LookingForWork;
91 plUInt64 m_uiAssetHash = 0;
92 plUInt64 m_uiThumbHash = 0;
95 bool m_bProcessShouldBeRunning =
false;
118 void StartProcessTask();
119 void StopProcessTask(
bool bForce);
120 ProcessTaskState GetProcessTaskState()
const
122 return m_ProcessTaskState;
144 std::atomic<bool> m_bForceStop =
false;
147 mutable plMutex m_ProcessorMutex;
148 std::atomic<ProcessTaskState> m_ProcessTaskState = ProcessTaskState::Stopped;
Definition AssetCurator.h:139
Background asset processing is handled by this class. Creates EditorProcessor processes.
Definition AssetProcessor.h:104
ProcessTaskState
Definition AssetProcessor.h:109
Log for all background processing results.
Definition AssetProcessor.h:21
virtual void HandleLogMessage(const plLoggingEventData &le) override
Override this function to handle logging events.
Definition AssetProcessor.cpp:46
A reference to a file or folder inside a data directory.
Definition DataDirPath.h:18
Definition DynamicArray.h:81
Definition EditorProcessCommunicationChannel.h:13
plDelegate< void(const plLoggingEventData &)> Handler
Definition Event.h:45
Base class for all logging classes.
Definition Log.h:77
Provides a simple mechanism for mutual exclusion to prevent multiple threads from accessing a shared ...
Definition Mutex.h:13
Definition AssetProcessor.h:54
Definition AssetProcessor.h:42
virtual plUInt32 Run() override
The run function can be used to implement a long running task in a thread in a platform independent w...
Definition AssetProcessor.cpp:528
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Base class for custom tasks.
Definition Task.h:10
This class is the base class for platform independent long running threads.
Definition Thread.h:40
plThread(plStringView sName="plThread", plUInt32 uiStackSize=128 *1024)
Initializes the runnable class.
Definition Thread.cpp:15
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 AssetCurator.h:122
Definition AssetCurator.h:62
Definition AssetProcessor.h:31
A generic delegate class which supports static functions and member functions.
Definition Delegate.h:76
The data that is sent through plLogInterface.
Definition Log.h:50
Definition ProcessCommunicationChannel.h:33
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54