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
14class LevelStorageWriteBatch {
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 // prevent constructor by default
74 LevelStorageWriteBatch& operator=(LevelStorageWriteBatch const&);
75 LevelStorageWriteBatch(LevelStorageWriteBatch const&);
76 LevelStorageWriteBatch();
77
78public:
79 // virtual functions
80 // NOLINTBEGIN
81 virtual ~LevelStorageWriteBatch();
82
83 virtual void putKey(::std::string const& key, ::std::string_view data, ::DBHelpers::Category category);
84
85 virtual void putKey(::std::string const& key, ::std::string const& data, ::DBHelpers::Category category);
86
87 virtual void putKey(::std::string const& key, ::std::string&& data, ::DBHelpers::Category category);
88
89 virtual void
90 putKey(::std::string const& key, ::std::shared_ptr<::std::string> data, ::DBHelpers::Category category);
91
92 virtual void deleteKey(::std::string const& key, ::DBHelpers::Category category);
93
94 virtual void flush(::LevelStorage& db);
95 // NOLINTEND
96
97public:
98 // member functions
99 // NOLINTBEGIN
100 MCAPI LevelStorageWriteBatch(::LevelStorageWriteBatch&& rhs);
101
102 MCAPI void clear();
103 // NOLINTEND
104
105public:
106 // constructor thunks
107 // NOLINTBEGIN
108 MCAPI void* $ctor(::LevelStorageWriteBatch&& rhs);
109 // NOLINTEND
110
111public:
112 // destructor thunk
113 // NOLINTBEGIN
114 MCAPI void $dtor();
115 // NOLINTEND
116
117public:
118 // virtual function thunks
119 // NOLINTBEGIN
120 MCAPI void $putKey(::std::string const& key, ::std::string_view data, ::DBHelpers::Category category);
121
122 MCAPI void $putKey(::std::string const& key, ::std::string const& data, ::DBHelpers::Category category);
123
124 MCAPI void $putKey(::std::string const& key, ::std::string&& data, ::DBHelpers::Category category);
125
126 MCAPI void $putKey(::std::string const& key, ::std::shared_ptr<::std::string> data, ::DBHelpers::Category category);
127
128 MCAPI void $deleteKey(::std::string const& key, ::DBHelpers::Category category);
129
130 MCAPI void $flush(::LevelStorage& db);
131
132
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
138 MCAPI static void** $vftable();
139 // NOLINTEND
140};
Definition LevelStorageWriteBatch.h:45
Definition LevelStorage.h:25
Definition LevelStorageWriteBatch.h:23