LeviLamina
Loading...
Searching...
No Matches
EditorJigsawService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/editor/JigsawJsonType.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
9#include "mc/editor/serviceproviders/EditorJigsawServiceProvider.h"
10#include "mc/editor/services/IEditorService.h"
11
12// auto generated forward declare list
13// clang-format off
14class BlockPos;
17class WeakEntityRef;
18namespace Bedrock::PubSub { class Subscription; }
19namespace Editor { class IEditorPlayer; }
20namespace Editor { class ServiceProviderCollection; }
21namespace Editor::ScriptModule { class ScriptClipboardItem; }
22namespace Editor::Services { struct EditorJigsawSection; }
23namespace Editor::Services { struct EditorRegistryFile; }
24// clang-format on
25
26namespace Editor::Services {
27
28class EditorJigsawService : public ::Editor::Services::IEditorService,
30public:
31 // EditorJigsawService inner types declare
32 // clang-format off
33 struct TemplatePoolData;
34 // clang-format on
35
36 // EditorJigsawService inner types define
37 struct TemplatePoolData {
38 public:
39 // member variables
40 // NOLINTBEGIN
44 // NOLINTEND
45
46 public:
47 // prevent constructor by default
48 TemplatePoolData& operator=(TemplatePoolData const&);
49 TemplatePoolData(TemplatePoolData const&);
50 TemplatePoolData();
51 };
52
53public:
54 // member variables
55 // NOLINTBEGIN
64 // NOLINTEND
65
66public:
67 // prevent constructor by default
68 EditorJigsawService& operator=(EditorJigsawService const&);
69 EditorJigsawService(EditorJigsawService const&);
70 EditorJigsawService();
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 virtual ~EditorJigsawService() /*override*/ = default;
76
77 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
78
79 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
80
81 virtual ::Scripting::Result_deprecated<void> ready() /*override*/;
82
83 virtual ::std::string_view getServiceName() const /*override*/;
84
85 virtual ::std::string getJigsawExportDirectory() /*override*/;
86
87 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::string> getEmptyJigsawFiles() /*override*/;
88
89 virtual ::std::vector<::std::string> getJigsawRegistryList() /*override*/;
90
91 virtual ::JigsawStructureRegistry* getJigsawRegistry(::std::string const& registryName) /*override*/;
92
93 virtual ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
94 getJigsawRegistryJson(::std::string const& registryName) /*override*/;
95
96 virtual void setJigsawRegistry(
97 ::std::string const& registryName,
98 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
99 bool shouldSaveFiles
100 ) /*override*/;
101
102 virtual void deleteJigsawRegistry(::std::string const& registryName) /*override*/;
103
104 virtual void generateJigsawPreview(
105 ::std::string const& registryName,
106 ::std::string const& startPool,
107 ::std::string const& startTarget,
108 ::BlockPos const& seed,
109 int const depth,
110 int const maxHorizontalDistanceFromCenter,
111 bool const validateRegistry,
112 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
113 ::WeakEntityRef playerRef
114 ) /*override*/;
115
116 virtual ::JigsawEditorData const getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef) /*override*/;
117
118 virtual void
119 setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData) /*override*/;
120
121 virtual ::Bedrock::PubSub::Subscription
122 listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback) /*override*/;
123
124 virtual ::Bedrock::PubSub::Subscription listenForGenerateJigsawPreview(
125 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
126 ) /*override*/;
127 // NOLINTEND
128
129public:
130 // member functions
131 // NOLINTBEGIN
132 MCNAPI explicit EditorJigsawService(::Editor::ServiceProviderCollection& providers);
133
134 MCNAPI bool
135 _validateRegistry(::std::string registryName, ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer> editorPlayer);
136 // NOLINTEND
137
138public:
139 // constructor thunks
140 // NOLINTBEGIN
141 MCNAPI void* $ctor(::Editor::ServiceProviderCollection& providers);
142 // NOLINTEND
143
144public:
145 // virtual function thunks
146 // NOLINTBEGIN
147 MCNAPI ::Scripting::Result_deprecated<void> $init();
148
149 MCNAPI ::Scripting::Result_deprecated<void> $quit();
150
151 MCNAPI ::Scripting::Result_deprecated<void> $ready();
152
153 MCNAPI ::std::string_view $getServiceName() const;
154
155 MCNAPI ::std::string $getJigsawExportDirectory();
156
157 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::string> $getEmptyJigsawFiles();
158
159 MCNAPI ::std::vector<::std::string> $getJigsawRegistryList();
160
161 MCNAPI ::JigsawStructureRegistry* $getJigsawRegistry(::std::string const& registryName);
162
163 MCNAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>>
164 $getJigsawRegistryJson(::std::string const& registryName);
165
167 ::std::string const& registryName,
168 ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile>> data,
169 bool shouldSaveFiles
170 );
171
172 MCNAPI void $deleteJigsawRegistry(::std::string const& registryName);
173
175 ::std::string const& registryName,
176 ::std::string const& startPool,
177 ::std::string const& startTarget,
178 ::BlockPos const& seed,
179 int const depth,
180 int const maxHorizontalDistanceFromCenter,
181 bool const validateRegistry,
182 ::Editor::ScriptModule::ScriptClipboardItem const& clipboardItem,
183 ::WeakEntityRef playerRef
184 );
185
186 MCNAPI ::JigsawEditorData const $getJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef);
187
188 MCNAPI void $setJigsawBlockData(::BlockPos& pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData);
189
190 MCNAPI ::Bedrock::PubSub::Subscription
191 $listenForSetJigsawRegistry(::std::function<void(::std::vector<::std::string>)> callback);
192
193 MCNAPI ::Bedrock::PubSub::Subscription $listenForGenerateJigsawPreview(
194 ::std::function<void(::std::vector<::Editor::Services::EditorJigsawSection>)> callback
195 );
196
197
198 // NOLINTEND
199};
200
201} // namespace Editor::Services
Definition Subscription.h:10
Definition BlockPos.h:17
Definition IEditorPlayer.h:17
Definition ScriptClipboardItem.h:21
Definition ServiceProviderCollection.h:7
Definition EditorJigsawServiceProvider.h:22
MCAPI ::Scripting::Result_deprecated< void > $ready()
MCAPI::Bedrock::PubSub::Subscription $listenForSetJigsawRegistry(::std::function< void(::std::vector<::std::string >)> callback)
MCAPI::JigsawStructureRegistry * $getJigsawRegistry(::std::string const &registryName)
MCAPI void $deleteJigsawRegistry(::std::string const &registryName)
MCAPI::Bedrock::PubSub::Subscription $listenForGenerateJigsawPreview(::std::function< void(::std::vector<::Editor::Services::EditorJigsawSection >)> callback)
MCAPI::std::string_view $getServiceName() const
MCAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile > > $getJigsawRegistryJson(::std::string const &registryName)
MCAPI ::std::map<::Editor::Services::JigsawJsonType, ::std::string > $getEmptyJigsawFiles()
MCAPI void $generateJigsawPreview(::std::string const &registryName, ::std::string const &startPool, ::std::string const &startTarget, ::BlockPos const &seed, int const depth, int const maxHorizontalDistanceFromCenter, bool const validateRegistry, ::Editor::ScriptModule::ScriptClipboardItem const &clipboardItem, ::WeakEntityRef playerRef)
MCAPI void $setJigsawBlockData(::BlockPos &pos, ::WeakEntityRef playerRef, ::JigsawEditorData jigsawData)
MCAPI bool _validateRegistry(::std::string registryName, ::Bedrock::NonOwnerPointer<::Editor::IEditorPlayer > editorPlayer)
MCAPI void $setJigsawRegistry(::std::string const &registryName, ::std::map<::Editor::Services::JigsawJsonType, ::std::vector<::Editor::Services::EditorRegistryFile > > data, bool shouldSaveFiles)
MCAPI::std::string $getJigsawExportDirectory()
MCAPI void * $ctor(::Editor::ServiceProviderCollection &providers)
MCAPI ::Scripting::Result_deprecated< void > $quit()
MCAPI ::std::vector<::std::string > $getJigsawRegistryList()
MCAPI::JigsawEditorData const $getJigsawBlockData(::BlockPos &pos, ::WeakEntityRef playerRef)
MCAPI ::Scripting::Result_deprecated< void > $init()
Definition IEditorService.h:11
Definition JigsawEditorData.h:14
Definition JigsawStructureRegistry.h:22
Definition WeakEntityRef.h:14
STL namespace.
Definition EditorJigsawSection.h:7
Definition EditorRegistryFile.h:7
Definition Alias.h:14