Plasma Engine  2.0
Loading...
Searching...
No Matches
WorkerTasks.h
1#pragma once
2
3#include <Core/ResourceManager/Implementation/Declarations.h>
4#include <Core/ResourceManager/ResourceTypeLoader.h>
5#include <Foundation/Threading/TaskSystem.h>
6#include <Foundation/Types/UniquePtr.h>
7
9class PL_CORE_DLL plResourceManagerWorkerDataLoad final : public plTask
10{
11public:
13
14private:
15 friend class plResourceManager;
16 friend class plResourceManagerState;
17
19
20 virtual void Execute() override;
21};
22
25class PL_CORE_DLL plResourceManagerWorkerUpdateContent final : public plTask
26{
27public:
29
30 plResourceLoadData m_LoaderData;
31 plResource* m_pResourceToLoad = nullptr;
32 plResourceTypeLoader* m_pLoader = nullptr;
33 // this is only used to clean up a custom loader at the right time, if one is used
34 // m_pLoader is always set, no need to go through m_pCustomLoader
36
37private:
38 friend class plResourceManager;
39 friend class plResourceManagerState;
42
43 virtual void Execute() override;
44};
The base class for all resources.
Definition Resource.h:10
The central class for managing all types derived from plResource.
Definition ResourceManager.h:16
Definition ResourceManagerState.h:9
[internal] Worker task for loading resources (typically from disk).
Definition WorkerTasks.h:10
[internal] Worker task for uploading resource data. Depending on the resource type,...
Definition WorkerTasks.h:26
Base class for all resource loaders.
Definition ResourceTypeLoader.h:29
Base class for custom tasks.
Definition Task.h:10
virtual void Execute()
Override this to implement the task's supposed functionality.
Definition Task.h:65
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
Data returned by plResourceTypeLoader implementations.
Definition ResourceTypeLoader.h:10