Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ScriptMeshCacheService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
7#include "mc/editor/Task.h"
8#include "mc/editor/services/PayloadStoreHelper.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Editor { class EditorManager; }
13namespace Editor { class ServiceProviderCollection; }
14namespace Editor { struct CoroutineStatus; }
15namespace Editor::Coroutine { class CoroutineTaskContext; }
16namespace Editor::Services { class TransactionManagerServiceProvider; }
17namespace Scripting { class WeakLifetimeScope; }
18namespace Scripting { struct ClassBinding; }
19namespace Scripting { struct EnumBinding; }
20// clang-format on
21
22namespace Editor::ScriptModule {
23
24class ScriptMeshCacheService : public ::Editor::Services::PayloadStoreHelper {
25public:
26 // ScriptMeshCacheService inner types declare
27 // clang-format off
28 struct ActiveCommitState;
29 struct PendingRevertState;
31 struct PlacedBlockPos;
32 struct ActiveBatchProcess;
33 struct QueuedBatch;
34 // clang-format on
35
36 // ScriptMeshCacheService inner types define
37 enum class MeshTaskActivity : uint64 {
38 PlacingBlocks = 0,
39 Count = 1,
40 };
41
42 struct ActiveCommitState {
43 public:
44 // member variables
45 // NOLINTBEGIN
54 // NOLINTEND
55
56 public:
57 // prevent constructor by default
58 ActiveCommitState& operator=(ActiveCommitState const&);
59 ActiveCommitState(ActiveCommitState const&);
60 ActiveCommitState();
61 };
62
63 struct PendingRevertState {
64 public:
65 // member variables
66 // NOLINTBEGIN
73 // NOLINTEND
74
75 public:
76 // prevent constructor by default
77 PendingRevertState& operator=(PendingRevertState const&);
78 PendingRevertState(PendingRevertState const&);
79 PendingRevertState();
80 };
81
82 struct PlaceBatchTaskFactory {
83 public:
84 // member variables
85 // NOLINTBEGIN
87 // NOLINTEND
88
89 public:
90 // prevent constructor by default
91 PlaceBatchTaskFactory& operator=(PlaceBatchTaskFactory const&);
92 PlaceBatchTaskFactory(PlaceBatchTaskFactory const&);
93 PlaceBatchTaskFactory();
94 };
95
96 struct PlacedBlockPos {
97 public:
98 // member variables
99 // NOLINTBEGIN
102 // NOLINTEND
103
104 public:
105 // prevent constructor by default
106 PlacedBlockPos& operator=(PlacedBlockPos const&);
107 PlacedBlockPos(PlacedBlockPos const&);
108 PlacedBlockPos();
109 };
110
111 struct ActiveBatchProcess {
112 public:
113 // member variables
114 // NOLINTBEGIN
125 // NOLINTEND
126
127 public:
128 // prevent constructor by default
129 ActiveBatchProcess& operator=(ActiveBatchProcess const&);
130 ActiveBatchProcess(ActiveBatchProcess const&);
131 ActiveBatchProcess();
132 };
133
134 struct QueuedBatch {
135 public:
136 // member variables
137 // NOLINTBEGIN
142 // NOLINTEND
143
144 public:
145 // prevent constructor by default
146 QueuedBatch& operator=(QueuedBatch const&);
147 QueuedBatch(QueuedBatch const&);
148 QueuedBatch();
149 };
150
151public:
152 // member variables
153 // NOLINTBEGIN
171 // NOLINTEND
172
173public:
174 // prevent constructor by default
175 ScriptMeshCacheService& operator=(ScriptMeshCacheService const&);
176 ScriptMeshCacheService(ScriptMeshCacheService const&);
177 ScriptMeshCacheService();
178
179public:
180 // member functions
181 // NOLINTBEGIN
183
185
186 MCNAPI void
187 _finishActiveCommit(::std::string const& requestId, bool clientSuccess, ::std::string const& clientError);
188
190
192
194
195 MCNAPI void _rejectCommitPromise(::std::string const& requestId, ::std::string const& errorCode);
196
198 ::std::string const& requestId,
199 bool isSuccess,
200 int blockCount,
201 ::std::string const& errorMessage
202 );
203
206 ::std::function<void()> onComplete
207 );
208
210
211 MCNAPI ::Scripting::Result_deprecated<void> cancelCommit(::std::string const& requestId);
212
213 MCNAPI ::Scripting::Result_deprecated<void> unloadMesh(::std::string const& meshId);
214
216 // NOLINTEND
217
218public:
219 // static functions
220 // NOLINTBEGIN
221 MCNAPI static ::Scripting::EnumBinding bindMeshColorSourceKind();
222
223 MCNAPI static ::Scripting::EnumBinding bindMeshLoadError();
224
225 MCNAPI static ::Scripting::EnumBinding bindMeshPlacementError();
226
227 MCNAPI static ::Scripting::ClassBinding bindScript();
228 // NOLINTEND
229
230public:
231 // constructor thunks
232 // NOLINTBEGIN
234 // NOLINTEND
235
236public:
237 // destructor thunk
238 // NOLINTBEGIN
239 MCNAPI void $dtor();
240 // NOLINTEND
241};
242
243} // namespace Editor::ScriptModule
Definition CoroutineTaskContext.h:7
Definition EditorManager.h:31
MCAPI void _rejectCommitPromise(::std::string const &requestId, ::std::string const &errorCode)
MCAPI void * $ctor(::Editor::ServiceProviderCollection &services, ::Scripting::WeakLifetimeScope const &)
MCAPI ::Scripting::Result_deprecated< void > unloadMesh(::std::string const &meshId)
static MCAPI ::Scripting::ClassBinding bindScript()
MCAPI ::Scripting::Result_deprecated< void > cancelCommit(::std::string const &requestId)
static MCAPI ::Scripting::EnumBinding bindMeshColorSourceKind()
MCAPI void _resolveCommitPromise(::std::string const &requestId, bool isSuccess, int blockCount, ::std::string const &errorMessage)
MCAPI ScriptMeshCacheService(::Editor::ServiceProviderCollection &services, ::Scripting::WeakLifetimeScope const &)
MCAPI void _finishActiveCommit(::std::string const &requestId, bool clientSuccess, ::std::string const &clientError)
MCAPI void _revertAppliedBlocksAndDiscard(::Editor::Services::TransactionManagerServiceProvider &transactionManager, ::std::function< void()> onComplete)
MCAPI void _onLevelTick(::Editor::EditorManager &)
static MCAPI ::Scripting::EnumBinding bindMeshLoadError()
static MCAPI ::Scripting::EnumBinding bindMeshPlacementError()
Definition ServiceProviderCollection.h:7
Definition PayloadStoreHelper.h:7
Definition TransactionManagerServiceProvider.h:21
Definition WeakLifetimeScope.h:12
Definition CoroutineStatus.h:7
Definition ScriptMeshCacheService.h:134
Definition ClassBinding.h:10
Definition EnumBinding.h:10
Definition Alias.h:14