|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
A reference-counted RAII wrapper for a UUID in a registry. More...
#include <src/utils/uuid_identifiable_object.h>
Public Types | |
| using | UuidType = typename RegistryT::UuidType |
| using | VariantType = typename RegistryT::VariantType |
Public Member Functions | |
| UuidReference (RegistryT ®istry) | |
| UuidReference (const UuidType &id, RegistryT ®istry) | |
| UuidReference (const UuidReference &other) | |
| UuidReference & | operator= (const UuidReference &other) |
| UuidReference (UuidReference &&other) | |
| UuidReference & | operator= (UuidReference &&other) |
| auto | id () const -> UuidType |
| void | set_id (const UuidType &id) |
| To be used when using the Registry-only constructor. | |
| VariantType | get_object () const |
| template<typename ObjectT> requires IsInVariant<ObjectT *, VariantType> | |
| ObjectT * | get_object_as () const |
| RegistryT::BaseType * | get_object_base () const |
| template<typename... Args> | |
| UuidReference | clone_new_identity (Args &&... args) const |
| auto | get_iterator_in_registry () const |
| auto | get_iterator_in_registry () |
Static Public Attributes | |
| static constexpr auto | kIdKey = "id"sv |
Friends | |
| void | to_json (nlohmann::json &j, const UuidReference &ref) |
| void | from_json (const nlohmann::json &j, UuidReference &ref) |
| bool | operator== (const UuidReference &lhs, const UuidReference &rhs) |
A reference-counted RAII wrapper for a UUID in a registry.
Objects that refer to an object's UUID must use this wrapper.
| RegistryT |
Definition at line 137 of file uuid_identifiable_object.h.
| using zrythm::utils::UuidReference< RegistryT >::UuidType = typename RegistryT::UuidType |
Definition at line 140 of file uuid_identifiable_object.h.
| using zrythm::utils::UuidReference< RegistryT >::VariantType = typename RegistryT::VariantType |
Definition at line 141 of file uuid_identifiable_object.h.
|
inline |
Definition at line 146 of file uuid_identifiable_object.h.
|
inline |
Definition at line 148 of file uuid_identifiable_object.h.
|
inline |
Definition at line 154 of file uuid_identifiable_object.h.
|
inline |
Definition at line 173 of file uuid_identifiable_object.h.
|
inline |
Definition at line 197 of file uuid_identifiable_object.h.
|
inline |
Definition at line 238 of file uuid_identifiable_object.h.
|
inline |
Definition at line 252 of file uuid_identifiable_object.h.
|
inline |
Definition at line 247 of file uuid_identifiable_object.h.
|
inline |
Definition at line 219 of file uuid_identifiable_object.h.
|
inline |
Definition at line 226 of file uuid_identifiable_object.h.
|
inline |
Definition at line 232 of file uuid_identifiable_object.h.
|
inline |
Definition at line 199 of file uuid_identifiable_object.h.
|
inline |
Definition at line 162 of file uuid_identifiable_object.h.
|
inline |
Definition at line 181 of file uuid_identifiable_object.h.
|
inline |
To be used when using the Registry-only constructor.
This is useful when deserializing UuidReference types: First construct with just the registry, then from_json() should call this to set the ID and acquire a reference.
Definition at line 208 of file uuid_identifiable_object.h.
|
friend |
Definition at line 283 of file uuid_identifiable_object.h.
|
friend |
Definition at line 291 of file uuid_identifiable_object.h.
|
friend |
Definition at line 278 of file uuid_identifiable_object.h.
|
staticconstexpr |
Definition at line 143 of file uuid_identifiable_object.h.