LeviLamina
Loading...
Searching...
No Matches
DataStoreService.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/editor/datastore/EventType.h"
8#include "mc/editor/serviceproviders/DataStoreServiceProvider.h"
9#include "mc/editor/services/IEditorService.h"
10
11// auto generated forward declare list
12// clang-format off
13class HashedString;
14namespace Bedrock::PubSub { class Subscription; }
15namespace Editor { class ServiceProviderCollection; }
16namespace Editor::DataStore { struct PayloadDescription; }
17namespace Editor::Network { class DataStoreEventPayload; }
18namespace Editor::Network { class ServerScriptTeardownRebuildPayload; }
19namespace Json { class Value; }
20// clang-format on
21
22namespace Editor::Services {
23
26public:
27 // member variables
28 // NOLINTBEGIN
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 DataStoreService& operator=(DataStoreService const&);
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 // vIndex: 0
49 virtual ~DataStoreService() /*override*/;
50
51 // vIndex: 1
52 virtual ::Scripting::Result<void> init() /*override*/;
53
54 // vIndex: 3
55 virtual ::Scripting::Result<void> quit() /*override*/;
56
57 // vIndex: 1
58 virtual ::Scripting::Result<void> dispatchEvent(
59 ::HashedString const& dataTag,
60 ::Editor::DataStore::EventType eventType,
61 ::Json::Value const& payload,
63 ) /*override*/;
64
65 // vIndex: 2
66 virtual ::Json::Value
67 getPayload(::HashedString const& dataTag, ::Editor::DataStore::PayloadDescription const& desc) const /*override*/;
68
69 // vIndex: 3
70 virtual ::Bedrock::PubSub::Subscription listenForEvent(
71 ::std::function<
72 void(::HashedString const&, ::Editor::DataStore::EventType, ::Json::Value const&, ::Editor::DataStore::PayloadDescription const&)>
73 callback
74 ) /*override*/;
75
76 // vIndex: 7
77 virtual ::Scripting::Result<void> _handleEvents(
78 ::HashedString const&,
79 ::Editor::DataStore::EventType,
80 ::Json::Value const&,
82 bool
83 ) = 0;
84
85 // vIndex: 8
86 virtual ::Json::Value _getPayload(::HashedString const&, ::Editor::DataStore::PayloadDescription const&) const = 0;
87 // NOLINTEND
88
89public:
90 // member functions
91 // NOLINTBEGIN
93
94 MCAPI void _handleDataStoreEventPacket(::Editor::Network::DataStoreEventPayload const& packet);
95
96 MCAPI void _handleScriptReloadEventPacket(::Editor::Network::ServerScriptTeardownRebuildPayload const& packet);
97
98 MCAPI ::Scripting::Result<void> _processEvent(
99 ::HashedString const& dataTag,
100 ::Editor::DataStore::EventType eventType,
101 ::Json::Value const& payload,
103 bool isNetworkEvent
104 );
105
106 MCAPI void _publishEvent(
107 ::HashedString const& dataTag,
108 ::Editor::DataStore::EventType eventType,
109 ::Json::Value const& payload,
111 );
112
113 MCAPI void _sendNetworkEvent(
114 ::HashedString const& dataTag,
115 ::Editor::DataStore::EventType eventType,
116 ::Json::Value const& payload,
118 );
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 MCAPI ::Scripting::Result<void> $init();
137
138 MCFOLD ::Scripting::Result<void> $quit();
139
140 MCAPI ::Scripting::Result<void> $dispatchEvent(
141 ::HashedString const& dataTag,
142 ::Editor::DataStore::EventType eventType,
143 ::Json::Value const& payload,
145 );
146
147 MCAPI ::Json::Value
148 $getPayload(::HashedString const& dataTag, ::Editor::DataStore::PayloadDescription const& desc) const;
149
150 MCFOLD ::Bedrock::PubSub::Subscription $listenForEvent(
151 ::std::function<
152 void(::HashedString const&, ::Editor::DataStore::EventType, ::Json::Value const&, ::Editor::DataStore::PayloadDescription const&)>
153 callback
154 );
155 // NOLINTEND
156
157public:
158 // vftables
159 // NOLINTBEGIN
160 MCAPI static void** $vftableForDataStoreServiceProvider();
161
162 MCAPI static void** $vftableForIEditorService();
163 // NOLINTEND
164};
165
166} // namespace Editor::Services
Definition DataStoreEventPayload.h:18
Definition ServerScriptTeardownRebuildPayload.h:16
Definition ServiceProviderCollection.h:7
Definition DataStoreServiceProvider.h:19
Definition DataStoreService.h:25
Definition IEditorService.h:11
Definition HashedString.h:5
Definition Value.h:16
Definition PayloadDescription.h:7
Definition Alias.h:14