Zrythm v2.0.0-alpha.1
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::structure::arrangement::ArrangerObjectOwner< ChildT > Class Template Referenceabstract

Public Types

using ArrangerObjectChildType = ChildT

Public Member Functions

template<typename T>
requires std::derived_from<T, QObject>
 ArrangerObjectOwner (utils::IObjectRegistry &registry, T &derived)
auto & get_children_vector () const
auto get_children_view () const
auto get_sorted_children_view () const
void add_ticks_to_children (dsp::ContentTick ticks)
bool contains_object (const ArrangerObject::Uuid &id) const
 O(1) lookup if an object with the given ID exists.
ArrangerObjectListModelget_model () const
ArrangerObjectUuidReference remove_object (const ArrangerObject::Uuid &id)
void insert_object (const ArrangerObjectUuidReference &obj_ref, int idx)
void add_object (const ArrangerObjectUuidReference &obj_ref)
void clear_objects ()
virtual std::string get_field_name_for_serialization (const ChildT *) const =0
 Get the children field name to be used during serialization/deserialization.

Friends

void init_from (ArrangerObjectOwner &obj, const ArrangerObjectOwner &other, utils::ObjectCloneType clone_type)
void to_json (nlohmann::json &j, const ArrangerObjectOwner &obj)
void from_json (const nlohmann::json &j, ArrangerObjectOwner &obj)

Detailed Description

template<FinalArrangerObjectSubclass ChildT>
class zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >

Definition at line 27 of file arranger_object_owner.h.

Member Typedef Documentation

◆ ArrangerObjectChildType

template<FinalArrangerObjectSubclass ChildT>
using zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::ArrangerObjectChildType = ChildT

Definition at line 30 of file arranger_object_owner.h.

Constructor & Destructor Documentation

◆ ArrangerObjectOwner()

template<FinalArrangerObjectSubclass ChildT>
template<typename T>
requires std::derived_from<T, QObject>
zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::ArrangerObjectOwner ( utils::IObjectRegistry & registry,
T & derived )
inlineexplicit

Definition at line 32 of file arranger_object_owner.h.

Member Function Documentation

◆ add_object()

template<FinalArrangerObjectSubclass ChildT>
void zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::add_object ( const ArrangerObjectUuidReference & obj_ref)
inline

Definition at line 118 of file arranger_object_owner.h.

◆ add_ticks_to_children()

template<FinalArrangerObjectSubclass ChildT>
void zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::add_ticks_to_children ( dsp::ContentTick ticks)
inline

Definition at line 71 of file arranger_object_owner.h.

◆ clear_objects()

template<FinalArrangerObjectSubclass ChildT>
void zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::clear_objects ( )
inline

Definition at line 125 of file arranger_object_owner.h.

◆ contains_object()

template<FinalArrangerObjectSubclass ChildT>
bool zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::contains_object ( const ArrangerObject::Uuid & id) const
inline

O(1) lookup if an object with the given ID exists.

Definition at line 82 of file arranger_object_owner.h.

◆ get_children_vector()

template<FinalArrangerObjectSubclass ChildT>
auto & zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::get_children_vector ( ) const
inline

Definition at line 50 of file arranger_object_owner.h.

◆ get_children_view()

template<FinalArrangerObjectSubclass ChildT>
auto zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::get_children_view ( ) const
inline

Definition at line 55 of file arranger_object_owner.h.

◆ get_field_name_for_serialization()

template<FinalArrangerObjectSubclass ChildT>
virtual std::string zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::get_field_name_for_serialization ( const ChildT * ) const
pure virtual

Get the children field name to be used during serialization/deserialization.

This is used because a class may derive from this multiple times so make sure the field name is unique.

Returns
std::string

◆ get_model()

template<FinalArrangerObjectSubclass ChildT>
ArrangerObjectListModel * zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::get_model ( ) const
inline

Definition at line 87 of file arranger_object_owner.h.

◆ get_sorted_children_view()

template<FinalArrangerObjectSubclass ChildT>
auto zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::get_sorted_children_view ( ) const
inline

Definition at line 63 of file arranger_object_owner.h.

◆ insert_object()

template<FinalArrangerObjectSubclass ChildT>
void zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::insert_object ( const ArrangerObjectUuidReference & obj_ref,
int idx )
inline

Definition at line 113 of file arranger_object_owner.h.

◆ remove_object()

template<FinalArrangerObjectSubclass ChildT>
ArrangerObjectUuidReference zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::remove_object ( const ArrangerObject::Uuid & id)
inline

Definition at line 89 of file arranger_object_owner.h.

◆ from_json

template<FinalArrangerObjectSubclass ChildT>
void from_json ( const nlohmann::json & j,
ArrangerObjectOwner< ChildT > & obj )
friend

Definition at line 191 of file arranger_object_owner.h.

◆ init_from

template<FinalArrangerObjectSubclass ChildT>
void init_from ( ArrangerObjectOwner< ChildT > & obj,
const ArrangerObjectOwner< ChildT > & other,
utils::ObjectCloneType clone_type )
friend

Definition at line 139 of file arranger_object_owner.h.

◆ to_json

template<FinalArrangerObjectSubclass ChildT>
void to_json ( nlohmann::json & j,
const ArrangerObjectOwner< ChildT > & obj )
friend

Definition at line 185 of file arranger_object_owner.h.


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