38 lines
867 B
C++
38 lines
867 B
C++
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "IO/FileDescription.hpp"
|
|
#include <memory>
|
|
|
|
struct archive;
|
|
struct archive_entry;
|
|
|
|
namespace spdlog
|
|
{
|
|
class logger;
|
|
}
|
|
|
|
namespace openVulkanoCpp
|
|
{
|
|
class ArchiveBase
|
|
{
|
|
protected:
|
|
archive* m_archive;
|
|
archive_entry* m_archiveEntry;
|
|
std::shared_ptr<spdlog::logger> m_logger;
|
|
|
|
public:
|
|
ArchiveBase(archive* arch, archive_entry* archEntry, const std::shared_ptr<spdlog::logger>& logger);
|
|
virtual ~ArchiveBase();
|
|
|
|
bool ChkErr(int result) const;
|
|
|
|
void SetLogger(const std::shared_ptr<spdlog::logger>& logger) { m_logger = logger; }
|
|
[[nodiscard]] std::shared_ptr<spdlog::logger> GetLogger() const { return m_logger; }
|
|
};
|
|
} |