Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SaveCommandImpl.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7
8// auto generated forward declare list
9// clang-format off
10class FileArchiver;
11class Level;
13// clang-format on
14
16public:
17 // SaveCommandImpl inner types define
18 enum class Errors : int {
19 InvalidState = 0,
20 MutexLockFail = 1,
21 NoFileArchiver = 2,
22 };
23
24 enum class State : int {
25 Idle = 0,
26 Saving = 1,
27 Complete = 2,
28 Failed = 3,
29 };
30
31public:
32 // static functions
33 // NOLINTBEGIN
34 MCNAPI static ::nonstd::expected<::Bedrock::Threading::Async<void>, ::SaveCommandImpl::Errors>
35 saveHold(::Level& level, ::FileArchiver* fileArchiver);
36
37 MCNAPI static ::nonstd::expected<::Bedrock::Threading::Async<void>, ::SaveCommandImpl::Errors>
39 // NOLINTEND
40
41public:
42 // static variables
43 // NOLINTBEGIN
44 MCNAPI static ::std::string& mGeneratedVanillaLevelDataPath();
45
46 MCNAPI static ::std::vector<::SnapshotFilenameAndLength>& mSaveAllFileList();
47
48 MCNAPI static ::std::mutex& mSaveAllMutex();
49
50 MCNAPI static ::SaveCommandImpl::State& mState();
51 // NOLINTEND
52};
Definition FileArchiver.h:35
Definition Level.h:255
Definition SaveCommandImpl.h:15
static MCAPI ::nonstd::expected<::Bedrock::Threading::Async< void >, ::SaveCommandImpl::Errors > saveResume(::Level &level)
static MCAPI ::std::vector<::SnapshotFilenameAndLength > & mSaveAllFileList()
static MCAPI ::std::mutex & mSaveAllMutex()
static MCAPI ::nonstd::expected<::Bedrock::Threading::Async< void >, ::SaveCommandImpl::Errors > saveHold(::Level &level, ::FileArchiver *fileArchiver)
static MCAPI ::std::string & mGeneratedVanillaLevelDataPath()
static MCAPI ::SaveCommandImpl::State & mState()
Definition SnapshotFilenameAndLength.h:5