|
RhythmGame 1.4.3
|
#include <SongAssetStore.h>


Classes | |
| struct | ArchiveEntry |
| class | Impl |
Public Types | |
| using | WantsContents = std::function< bool(const std::filesystem::path &virtualPath)> |
| using | EntryVisitor = std::function< void(ArchiveEntry entry)> |
Public Member Functions | |
| SongAssetStore (QObject *parent=nullptr) | |
| ~SongAssetStore () override | |
| auto | read (const std::filesystem::path &virtualPath, const std::atomic_bool *stop=nullptr) const -> QByteArray |
| auto | materialize (const std::filesystem::path &virtualPath, const std::atomic_bool *stop=nullptr) const -> std::filesystem::path |
| auto | materializeRelative (const std::filesystem::path &virtualDirectory, const std::vector< std::filesystem::path > &relativePaths, const std::atomic_bool *stop=nullptr) const -> std::unordered_map< std::filesystem::path, std::filesystem::path > |
| void | walkArchive (const std::filesystem::path &archivePath, const WantsContents &wantsContents, const EntryVisitor &visitor, std::atomic_bool *stop=nullptr) const |
| auto | isArchived (const std::filesystem::path &virtualPath) const -> bool |
| auto | isVirtual (const std::filesystem::path &virtualPath) const -> bool |
| Q_INVOKABLE QString | imageSource (const QString &virtualDirectory, const QString &relativePath) const |
| Q_INVOKABLE QString | localFile (const QString &virtualPath) const |
| Q_INVOKABLE QString | containingFolder (const QString &virtualPath) const |
Static Public Member Functions | |
| static auto | isArchivePath (const std::filesystem::path &path) -> bool |
| static auto | isSupportedArchivePath (const std::filesystem::path &path) -> bool |
| static auto | archiveSupportError (const std::filesystem::path &path) -> QString |
| static auto | isSplitArchivePath (const std::filesystem::path &path) -> bool |
| static auto | imageUrl (const std::filesystem::path &virtualPath) -> QString |
| static auto | imageUrl (const QString &virtualDirectory, const QString &relativePath) -> QString |
| static auto | audioUrl (const std::filesystem::path &virtualPath) -> QString |
| static auto | isAudioUrl (const QString &source) -> bool |
| static auto | pathFromUrl (const QString &source) -> std::filesystem::path |
Resolves song-library virtual paths across ordinary directories and ZIP archives. A path such as C:/songs/collection.zip/song/chart.bms is kept as the public identity; the archive boundary is handled inside this module.
| using resource_managers::SongAssetStore::EntryVisitor = std::function<void(ArchiveEntry entry)> |
| using resource_managers::SongAssetStore::WantsContents = std::function<bool(const std::filesystem::path& virtualPath)> |
|
explicit |
|
overridedefault |
|
static |
|
static |
| QString resource_managers::SongAssetStore::containingFolder | ( | const QString & | virtualPath | ) | const |
| QString resource_managers::SongAssetStore::imageSource | ( | const QString & | virtualDirectory, |
| const QString & | relativePath | ||
| ) | const |
|
static |
|
static |
| auto resource_managers::SongAssetStore::isArchived | ( | const std::filesystem::path & | virtualPath | ) | const -> bool |
|
static |
|
static |
|
static |
|
static |
| auto resource_managers::SongAssetStore::isVirtual | ( | const std::filesystem::path & | virtualPath | ) | const -> bool |
| QString resource_managers::SongAssetStore::localFile | ( | const QString & | virtualPath | ) | const |
| auto resource_managers::SongAssetStore::materialize | ( | const std::filesystem::path & | virtualPath, |
| const std::atomic_bool * | stop = nullptr |
||
| ) | const -> std::filesystem::path |
| auto resource_managers::SongAssetStore::materializeRelative | ( | const std::filesystem::path & | virtualDirectory, |
| const std::vector< std::filesystem::path > & | relativePaths, | ||
| const std::atomic_bool * | stop = nullptr |
||
| ) | const -> std::unordered_map<std::filesystem::path, std::filesystem::path> |
|
static |
| auto resource_managers::SongAssetStore::read | ( | const std::filesystem::path & | virtualPath, |
| const std::atomic_bool * | stop = nullptr |
||
| ) | const -> QByteArray |
| void resource_managers::SongAssetStore::walkArchive | ( | const std::filesystem::path & | archivePath, |
| const WantsContents & | wantsContents, | ||
| const EntryVisitor & | visitor, | ||
| std::atomic_bool * | stop = nullptr |
||
| ) | const |