JustAnotherDnDGame 0.1.0
Jeu de rôle tactique au d20, vue de dessus, en C++/Qt
Loading...
Searching...
No Matches
AssetPaths.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Valentin Eloy
2// SPDX-License-Identifier: GPL-3.0-or-later
3
4#pragma once
5
6#include <filesystem>
7#include <optional>
8#include <string>
9
14
15namespace hmi {
16
27public:
32 explicit AssetPaths(std::filesystem::path directory);
33
40 [[nodiscard]] std::optional<std::filesystem::path> resolve(const std::string& fileName) const;
41
43 [[nodiscard]] const std::filesystem::path& directory() const noexcept {
44 return _directory;
45 }
46
47private:
48 std::filesystem::path _directory;
49};
50
51} // namespace hmi
std::optional< std::filesystem::path > resolve(const std::string &fileName) const
Résout un nom de fichier logique vers un chemin existant dans le dossier d'assets.
Definition AssetPaths.cpp:14
std::filesystem::path _directory
Definition AssetPaths.h:48
AssetPaths(std::filesystem::path directory)
Construit un résolveur pour un dossier d'assets donné.
Definition AssetPaths.cpp:11
const std::filesystem::path & directory() const noexcept
Definition AssetPaths.h:43
Definition AudioEngine.cpp:15