3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/threading/Async.h"
7#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
8#include "mc/platform/brstd/move_only_function.h"
9#include "mc/resources/ResourceLoadType.h"
30 class TaskGroupState {
40 TaskGroupState& operator=(TaskGroupState
const&);
41 TaskGroupState(TaskGroupState
const&);
45 class ResourceLoadTaskGroup {
59 ResourceLoadTaskGroup& operator=(ResourceLoadTaskGroup
const&);
60 ResourceLoadTaskGroup(ResourceLoadTaskGroup
const&);
61 ResourceLoadTaskGroup();
66 MCNAPI ::Bedrock::Threading::Async<void>
queue(
68 ::std::function<
void()> mainThreadCallback,
73 MCNAPI ::Bedrock::Threading::Async<void>
76 MCNAPI ::Bedrock::Threading::Async<void>
97 ResourceLoadManager& operator=(ResourceLoadManager
const&);
98 ResourceLoadManager(ResourceLoadManager
const&);
99 ResourceLoadManager();
104 virtual ~ResourceLoadManager() =
default;
113 MCNAPI
bool areDependenciesLoaded(::ResourceLoadType resourceLoadType)
const;
119 MCNAPI
bool isComplete(::ResourceLoadType resourceLoadType)
const;
121 MCNAPI
void printRunningTasks();
124 MCNAPI ::Bedrock::Threading::Async<void>
queue(
125 ::ResourceLoadType resourceLoadType,
127 ::std::function<
void()> mainThreadCallback,
132 MCNAPI ::Bedrock::Threading::Async<void> queueAsync(
133 ::ResourceLoadType resourceLoadType,
138 MCNAPI ::Bedrock::Threading::Async<void> queueSync(
139 ::ResourceLoadType resourceLoadType,
146 ::std::string_view groupName,
148 ::ResourceLoadType resourceLoadType,
149 ::std::vector<::ResourceLoadType> dependencies
153 MCNAPI
void setAppSuspended(
bool suspended);
155 MCNAPI
void sync(::ResourceLoadType resourceLoadType);
166 ::std::function<
void()>&& mainThreadCallback
171 ::std::function<
void()> mainThreadCallback,
Definition EnableNonOwnerReferences.h:7
Definition ResourceLoadManager.h:45
MCAPI ::Bedrock::Threading::Async< void > queue(::brstd::move_only_function<::TaskResult()> threadedCallback, ::std::function< void()> mainThreadCallback, uint taskPriority)
Definition ResourceLoadManager.h:30
MCAPI bool isComplete() const
MCAPI void * $ctor(::ResourceLoadManagerOptions &&ops)
MCAPI ResourceLoadManager(::ResourceLoadManagerOptions &&ops)
static MCAPI void queueChild(::brstd::move_only_function<::TaskResult()> threadedCallback, ::std::function< void()> mainThreadCallback, uint taskPriority)
MCAPI void registerResourceLoadTaskGroup(::std::string_view groupName, ::Bedrock::Profiler::details::PredeclaredAnnotation &&annotation, ::ResourceLoadType resourceLoadType, ::std::vector<::ResourceLoadType > dependencies)
static MCAPI ::std::function< void()> _wrapMainThreadCallback(::ResourceLoadManager::ResourceLoadTaskGroup &resourceLoadTaskGroup, ::std::function< void()> &&mainThreadCallback)
MCAPI ::Bedrock::Threading::Async< void > queue(::ResourceLoadType resourceLoadType, ::brstd::move_only_function<::TaskResult()> threadedCallback, ::std::function< void()> mainThreadCallback, uint taskPriority)
Definition TaskResult.h:5
Definition move_only_function.h:9
Definition PredeclaredAnnotation.h:7
Definition ResourceLoadManagerOptions.h:5
Definition ResourceLoadManager.h:28