mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:00:54 +01:00
39 lines
953 B
C++
39 lines
953 B
C++
// Copyright (C) 2022 TiltedPhoques SRL.
|
|
// For licensing information see LICENSE at the root of this distribution.
|
|
#pragma once
|
|
|
|
#include "Manifest.h"
|
|
|
|
#include <TiltedCore/Filesystem.hpp>
|
|
#include <TiltedCore/Platform.hpp>
|
|
|
|
namespace Resources
|
|
{
|
|
struct ResourceCollection
|
|
{
|
|
ResourceCollection();
|
|
~ResourceCollection();
|
|
|
|
void CollectResources();
|
|
|
|
auto& GetResourceFolderPath() const { return m_resourcePath; }
|
|
|
|
void ResolveDependencies();
|
|
|
|
bool LoadManifestData(const std::filesystem::path& aPath);
|
|
|
|
const auto& GetManifests() const { return m_manifests; }
|
|
|
|
template <typename T> void ForEachManifest(const T& aCallback) const noexcept
|
|
{
|
|
for (const auto& manifest : m_manifests)
|
|
{
|
|
aCallback(*manifest);
|
|
}
|
|
}
|
|
|
|
private:
|
|
std::filesystem::path m_resourcePath;
|
|
TiltedPhoques::Vector<TiltedPhoques::UniquePtr<Resources::Manifest001>> m_manifests;
|
|
};
|
|
} // namespace Resources
|