Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::utils::UuidIdentifiable Concept Reference

Concept: T has a UUID identity from a UuidIdentifiableObject hierarchy. More...

#include <src/utils/uuid_identifiable_object.h>

Concept definition

template<typename T>
concept UuidIdentifiable = requires {
typename T::uuid_base_type;
typename T::Uuid;
}
Concept: T has a UUID identity from a UuidIdentifiableObject hierarchy.

Detailed Description

Concept: T has a UUID identity from a UuidIdentifiableObject hierarchy.

Works for both base types (e.g., Track : UuidIdentifiableObject<Track>) and derived types (e.g., MidiTrack : Track) because uuid_base_type is inherited and resolves to the correct CRTP parameter in both cases.

QObject is now implicit via UuidIdentifiableBase, so TypedUuidReference<T>::get() can use qobject_cast without a separate check.

Uses structural checks instead of std::derived_from so that the concept works with incomplete types (e.g., TypedUuidReference<Track> as a member of Track itself).

Definition at line 140 of file uuid_identifiable_object.h.