Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::utils::UuidIdentifiableBase Class Reference

QObject-based base for all UUID-identifiable objects. More...

#include <src/utils/uuid_identifiable.h>

Inheritance diagram for zrythm::utils::UuidIdentifiableBase:
Collaboration diagram for zrythm::utils::UuidIdentifiableBase:

Public Member Functions

 UuidIdentifiableBase (QObject *parent=nullptr)
 UuidIdentifiableBase (const QUuid &id, QObject *parent=nullptr)
QUuid raw_uuid () const

Protected Member Functions

void set_raw_uuid (const QUuid &id)

Friends

bool operator== (const UuidIdentifiableBase &lhs, const UuidIdentifiableBase &rhs)
void to_json (nlohmann::json &j, const UuidIdentifiableBase &obj)
void from_json (const nlohmann::json &j, UuidIdentifiableBase &obj)

Detailed Description

QObject-based base for all UUID-identifiable objects.

Inherits QObject so that every registry object is a QObject automatically. This enables qobject_cast from the base pointer, QObject parent-child ownership in the registry, and eliminates the need for derived types to inherit QObject separately.

Every object in the project that needs to be referenced by UUID inherits from this, either directly (via UuidIdentifiableObject<T>) or indirectly (through a typed base like Track).

Definition at line 26 of file uuid_identifiable.h.

Constructor & Destructor Documentation

◆ UuidIdentifiableBase() [1/2]

zrythm::utils::UuidIdentifiableBase::UuidIdentifiableBase ( QObject * parent = nullptr)
inlineexplicit

Definition at line 31 of file uuid_identifiable.h.

◆ UuidIdentifiableBase() [2/2]

zrythm::utils::UuidIdentifiableBase::UuidIdentifiableBase ( const QUuid & id,
QObject * parent = nullptr )
inline

Definition at line 35 of file uuid_identifiable.h.

Member Function Documentation

◆ raw_uuid()

QUuid zrythm::utils::UuidIdentifiableBase::raw_uuid ( ) const
inline

Definition at line 43 of file uuid_identifiable.h.

◆ set_raw_uuid()

void zrythm::utils::UuidIdentifiableBase::set_raw_uuid ( const QUuid & id)
inlineprotected

Definition at line 55 of file uuid_identifiable.h.

◆ operator==

bool operator== ( const UuidIdentifiableBase & lhs,
const UuidIdentifiableBase & rhs )
friend

Definition at line 46 of file uuid_identifiable.h.


The documentation for this class was generated from the following file: