LeviLamina
Loading...
Searching...
No Matches
TaskGroup.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/SubClientId.h"
7#include "mc/common/editor/SessionResult.h"
8#include "mc/common/editor/WorldType.h"
9#include "mc/deps/application/crash_manager/CrashFileProcessor.h"
10#include "mc/deps/core/file/PathBuffer.h"
11#include "mc/deps/core/resource/ResourceFileSystem.h"
12#include "mc/deps/core/threading/IAsyncResult.h"
13#include "mc/deps/core/threading/IBackgroundTaskOwner.h"
14#include "mc/deps/core/threading/TaskGroupState.h"
15#include "mc/deps/core/utility/NonOwnerPointer.h"
16#include "mc/deps/nether_net/ESessionError.h"
17#include "mc/deps/scripting/lifetime_registry/StrongTypedObjectHandle.h"
18#include "mc/deps/scripting/runtime/Result_deprecated.h"
19#include "mc/deps/scripting/script_engine/Promise.h"
20#include "mc/editor/services/export/ExportResult.h"
21#include "mc/events/TextProcessingEventOrigin.h"
22#include "mc/network/services/signaling/SignalingServiceConfig.h"
23#include "mc/platform/Copyable.h"
24#include "mc/platform/ErrorInfo.h"
25#include "mc/platform/Result.h"
26#include "mc/platform/brstd/move_only_function.h"
27#include "mc/platform/threading/UniqueLock.h"
28#include "mc/server/commands/AsyncCommandExecutor.h"
29#include "mc/server/safety/TextFilteringEvent.h"
30#include "mc/util/DownloaderState.h"
31#include "mc/world/level/FileArchiver.h"
32#include "mc/world/level/saveddata/maps/MapItemSavedData.h"
33
34// auto generated forward declare list
35// clang-format off
36class AppPlatform;
38class BlockPos;
39class BlockSource;
40class CallbackToken;
41class ChunkViewSource;
42class CommandOrigin;
43class CommandOutput;
45class Dimension;
48class IFileAccess;
50class Level;
51class LevelChunk;
52class LevelData;
53class LevelDbEnv;
58class Player;
60class RopeSystem;
61class Scheduler;
62class ServicesManager;
64class TaskResult;
65class WeakEntityRef;
66class WorkerPool;
67struct Brightness;
68struct DBStorageConfig;
69struct FileChunkInfo;
70struct HC_CALL;
71struct ServicePack;
72struct TaskStartInfo;
73namespace Bedrock { class CrashFileProcessor; }
74namespace Bedrock::Http { class HeaderCollection; }
75namespace Bedrock::Http { class Request; }
76namespace Bedrock::Http { class Response; }
77namespace Bedrock::Http { class RetryPolicy; }
78namespace Bedrock::Http { class Status; }
79namespace Bedrock::Http { struct Url; }
80namespace Bedrock::Services { struct EnvironmentQueryResponse; }
81namespace Bedrock::Threading { class Mutex; }
82namespace Bedrock::Threading { struct CachedAsyncRetry; }
83namespace Core { class FilePathManager; }
84namespace Core { class Path; }
85namespace Core::ZipUtils { struct ZipProgressList; }
86namespace Editor { class GameOptions; }
87namespace Json { class Value; }
88namespace NetherNet { struct NetworkID; }
89namespace PackCommand { class IPackCommandPipeline; }
90namespace PackCommand { struct PackCommandHandle; }
91namespace PackCommand { struct PackCommandResult; }
92namespace PositionTrackingDB { class PositionTrackingDBServer; }
93namespace PositionTrackingDB { class TrackingRecord; }
94namespace ScriptModuleMinecraftNet { struct ScriptNetRequest; }
95namespace ScriptModuleMinecraftNet { struct ScriptNetResponse; }
96namespace Scripting { class ScriptObjectFactory; }
97namespace Scripting { class WeakLifetimeScope; }
98namespace Scripting { struct Error; }
99namespace Social::Events { class Event; }
100namespace WebServices::EduSignin { struct SigninError; }
101namespace WebServices::EduSignin { struct SigninResponse; }
102// clang-format on
103
105public:
106 // member variables
107 // NOLINTBEGIN
120 // NOLINTEND
121
122public:
123 // prevent constructor by default
124 TaskGroup& operator=(TaskGroup const&);
125 TaskGroup(TaskGroup const&);
126 TaskGroup();
127
128public:
129 // virtual functions
130 // NOLINTBEGIN
131 // vIndex: 1
132 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> queue_DEPRECATED(
133 ::TaskStartInfo const& startInfo,
135 ::std::function<void()>&& callback
136 ) /*override*/;
137
138 // vIndex: 2
139 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> queueSync_DEPRECATED(
140 ::TaskStartInfo const& startInfo,
142 ) /*override*/;
143
144 // vIndex: 0
145 virtual ~TaskGroup() /*override*/;
146
147 // vIndex: 3
148 virtual void taskRegister(::std::shared_ptr<::BackgroundTaskBase> task) /*override*/;
149
150 // vIndex: 4
151 virtual void requeueTask(::std::shared_ptr<::BackgroundTaskBase> task, bool queueImmediate) /*override*/;
152
153 // vIndex: 5
154 virtual ::TaskGroupState getState() const /*override*/;
155
156 // vIndex: 6
157 virtual void processCoroutines() /*override*/;
158
159 // vIndex: 7
160 virtual void taskComplete(::gsl::not_null<::BackgroundTaskBase*> task) /*override*/;
161
162 // vIndex: 8
163 virtual bool _workerPoolIsAsync() const;
164 // NOLINTEND
165
166public:
167 // member functions
168 // NOLINTBEGIN
169 MCNAPI TaskGroup(::WorkerPool& workers, ::Scheduler& context, ::std::string name);
170
171 MCNAPI void _forAllTasks(
173 ::std::function<void(::std::shared_ptr<::BackgroundTaskBase> const&)> callback
174 );
175
176 MCNAPI void _queueInternal(::std::shared_ptr<::BackgroundTaskBase> bgtask);
177
178 MCNAPI void flush(::std::function<void()> waitFn);
179
180 MCNAPI bool isEmpty() const;
181
182 MCNAPI void sync_DEPRECATED_ASK_TOMMO(::std::function<void()> waitFn);
183 // NOLINTEND
184
185public:
186 // static functions
187 // NOLINTBEGIN
188 MCNAPI static ::IBackgroundTaskOwner* getCurrentTaskGroup();
189
190 MCNAPI static ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> queueChild_DEPRECATED(
191 ::TaskStartInfo const& startInfo,
193 ::std::function<void()>&& callback
194 );
195 // NOLINTEND
196
197public:
198 // constructor thunks
199 // NOLINTBEGIN
200 MCNAPI void* $ctor(::WorkerPool& workers, ::Scheduler& context, ::std::string name);
201 // NOLINTEND
202
203public:
204 // destructor thunk
205 // NOLINTBEGIN
206 MCNAPI void $dtor();
207 // NOLINTEND
208
209public:
210 // virtual function thunks
211 // NOLINTBEGIN
212 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> $queue_DEPRECATED(
213 ::TaskStartInfo const& startInfo,
215 ::std::function<void()>&& callback
216 );
217
218 MCNAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
220
221 MCNAPI void $taskRegister(::std::shared_ptr<::BackgroundTaskBase> task);
222
223 MCNAPI void $requeueTask(::std::shared_ptr<::BackgroundTaskBase> task, bool queueImmediate);
224
225 MCNAPI ::TaskGroupState $getState() const;
226
227 MCNAPI void $processCoroutines();
228
229 MCNAPI void $taskComplete(::gsl::not_null<::BackgroundTaskBase*> task);
230
231 MCNAPI bool $_workerPoolIsAsync() const;
232 // NOLINTEND
233
234public:
235 // vftables
236 // NOLINTBEGIN
237 MCNAPI static void** $vftable();
238 // NOLINTEND
239};
Definition AppPlatform.h:50
Definition BackgroundTaskBase.h:15
Definition UniqueLock.h:8
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CallbackToken.h:5
Definition ChunkViewSource.h:22
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition ConnectionRequest.h:22
Definition Dimension.h:83
Definition IBackgroundTaskOwner.h:17
Definition IContentAccessibilityProvider.h:13
Definition IContentKeyProvider.h:13
Definition IFileAccess.h:15
Definition IMinecraftEventing.h:145
Definition LevelChunk.h:74
Definition LevelData.h:49
Definition LevelDbEnv.h:8
Definition Level.h:238
Definition MapItemSavedData.h:31
Definition NetworkIdentifier.h:10
Definition PackManifestFactory.h:20
Definition PackSourceFactory.h:32
Definition Path.h:16
Definition Player.h:119
Definition ResourceLocation.h:14
Definition RopeSystem.h:14
Definition Scheduler.h:13
Definition ServicesManager.h:15
Definition SubClientConnectionRequest.h:19
Definition TaskGroup.h:104
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult< void > > $queueSync_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task)
MCAPI void _queueInternal(::std::shared_ptr<::BackgroundTaskBase > bgtask)
MCAPI void sync_DEPRECATED_ASK_TOMMO(::std::function< void()> waitFn)
static MCAPI void ** $vftable()
MCAPI void $taskRegister(::std::shared_ptr<::BackgroundTaskBase > task)
MCAPI void $taskComplete(::gsl::not_null<::BackgroundTaskBase * > task)
static MCAPI ::IBackgroundTaskOwner * getCurrentTaskGroup()
MCAPI::TaskGroupState $getState() const
MCAPI bool isEmpty() const
MCAPI void _forAllTasks(::Bedrock::Threading::UniqueLock<::Bedrock::Threading::Mutex > &lock, ::std::function< void(::std::shared_ptr<::BackgroundTaskBase > const &)> callback)
MCAPI void $requeueTask(::std::shared_ptr<::BackgroundTaskBase > task, bool queueImmediate)
MCAPI void flush(::std::function< void()> waitFn)
MCAPI TaskGroup(::WorkerPool &workers, ::Scheduler &context, ::std::string name)
MCAPI void $dtor()
MCAPI void $processCoroutines()
static MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult< void > > queueChild_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task, ::std::function< void()> &&callback)
MCAPI ::std::shared_ptr<::Bedrock::Threading::IAsyncResult< void > > $queue_DEPRECATED(::TaskStartInfo const &startInfo, ::brstd::move_only_function<::TaskResult()> &&task, ::std::function< void()> &&callback)
MCAPI void * $ctor(::WorkerPool &workers, ::Scheduler &context, ::std::string name)
MCAPI bool $_workerPoolIsAsync() const
Definition TaskResult.h:5
Definition WeakEntityRef.h:14
Definition WorkerPool.h:19
Definition move_only_function.h:9
Definition Brightness.h:8
Definition DBStorageConfig.h:5
Definition FileChunkInfo.h:5
Definition HC_CALL.h:16
Definition ServicePack.h:5
Definition TaskStartInfo.h:5
Definition context.h:5
Definition Alias.h:14