33 constexpr
bool valid() const noexcept {
return valid_; }
35 constexpr const std::array<std::uint8_t, 32>&
bytes() const noexcept {
return bytes_; }
40 : bytes_(
bytes), valid_(
true) {}
41 std::array<std::uint8_t, 32> bytes_{};
Durable SHA-256 identity for sealed media bytes.
Definition assets.hpp:24
constexpr const std::array< std::uint8_t, 32 > & bytes() const noexcept
Borrows the 32 digest bytes for the lifetime of this value.
Definition assets.hpp:35
constexpr ContentHash() noexcept=default
static std::optional< ContentHash > from_hex(std::string_view hex) noexcept
Decodes exactly 64 lowercase hexadecimal digits, or returns null on malformed input.
constexpr auto operator<=>(const ContentHash &) const =default
constexpr bool valid() const noexcept
Returns whether this value was constructed from a complete digest.
Definition assets.hpp:33
std::string to_hex() const
Returns the lowercase 64-digit encoding; invalid hashes encode as 64 zeroes.
AssetLocatorKind
Namespace in which an asset locator hint is interpreted.
Definition assets.hpp:56
AssetStoragePolicy
Preferred storage relationship between a project and an asset's bytes.
Definition assets.hpp:46
AudioLoopPointKind
Provenance of a suggested audio loop point.
Definition assets.hpp:82
@ ExternalUri
An application-resolved external URI.
Definition assets.hpp:60
@ PackageRelative
A lexically safe path relative to a project package.
Definition assets.hpp:58
@ Embedded
Store the bytes in the project package.
Definition assets.hpp:50
@ PreferEmbedded
Prefer packaged bytes while permitting external resolution.
Definition assets.hpp:52
@ External
Resolve the bytes outside the project package.
Definition assets.hpp:48
@ Automatic
Definition assets.hpp:84
@ Manual
Definition assets.hpp:83
Definition program_compiler.hpp:18
Definition compiled_meter_map.hpp:14
Non-authoritative location hint for resolving content by hash.
Definition assets.hpp:64
AssetLocatorKind kind
Definition assets.hpp:65
constexpr auto operator<=>(const AssetLocator &) const =default
std::string hint
Definition assets.hpp:66
Alternate fidelity, analysis, or cache form of the same logical asset.
Definition assets.hpp:74
std::string role
Definition assets.hpp:75
AssetStoragePolicy storage_policy
Definition assets.hpp:77
std::vector< AssetLocator > locators
Definition assets.hpp:78
ContentHash content_hash
Definition assets.hpp:76
Half-open frame interval [start_frame, end_frame).
Definition assets.hpp:95
std::uint64_t end_frame
Definition assets.hpp:97
std::uint64_t start_frame
Definition assets.hpp:96
constexpr auto operator<=>(const AudioFrameRange &) const =default
Typed musical metadata attached to sealed audio content.
Definition assets.hpp:105
std::optional< std::uint8_t > root_note
Definition assets.hpp:109
timebase::MeterSignature meter
Definition assets.hpp:107
auto operator<=>(const AudioLoopInfo &) const =default
bool one_shot
Definition assets.hpp:108
std::optional< timebase::TickDuration > musical_length
Definition assets.hpp:106
std::vector< AudioLoopPoint > points
Definition assets.hpp:111
std::vector< std::string > tags
Definition assets.hpp:112
std::optional< AudioFrameRange > active_range
Definition assets.hpp:110
Frame position at which sealed audio may loop.
Definition assets.hpp:88
constexpr auto operator<=>(const AudioLoopPoint &) const =default
AudioLoopPointKind kind
Definition assets.hpp:90
std::uint64_t frame
Definition assets.hpp:89