|
Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
|
CRTP base that adds a typed UUID strong-typedef to a class hierarchy. More...
#include <src/utils/uuid_identifiable_object.h>


Data Structures | |
| struct | Uuid |
Public Types | |
| using | uuid_base_type = Derived |
| Exposes the CRTP parameter for concept checking. | |
Public Member Functions | |
| UuidIdentifiableObject (QObject *parent=nullptr) | |
| UuidIdentifiableObject (const Uuid &id, QObject *parent=nullptr) | |
| auto | get_uuid () const |
| Public Member Functions inherited from zrythm::utils::UuidIdentifiableBase | |
| UuidIdentifiableBase (QObject *parent=nullptr) | |
| UuidIdentifiableBase (const QUuid &id, QObject *parent=nullptr) | |
| QUuid | raw_uuid () const |
Friends | |
| void | init_from (UuidIdentifiableObject &obj, const UuidIdentifiableObject &other, utils::ObjectCloneType clone_type) |
| void | to_json (nlohmann::json &j, const UuidIdentifiableObject &obj) |
| void | from_json (const nlohmann::json &j, UuidIdentifiableObject &obj) |
| bool | operator== (const UuidIdentifiableObject &lhs, const UuidIdentifiableObject &rhs) |
Additional Inherited Members | |
| Protected Member Functions inherited from zrythm::utils::UuidIdentifiableBase | |
| void | set_raw_uuid (const QUuid &id) |
CRTP base that adds a typed UUID strong-typedef to a class hierarchy.
Each distinct "family" of objects (e.g., Track, ArrangerObject, Plugin) should have ONE class that inherits from UuidIdentifiableObject<ThatClass>. Derived types (e.g., MidiTrack from Track) inherit the UUID through the base — they must NOT inherit from UuidIdentifiableObject again, since each object has exactly one UUID identity.
The uuid_base_type alias exposes the CRTP parameter so the UuidIdentifiable concept can verify the inheritance chain structurally (no duck-typing).
Inherits UuidIdentifiableBase (which is a QObject), so derived types do NOT need to inherit QObject separately.
Example: class Track : public UuidIdentifiableObject<Track> { ... }; class MidiTrack : public Track { ... }; // inherits Track's UUID
| Derived | The class at the top of the hierarchy that "owns" the UUID type. |
Definition at line 41 of file uuid_identifiable_object.h.
| using zrythm::utils::UuidIdentifiableObject< Derived >::uuid_base_type = Derived |
Exposes the CRTP parameter for concept checking.
Definition at line 45 of file uuid_identifiable_object.h.
|
inlineexplicit |
Definition at line 76 of file uuid_identifiable_object.h.
|
inline |
Definition at line 80 of file uuid_identifiable_object.h.
|
inline |
Definition at line 88 of file uuid_identifiable_object.h.
|
friend |
Definition at line 109 of file uuid_identifiable_object.h.
|
friend |
Definition at line 90 of file uuid_identifiable_object.h.
|
friend |
Definition at line 114 of file uuid_identifiable_object.h.
|
friend |
Definition at line 105 of file uuid_identifiable_object.h.