LeviLamina
Loading...
Searching...
No Matches
WorldTemplateHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/world/IWorldTemplateHandler.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/world/level/FileArchiver.h"
9
10// auto generated forward declare list
11// clang-format off
12class FileArchiver;
15class ILevelListCache;
18struct LevelSummary;
20namespace Social { class IUserManager; }
21namespace World { struct WorldID; }
22// clang-format on
23
24namespace World {
25
26class WorldTemplateHandler : public ::World::IWorldTemplateHandler {
27public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::WorldTemplateProvider>> mWorldTemplateProvider;
31 ::ll::TypedStorage<8, 8, ::ILevelListCache&> mLevelListCache;
32 ::ll::TypedStorage<8, 8, ::Social::IUserManager&> mUserManager;
33 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>> mKeyProvider;
34 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::FileArchiver>> mFileArchiver;
35 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::WorldTemplateManager>> mWorldTemplateManager;
36 // NOLINTEND
37
38public:
39 // prevent constructor by default
40 WorldTemplateHandler& operator=(WorldTemplateHandler const&);
41 WorldTemplateHandler(WorldTemplateHandler const&);
42 WorldTemplateHandler();
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 virtual ~WorldTemplateHandler() /*override*/;
48
49 virtual void loadTemplate(
50 ::std::string const& templateId,
51 ::std::function<void(::std::variant<::World::WorldID, ::World::IWorldTemplateHandler::Result>)> onComplete
52 ) /*override*/;
53
54 virtual ::std::optional<::World::IWorldTemplateHandler::WriteTemplateError>
55 saveTemplate(::LevelSummary const& levelSummary) const /*override*/;
56
57 virtual bool isTemplateExportEnabled() const /*override*/;
58
59 virtual ::std::vector<::std::unique_ptr<::WorldTemplateInfo const>> const& getLocalTemplates() const /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI ::std::shared_ptr<::FilePickerSettings> _generateFilePickerSettingsForExport(
66 ::std::string const& levelId,
67 ::std::string const& levelName,
68 ::FileArchiver::ExportType type
69 ) const;
70
71 MCFOLD void _showPickFileDialog(::std::shared_ptr<::FilePickerSettings> settings) const;
72 // NOLINTEND
73
74public:
75 // destructor thunk
76 // NOLINTBEGIN
77 MCAPI void $dtor();
78 // NOLINTEND
79
80public:
81 // virtual function thunks
82 // NOLINTBEGIN
83 MCAPI void $loadTemplate(
84 ::std::string const& templateId,
85 ::std::function<void(::std::variant<::World::WorldID, ::World::IWorldTemplateHandler::Result>)> onComplete
86 );
87
88 MCAPI ::std::optional<::World::IWorldTemplateHandler::WriteTemplateError>
89 $saveTemplate(::LevelSummary const& levelSummary) const;
90
91 MCFOLD bool $isTemplateExportEnabled() const;
92
93 MCAPI ::std::vector<::std::unique_ptr<::WorldTemplateInfo const>> const& $getLocalTemplates() const;
94 // NOLINTEND
95
96public:
97 // vftables
98 // NOLINTBEGIN
99 MCNAPI static void** $vftable();
100 // NOLINTEND
101};
102
103} // namespace World
Definition FileArchiver.h:36
Definition FilePickerSettings.h:5
Definition IContentKeyProvider.h:13
Definition ILevelListCache.h:27
Definition IUserManager.h:34
Definition WorldTemplateManager.h:21
Definition WorldTemplateProvider.h:5
Definition WorldTemplateHandler.h:7
static MCAPI void ** $vftable()
Definition LevelSummary.h:30
Definition WorldTemplateInfo.h:12
Definition WorldID.h:7