LeviLamina
Loading...
Searching...
No Matches
MockLevelStorage.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/common/CompactionStatus.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/threading/IAsyncResult.h"
9#include "mc/world/level/storage/LevelStorage.h"
10#include "mc/world/level/storage/StorageVersion.h"
11#include "mc/world/level/storage/db_helpers/Category.h"
12
13// auto generated forward declare list
14// clang-format off
15class ChunkSource;
16class CompoundTag;
17class ContentIdentity;
18class LevelData;
22namespace Core { struct LevelStorageResult; }
23// clang-format on
24
26public:
27 // virtual functions
28 // NOLINTBEGIN
29 // vIndex: 0
30 virtual ~MockLevelStorage() /*override*/ = default;
31
32 // vIndex: 1
33 virtual void addStorageObserver(::std::unique_ptr<::LevelStorageObserver>) /*override*/;
34
35 // vIndex: 3
36 virtual ::std::unique_ptr<::CompoundTag> getCompoundTag(::std::string const&, ::DBHelpers::Category) /*override*/;
37
38 // vIndex: 4
39 virtual bool hasKey(::std::string_view, ::DBHelpers::Category) const /*override*/;
40
41 // vIndex: 5
42 virtual void forEachKeyWithPrefix(
43 ::std::string_view,
44 ::DBHelpers::Category,
45 ::std::function<void(::std::string_view, ::std::string_view)> const&
46 ) const /*override*/;
47
48 // vIndex: 6
49 virtual bool loadLevelData(::LevelData&) /*override*/;
50
51 // vIndex: 7
52 virtual ::std::unique_ptr<::ChunkSource>
53 createChunkStorage(::std::unique_ptr<::ChunkSource>, ::StorageVersion) /*override*/;
54
55 // vIndex: 8
56 virtual void saveLevelData(::LevelData const&) /*override*/;
57
58 // vIndex: 9
59 virtual ::Core::PathBuffer<::std::string> const& getFullPath() const /*override*/;
60
61 // vIndex: 11
62 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
63 saveData(::std::string const&, ::std::string&&, ::DBHelpers::Category) /*override*/;
64
65 // vIndex: 10
66 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
67 saveData(::LevelStorageWriteBatch const&) /*override*/;
68
69 // vIndex: 12
70 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>>
71 deleteData(::std::string const&, ::DBHelpers::Category) /*override*/;
72
73 // vIndex: 13
74 virtual void getStatistics(::std::string&, ::LevelStorage::StatsType) const /*override*/;
75
76 // vIndex: 15
77 virtual ::Core::LevelStorageResult getLevelStorageState() const /*override*/;
78
79 // vIndex: 16
80 virtual ::ContentIdentity const* getContentIdentity() const /*override*/;
81
82 // vIndex: 17
83 virtual void startShutdown() /*override*/;
84
85 // vIndex: 18
86 virtual bool isShuttingDown() const /*override*/;
87
88 // vIndex: 19
89 virtual bool checkShutdownDone() /*override*/;
90
91 // vIndex: 21
92 virtual ::Core::LevelStorageResult getState() const /*override*/;
93
94 // vIndex: 22
95 virtual ::std::vector<::SnapshotFilenameAndLength> createSnapshot(::std::string const&, bool) /*override*/;
96
97 // vIndex: 23
98 virtual void releaseSnapshot() /*override*/;
99
100 // vIndex: 24
101 virtual ::std::shared_ptr<::Bedrock::Threading::IAsyncResult<void>> compactStorage() /*override*/;
102
103 // vIndex: 25
104 virtual void syncAndSuspendStorage() /*override*/;
105
106 // vIndex: 26
107 virtual void resumeStorage() /*override*/;
108
109 // vIndex: 27
110 virtual void setFlushAllowed(bool) /*override*/;
111
112 // vIndex: 28
113 virtual void flushToPermanentStorage() /*override*/;
114
115 // vIndex: 30
116 virtual void setCompactionCallback(::std::function<void(::CompactionStatus)>) /*override*/;
117
118 // vIndex: 31
119 virtual void setCriticalSyncSaveCallback(::std::function<void()>) /*override*/;
120 // NOLINTEND
121
122public:
123 // virtual function thunks
124 // NOLINTBEGIN
125
126 // NOLINTEND
127};
Definition ChunkSource.h:34
Definition CompoundTag.h:13
Definition ContentIdentity.h:8
Definition LevelData.h:49
Definition LevelStorageObserver.h:5
Definition LevelStorageWriteBatch.h:14
Definition LevelStorage.h:25
Definition MockLevelStorage.h:25
Definition SnapshotFilenameAndLength.h:5