LeviLamina
Loading...
Searching...
No Matches
EditorPersistenceService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/scripting/runtime/Result.h"
7#include "mc/deps/scripting/runtime/Result_deprecated.h"
8#include "mc/editor/serviceproviders/EditorPersistenceServiceProvider.h"
9#include "mc/editor/services/IEditorService.h"
10#include "mc/editor/services/persistence/PersistentDataType.h"
11
12// auto generated forward declare list
13// clang-format off
14class HashedString;
15namespace Bedrock::PubSub { class Subscription; }
16namespace Editor { class ServiceProviderCollection; }
17namespace Editor::Persistence { struct PersistentData; }
18namespace Scripting { struct Error; }
19namespace cereal { struct ReflectionCtx; }
20// clang-format on
21
22namespace Editor::Services {
23
26public:
27 // member variables
28 // NOLINTBEGIN
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
48
49public:
50 // virtual functions
51 // NOLINTBEGIN
52 // vIndex: 0
53 virtual ~EditorPersistenceService() /*override*/;
54
55 // vIndex: 1
56 virtual ::Scripting::Result<void> init() /*override*/;
57
58 // vIndex: 3
59 virtual ::Scripting::Result<void> quit() /*override*/;
60
61 // vIndex: 2
62 virtual ::Scripting::Result<void> ready() /*override*/;
63
64 // vIndex: 4
65 virtual ::std::string_view getServiceName() const /*override*/;
66
67 // vIndex: 8
68 virtual ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription>
69 listenForPersistDataChanged(::std::function<void(::Editor::Persistence::PersistentData const&)> func) /*override*/;
70
71 // vIndex: 9
72 virtual ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription> listenForPersistDataRemoved(
73 ::std::function<void(::HashedString const&, ::Editor::Services::PersistentDataType)> func
74 ) /*override*/;
75
76 // vIndex: 1
77 virtual ::Scripting::Result<void> addOrUpdatePersistData(::Editor::Persistence::PersistentData const& data
78 ) /*override*/;
79
80 // vIndex: 2
81 virtual ::Scripting::Result<void> addPersistData(::Editor::Persistence::PersistentData const& data) /*override*/;
82
83 // vIndex: 3
84 virtual ::Scripting::Result<void> updatePersistData(::Editor::Persistence::PersistentData const& data) /*override*/;
85
86 // vIndex: 4
87 virtual ::Scripting::Result<void>
88 removePersistData(::HashedString const& key, ::Editor::Services::PersistentDataType const dataType) /*override*/;
89
90 // vIndex: 5
91 virtual ::Scripting::Result<::std::string, ::Scripting::Error>
92 getPersistData(::HashedString const& key, ::Editor::Services::PersistentDataType const dataType) const /*override*/;
93
94 // vIndex: 7
95 virtual ::Scripting::Result<bool, ::Scripting::Error>
96 hasData(::HashedString const& key, ::Editor::Services::PersistentDataType const dataType) const /*override*/;
97
98 // vIndex: 6
99 virtual ::Scripting::Result<::std::vector<::HashedString>, ::Scripting::Error>
100 getKeysStartWith(::std::string const prefix, ::Editor::Services::PersistentDataType const dataType) const
101 /*override*/;
102
103 // vIndex: 7
104 virtual void _removePersistData(::HashedString const&, ::Editor::Services::PersistentDataType const);
105
106 // vIndex: 8
107 virtual void _tick(::Editor::ServiceProviderCollection&);
108
109 // vIndex: 10
110 virtual ::std::unique_ptr<::cereal::ReflectionCtx>& getCerealContext() /*override*/;
111 // NOLINTEND
112
113public:
114 // member functions
115 // NOLINTBEGIN
117
118 MCAPI void _updatePersistData(::Editor::Persistence::PersistentData const& data);
119 // NOLINTEND
120
121public:
122 // constructor thunks
123 // NOLINTBEGIN
124 MCAPI void* $ctor(::Editor::ServiceProviderCollection& providers);
125 // NOLINTEND
126
127public:
128 // destructor thunk
129 // NOLINTBEGIN
130 MCAPI void $dtor();
131 // NOLINTEND
132
133public:
134 // virtual function thunks
135 // NOLINTBEGIN
136 MCFOLD ::Scripting::Result<void> $init();
137
138 MCAPI ::Scripting::Result<void> $quit();
139
140 MCAPI ::Scripting::Result<void> $ready();
141
142 MCAPI ::std::string_view $getServiceName() const;
143
144 MCFOLD ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription>
145 $listenForPersistDataChanged(::std::function<void(::Editor::Persistence::PersistentData const&)> func);
146
147 MCAPI ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription> $listenForPersistDataRemoved(
148 ::std::function<void(::HashedString const&, ::Editor::Services::PersistentDataType)> func
149 );
150
151 MCAPI ::Scripting::Result<void> $addOrUpdatePersistData(::Editor::Persistence::PersistentData const& data);
152
153 MCAPI ::Scripting::Result<void> $addPersistData(::Editor::Persistence::PersistentData const& data);
154
155 MCAPI ::Scripting::Result<void> $updatePersistData(::Editor::Persistence::PersistentData const& data);
156
157 MCAPI ::Scripting::Result<void>
158 $removePersistData(::HashedString const& key, ::Editor::Services::PersistentDataType const dataType);
159
160 MCAPI ::Scripting::Result<::std::string, ::Scripting::Error>
161 $getPersistData(::HashedString const& key, ::Editor::Services::PersistentDataType const dataType) const;
162
163 MCAPI ::Scripting::Result<bool, ::Scripting::Error>
164 $hasData(::HashedString const& key, ::Editor::Services::PersistentDataType const dataType) const;
165
166 MCAPI ::Scripting::Result<::std::vector<::HashedString>, ::Scripting::Error>
167 $getKeysStartWith(::std::string const prefix, ::Editor::Services::PersistentDataType const dataType) const;
168
169 MCFOLD void $_removePersistData(::HashedString const&, ::Editor::Services::PersistentDataType const);
170
171 MCFOLD void $_tick(::Editor::ServiceProviderCollection&);
172
173 MCFOLD ::std::unique_ptr<::cereal::ReflectionCtx>& $getCerealContext();
174 // NOLINTEND
175
176public:
177 // vftables
178 // NOLINTBEGIN
179 MCAPI static void** $vftableForEditorPersistenceServiceProvider();
180
181 MCAPI static void** $vftableForIEditorService();
182 // NOLINTEND
183};
184
185} // namespace Editor::Services
Definition ServiceProviderCollection.h:7
Definition EditorPersistenceServiceProvider.h:21
Definition EditorPersistenceService.h:25
Definition IEditorService.h:11
Definition HashedString.h:5
Definition PersistentData.h:7
Definition Error.h:7
Definition Alias.h:14