Zrythm v2.0.0-DEV
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
using ArrangerObjectListModel

Public Member Functions

template<typename T>
requires std::derived_from<T, QObject>
 ArrangerObjectOwner (ArrangerObjectRegistry &registry, dsp::FileAudioSourceRegistry &file_audio_source_registry, T &derived)
auto & get_children_vector () const
auto get_children_view () const
auto get_sorted_children_view () const
void add_ticks_to_children (double ticks)
bool contains_object (const ArrangerObject::Uuid &id) const
 O(1) lookup if an object with the given ID exists.
ArrangerObjectListModel * get_model () const
template<typename SelfT>
ArrangerObjectUuidReference remove_object (this SelfT &self, const ArrangerObject::Uuid &id)
template<typename SelfT>
void insert_object (this SelfT &self, const ArrangerObjectUuidReference &obj_ref, int idx)
template<typename SelfT>
void add_object (this SelfT &self, 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 23 of file arranger_object_owner.h.

Member Typedef Documentation

◆ ArrangerObjectChildType

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

Definition at line 26 of file arranger_object_owner.h.

◆ ArrangerObjectListModel

template<FinalArrangerObjectSubclass ChildT>
using zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::ArrangerObjectListModel

Constructor & Destructor Documentation

◆ ArrangerObjectOwner()

template<FinalArrangerObjectSubclass ChildT>
template<typename T>
requires std::derived_from<T, QObject>
zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::ArrangerObjectOwner ( ArrangerObjectRegistry & registry,
dsp::FileAudioSourceRegistry & file_audio_source_registry,
T & derived )
inlineexplicit

Definition at line 31 of file arranger_object_owner.h.

Member Function Documentation

◆ add_object()

template<FinalArrangerObjectSubclass ChildT>
template<typename SelfT>
void zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::add_object ( this SelfT & self,
const ArrangerObjectUuidReference & obj_ref )
inline

Definition at line 128 of file arranger_object_owner.h.

◆ add_ticks_to_children()

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

Definition at line 74 of file arranger_object_owner.h.

◆ clear_objects()

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

Definition at line 135 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 85 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 53 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 58 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 90 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 66 of file arranger_object_owner.h.

◆ insert_object()

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

Definition at line 119 of file arranger_object_owner.h.

◆ remove_object()

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

Definition at line 94 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 204 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 149 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 198 of file arranger_object_owner.h.


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