LeviLamina
Loading...
Searching...
No Matches
LevelStorageWriteBatch.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/threading/Mutex.h"
7#include "mc/world/level/storage/db_helpers/Category.h"
8
9// auto generated forward declare list
10// clang-format off
11class LevelStorage;
12// clang-format on
13
15public:
16 // LevelStorageWriteBatch inner types declare
17 // clang-format off
18 struct BatchEntry;
19 class PerfContext;
20 // clang-format on
21
22 // LevelStorageWriteBatch inner types define
23 struct BatchEntry {
24 public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::string>> mLatestValue;
28 ::ll::TypedStorage<1, 1, bool> mDeleted;
29 ::ll::TypedStorage<4, 4, ::DBHelpers::Category> mCategory;
30 // NOLINTEND
31
32 public:
33 // member functions
34 // NOLINTBEGIN
35 MCAPI ~BatchEntry();
36 // NOLINTEND
37
38 public:
39 // destructor thunk
40 // NOLINTBEGIN
41 MCFOLD void $dtor();
42 // NOLINTEND
43 };
44
46 public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<8, 8, uint64> mOperation;
50 ::ll::TypedStorage<8, 8, uint64> mSize;
51 ::ll::TypedStorage<8, 32, ::std::string> mKey;
52 ::ll::TypedStorage<8, 8, char const*> mReason;
53 // NOLINTEND
54 };
55
56 using BatchContainerType = ::std::map<::std::string, ::LevelStorageWriteBatch::BatchEntry>;
57
58 using const_iterator = ::std::_Tree_const_iterator<::std::_Tree_val<
59 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>>;
60
61 using iterator = ::std::_Tree_iterator<::std::_Tree_val<
62 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>>;
63
64public:
65 // member variables
66 // NOLINTBEGIN
67 ::ll::TypedStorage<8, 24, ::std::vector<::std::function<void()>>> mFlushCallbacks;
68 ::ll::TypedStorage<8, 16, ::std::map<::std::string, ::LevelStorageWriteBatch::BatchEntry>> mBatch;
69 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mFlushCallbacksMutex;
70 // NOLINTEND
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
76
77 virtual void putKey(::std::string const& key, ::std::string_view data, ::DBHelpers::Category category);
78
79 virtual void putKey(::std::string const& key, ::std::string const& data, ::DBHelpers::Category category);
80
81 virtual void putKey(::std::string const& key, ::std::string&& data, ::DBHelpers::Category category);
82
83 virtual void
84 putKey(::std::string const& key, ::std::shared_ptr<::std::string> data, ::DBHelpers::Category category);
85
86 virtual void deleteKey(::std::string const& key, ::DBHelpers::Category category);
87
88 virtual void flush(::LevelStorage& db);
89 // NOLINTEND
90
91public:
92 // member functions
93 // NOLINTBEGIN
94 MCAPI void
95 _writeKey(::std::string const& key, ::std::shared_ptr<::std::string>&& data, ::DBHelpers::Category category);
96
97 MCAPI void addFlushCallback(::std::function<void()> callback);
98
99 MCAPI void clear();
100
101 MCAPI void erase(
102 ::std::_Tree_const_iterator<::std::_Tree_val<
103 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>> const&
104 it
105 );
106
107 MCFOLD ::std::_Tree_const_iterator<::std::_Tree_val<
108 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>>
109 find(::std::string const& key) const;
110
111 MCFOLD ::std::_Tree_iterator<::std::_Tree_val<
112 ::std::_Tree_simple_types<::std::pair<::std::string const, ::LevelStorageWriteBatch::BatchEntry>>>>
113 find(::std::string const& key);
114 // NOLINTEND
115
116public:
117 // destructor thunk
118 // NOLINTBEGIN
119 MCAPI void $dtor();
120 // NOLINTEND
121
122public:
123 // virtual function thunks
124 // NOLINTBEGIN
125 MCAPI void $putKey(::std::string const& key, ::std::string_view data, ::DBHelpers::Category category);
126
127 MCAPI void $putKey(::std::string const& key, ::std::string const& data, ::DBHelpers::Category category);
128
129 MCAPI void $putKey(::std::string const& key, ::std::string&& data, ::DBHelpers::Category category);
130
131 MCAPI void $putKey(::std::string const& key, ::std::shared_ptr<::std::string> data, ::DBHelpers::Category category);
132
133 MCAPI void $deleteKey(::std::string const& key, ::DBHelpers::Category category);
134
135 MCAPI void $flush(::LevelStorage& db);
136
137
138 // NOLINTEND
139
140public:
141 // vftables
142 // NOLINTBEGIN
143 MCAPI static void** $vftable();
144 // NOLINTEND
145};
Definition LevelStorageWriteBatch.h:45
Definition LevelStorageWriteBatch.h:14
Definition LevelStorage.h:26
Definition LevelStorageWriteBatch.h:23