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

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

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

Inheritance diagram for ContainerTestObject:
Collaboration diagram for ContainerTestObject:

Public Types

using ContainerRegistry
using UuidRef = utils::UuidReference<ContainerRegistry>

Public Member Functions

 ContainerTestObject (int)
 ContainerTestObject (TestUuid id, std::string name)
void set_contained_ref (UuidRef ref)
std::string name () const
Public Member Functions inherited from BaseTestObject
 BaseTestObject (Uuid id)
 BaseTestObject (const BaseTestObject &)=default
BaseTestObjectoperator= (const BaseTestObject &)=default
 BaseTestObject (BaseTestObject &&)=default
BaseTestObjectoperator= (BaseTestObject &&)=default
Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< BaseTestObject >
UuidIdentifiableObject & operator= (const UuidIdentifiableObject &other)=default
auto get_uuid () const

Data Fields

NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(ContainerTestObject, BaseTestObject, name_) private std::optional< UuidRef > contained_ref_

Friends

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

Detailed Description

Test object that holds a UuidReference 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 135 of file uuid_identifiable_object_test.h.

Member Typedef Documentation

◆ ContainerRegistry

using ContainerTestObject::ContainerRegistry
Initial value:
utils::
OwningObjectRegistry<std::variant<ContainerTestObject *>, BaseTestObject>

Definition at line 140 of file uuid_identifiable_object_test.h.

◆ UuidRef

using ContainerTestObject::UuidRef = utils::UuidReference<ContainerRegistry>

Definition at line 142 of file uuid_identifiable_object_test.h.

Constructor & Destructor Documentation

◆ ContainerTestObject() [1/2]

ContainerTestObject::ContainerTestObject ( int )
inlineexplicit

Definition at line 144 of file uuid_identifiable_object_test.h.

◆ ContainerTestObject() [2/2]

ContainerTestObject::ContainerTestObject ( TestUuid id,
std::string name )
inlineexplicit

Definition at line 145 of file uuid_identifiable_object_test.h.

Member Function Documentation

◆ name()

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

Definition at line 152 of file uuid_identifiable_object_test.h.

◆ set_contained_ref()

void ContainerTestObject::set_contained_ref ( UuidRef ref)
inline

Definition at line 150 of file uuid_identifiable_object_test.h.

◆ init_from

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

Definition at line 154 of file uuid_identifiable_object_test.h.

Field Documentation

◆ contained_ref_

NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE ( ContainerTestObject, BaseTestObject, name_) private std::optional<UuidRef> ContainerTestObject::contained_ref_

Definition at line 169 of file uuid_identifiable_object_test.h.


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