Tabula Sonora
0.1.0
A native C++20 implementation of the Roland Sound Canvas VA synth voice
Toggle main menu visibility
Loading...
Searching...
No Matches
rom_locator.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <filesystem>
4
#include <string>
5
#include <vector>
6
7
namespace
ts
{
8
12
inline
constexpr
const
char
*
rom_path_variable
=
"TS_SCCORE_DLL"
;
13
15
struct
RomLocation
{
17
std::filesystem::path
path
;
18
20
std::vector<std::string>
searched
;
21
22
[[nodiscard]]
bool
found
() const noexcept {
return
!
path
.empty(); }
23
};
24
34
[[nodiscard]]
RomLocation
locate_rom
(
const
std::string& explicit_path);
35
37
[[nodiscard]] std::string
rom_not_found_message
(
const
RomLocation
& location);
38
39
}
// namespace ts
ts
Definition
control_decode.hpp:7
ts::rom_path_variable
constexpr const char * rom_path_variable
The environment variable that pins the ROM path.
Definition
rom_locator.hpp:12
ts::rom_not_found_message
std::string rom_not_found_message(const RomLocation &location)
The message to print when nothing was found.
ts::locate_rom
RomLocation locate_rom(const std::string &explicit_path)
Finds the ROM, preferring what the caller asked for over what the environment pins.
ts::RomLocation
Where a front end looked for the ROM, and what it found.
Definition
rom_locator.hpp:15
ts::RomLocation::searched
std::vector< std::string > searched
Human-readable account of where it came from, for the error message when it is empty.
Definition
rom_locator.hpp:20
ts::RomLocation::path
std::filesystem::path path
The resolved path, empty if nothing was found.
Definition
rom_locator.hpp:17
ts::RomLocation::found
bool found() const noexcept
Definition
rom_locator.hpp:22
include
tabulasonora
rom_locator.hpp
Generated by
1.17.0