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

Test object that holds a TypedUuidReference to another object. More...

#include <tests/unit/utils/uuid_reference_test.h>

Inheritance diagram for zrythm::utils::ContainerTestObject:
Collaboration diagram for zrythm::utils::ContainerTestObject:

Public Types

using UuidRef = TypedUuidReference<ContainerTestObject>
Public Types inherited from zrythm::utils::UuidIdentifiableObject< ContainerTestObject >
using uuid_base_type
 Exposes the CRTP parameter for concept checking.

Public Member Functions

 ContainerTestObject (QObject *parent=nullptr)
 ContainerTestObject (Uuid id, std::string name, QObject *parent=nullptr)
void set_contained_ref (UuidRef ref)
std::string name () const
Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< ContainerTestObject >
 UuidIdentifiableObject (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

Data Fields

NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(ContainerTestObject, utils::UuidIdentifiableObject< ContainerTestObject >, name_) private std::optional< TypedUuidReference< ContainerTestObject > > contained_ref_

Friends

void init_from (ContainerTestObject &obj, const ContainerTestObject &other, ObjectCloneType)

Additional Inherited Members

Protected Member Functions inherited from zrythm::utils::UuidIdentifiableBase
void set_raw_uuid (const QUuid &id)

Detailed Description

Test object that holds a TypedUuidReference to another object.

Used to test proper destruction order when the registry is destroyed while objects contain references to other objects in the same registry.

Definition at line 104 of file uuid_reference_test.h.

Member Typedef Documentation

◆ UuidRef

using zrythm::utils::ContainerTestObject::UuidRef = TypedUuidReference<ContainerTestObject>

Definition at line 119 of file uuid_reference_test.h.

Constructor & Destructor Documentation

◆ ContainerTestObject() [1/2]

zrythm::utils::ContainerTestObject::ContainerTestObject ( QObject * parent = nullptr)
inline

Definition at line 109 of file uuid_reference_test.h.

◆ ContainerTestObject() [2/2]

zrythm::utils::ContainerTestObject::ContainerTestObject ( Uuid id,
std::string name,
QObject * parent = nullptr )
inline

Definition at line 113 of file uuid_reference_test.h.

Member Function Documentation

◆ name()

std::string zrythm::utils::ContainerTestObject::name ( ) const
inlinenodiscard

Definition at line 121 of file uuid_reference_test.h.

◆ set_contained_ref()

void zrythm::utils::ContainerTestObject::set_contained_ref ( UuidRef ref)
inline

Definition at line 120 of file uuid_reference_test.h.

◆ init_from

void init_from ( ContainerTestObject & obj,
const ContainerTestObject & other,
ObjectCloneType  )
friend

Definition at line 123 of file uuid_reference_test.h.

Field Documentation

◆ contained_ref_

NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE ( ContainerTestObject, utils::UuidIdentifiableObject<ContainerTestObject>, name_) private std::optional<TypedUuidReference<ContainerTestObject> > zrythm::utils::ContainerTestObject::contained_ref_

Definition at line 138 of file uuid_reference_test.h.


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