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

Data Structures

struct  Location
 Location info of this class. More...
 

Public Types

using PortUuid = dsp::PortIdentifier::PortUuid
 
using ArrangerObjectChildType = ChildT
 
using TrackUuid = structure::tracks::TrackUuid
 
using ArrangerObjectListModel
 

Public Member Functions

auto & get_children_vector ()
 
auto & get_children_vector () const
 
auto get_children_view () const
 
auto & get_children_snapshots_vector ()
 
auto & get_children_snapshots_vector () const
 
auto get_children_snapshots_view () const
 
void add_ticks_to_children (double ticks, dsp::FramesPerTick frames_per_tick)
 
ArrangerObjectListModelget_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 Location get_location (const ChildT &) const =0
 Returns the current location of this owner.
 
virtual std::string get_field_name_for_serialization (const ChildT *) const =0
 Get the children field name to be used during serialization/deserialization.
 
void copy_children (const ArrangerObjectOwner &other)
 

Protected Attributes

bool clearing_ {}
 

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 29 of file arranger_object_owner.h.

Member Typedef Documentation

◆ ArrangerObjectChildType

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

Definition at line 33 of file arranger_object_owner.h.

◆ ArrangerObjectListModel

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

◆ PortUuid

template<FinalArrangerObjectSubclass ChildT>
using zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::PortUuid = dsp::PortIdentifier::PortUuid

Definition at line 32 of file arranger_object_owner.h.

◆ TrackUuid

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

Definition at line 34 of file arranger_object_owner.h.

Constructor & Destructor Documentation

◆ ~ArrangerObjectOwner()

template<FinalArrangerObjectSubclass ChildT>
virtual zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::~ArrangerObjectOwner ( )
inlinevirtual

Definition at line 39 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 149 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,
dsp::FramesPerTick frames_per_tick )
inline

Definition at line 76 of file arranger_object_owner.h.

◆ clear_objects()

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

Definition at line 155 of file arranger_object_owner.h.

◆ copy_children()

template<FinalArrangerObjectSubclass ChildT>
void zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::copy_children ( const ArrangerObjectOwner< ChildT > & other)
inline

Definition at line 207 of file arranger_object_owner.h.

◆ get_children_snapshots_vector() [1/2]

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

Definition at line 65 of file arranger_object_owner.h.

◆ get_children_snapshots_vector() [2/2]

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

Definition at line 66 of file arranger_object_owner.h.

◆ get_children_snapshots_view()

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

Definition at line 68 of file arranger_object_owner.h.

◆ get_children_vector() [1/2]

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

Definition at line 53 of file arranger_object_owner.h.

◆ get_children_vector() [2/2]

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

Definition at line 55 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 57 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_location()

template<FinalArrangerObjectSubclass ChildT>
virtual Location zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::get_location ( const ChildT & ) const
pure virtual

Returns the current location of this owner.

To be used by e.g. undoable actions where we need to know where to put back the object.

Note
The parameter is just used to disambiguate when this base class is used twice or more in the same derived class.

◆ get_model()

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

Definition at line 84 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 118 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 88 of file arranger_object_owner.h.

Friends And Related Symbol Documentation

◆ from_json

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

Definition at line 219 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 190 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 213 of file arranger_object_owner.h.

Field Documentation

◆ clearing_

template<FinalArrangerObjectSubclass ChildT>
bool zrythm::structure::arrangement::ArrangerObjectOwner< ChildT >::clearing_ {}
protected

Definition at line 234 of file arranger_object_owner.h.


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