|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Abstract interface for a UUID-keyed object registry. More...
#include <src/utils/iobject_registry.h>

Public Member Functions | |
| void | register_object (UuidIdentifiableBase &obj) |
| void | acquire_reference (const QUuid &id) |
| void | release_reference (const QUuid &id) |
| UuidIdentifiableBase * | find_by_raw_uuid (const QUuid &id) const |
| bool | contains (const QUuid &id) const |
| template<typename T> | |
| void | for_each_matching (std::function< void(T &)> visitor) const |
| template<typename T> | |
| size_t | count_matching () const |
Protected Types | |
| using | ObjectVisitor = std::function<void (UuidIdentifiableBase &)> |
Protected Member Functions | |
| virtual void | register_object_impl (UuidIdentifiableBase &obj)=0 |
| virtual void | acquire_reference_impl (const QUuid &id)=0 |
| virtual void | release_reference_impl (const QUuid &id)=0 |
| virtual UuidIdentifiableBase * | find_by_raw_uuid_impl (const QUuid &id) const =0 |
| virtual bool | contains_impl (const QUuid &id) const =0 |
| virtual void | for_each_matching_impl (const QMetaObject &meta_type, ObjectVisitor visitor) const =0 |
Abstract interface for a UUID-keyed object registry.
Decouples lower layers (arrangement, tracks) from the concrete registry implementation (ProjectRegistry). Operates on the non-template UuidIdentifiableBase, so it has no knowledge of variants or specific types.
Reference counting: acquire_reference()/release_reference() manage reference counts. When the count drops to zero, the registry may delete the object. UuidReference and TypedUuidReference handle this automatically via RAII.
Definition at line 34 of file iobject_registry.h.
|
protected |
Definition at line 116 of file iobject_registry.h.
|
inlineprotected |
Definition at line 100 of file iobject_registry.h.
|
inline |
Definition at line 45 of file iobject_registry.h.
|
inline |
Definition at line 65 of file iobject_registry.h.
|
inlinenodiscard |
Definition at line 89 of file iobject_registry.h.
|
inline |
Definition at line 57 of file iobject_registry.h.
|
inline |
Definition at line 80 of file iobject_registry.h.
|
inline |
Definition at line 39 of file iobject_registry.h.
|
inline |
Definition at line 51 of file iobject_registry.h.