From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/LevelStorageSource.h | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Minecraft.World/LevelStorageSource.h (limited to 'Minecraft.World/LevelStorageSource.h') diff --git a/Minecraft.World/LevelStorageSource.h b/Minecraft.World/LevelStorageSource.h new file mode 100644 index 00000000..16b8df88 --- /dev/null +++ b/Minecraft.World/LevelStorageSource.h @@ -0,0 +1,37 @@ +#pragma once +using namespace std; + +#include "stdafx.h" + +class LevelSummary; +class ProgressListener; +class LevelData; +class LevelStorage; +class ConsoleSaveFile; + +class LevelStorageSource +{ +public: + virtual wstring getName() = 0; + virtual shared_ptr selectLevel(ConsoleSaveFile *saveFile, const wstring& levelId, bool createPlayerDir) = 0; + virtual vector *getLevelList() = 0; + virtual void clearAll() = 0; + virtual LevelData *getDataTagFor(ConsoleSaveFile *saveFile, const wstring& levelId) = 0; + + /** + * Tests if a levelId can be used to store a level. For example, a levelId + * can't be called COM1 on Windows systems, because that is a reserved file + * handle. + *

+ * Also, a new levelId may not overwrite an existing one. + * + * @param levelId + * @return + */ + virtual bool isNewLevelIdAcceptable(const wstring& levelId) = 0; + virtual void deleteLevel(const wstring& levelId) = 0; + virtual void renameLevel(const wstring& levelId, const wstring& newLevelName) = 0; + virtual bool isConvertible(ConsoleSaveFile *saveFile, const wstring& levelId) = 0; + virtual bool requiresConversion(ConsoleSaveFile *saveFile, const wstring& levelId) = 0; + virtual bool convertLevel(ConsoleSaveFile *saveFile, const wstring &levelId, ProgressListener *progress) = 0; +}; \ No newline at end of file -- cgit v1.2.3