#pragma once // MassBuilderSaveTool // Copyright (C) 2021-2022 Guillaume Jacquemin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #include #include #include #include "../Mass/Mass.h" using namespace Corrade; class MassManager { public: MassManager(const std::string& save_path, const std::string& steam_id, bool demo, const std::string& staging_dir); auto lastError() -> std::string const&; auto hangar(int hangar) -> Mass&; void refreshHangar(int hangar); auto importMass(const std::string& staged_fn, int hangar) -> bool; auto exportMass(int hangar) -> bool; auto moveMass(int source, int destination) -> bool; auto deleteMass(int hangar) -> bool; auto stagedMasses() -> std::map const&; void refreshStagedMasses(); auto deleteStagedMass(const std::string& filename) -> bool; private: const std::string& _saveDirectory; const std::string& _steamId; bool _demo; std::string _lastError; Containers::Array _hangars; const std::string& _stagingAreaDirectory; std::map _stagedMasses; };