Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
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
 

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_members_from (const ArrangerObjectOwner &other, ObjectCloneType clone_type)
 
void copy_children (const ArrangerObjectOwner &other)
 

Protected Attributes

bool clearing_ {}
 

Friends

void to_json (nlohmann::json &j, const ArrangerObjectOwner &obj)
 
void from_json (const nlohmann::json &j, ArrangerObjectOwner &obj)
 

Detailed Description

template<FinalArrangerObjectSubclass ChildT>
class ArrangerObjectOwner< ChildT >

Definition at line 27 of file arranger_object_owner.h.

Member Typedef Documentation

◆ ArrangerObjectChildType

template<FinalArrangerObjectSubclass ChildT>
using ArrangerObjectOwner< ChildT >::ArrangerObjectChildType = ChildT

Definition at line 31 of file arranger_object_owner.h.

◆ PortUuid

Definition at line 30 of file arranger_object_owner.h.

Constructor & Destructor Documentation

◆ ~ArrangerObjectOwner()

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

Definition at line 34 of file arranger_object_owner.h.

Member Function Documentation

◆ add_object()

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

Definition at line 143 of file arranger_object_owner.h.

◆ add_ticks_to_children()

template<FinalArrangerObjectSubclass ChildT>
void ArrangerObjectOwner< ChildT >::add_ticks_to_children ( double ticks,
dsp::FramesPerTick frames_per_tick )
inline

Definition at line 70 of file arranger_object_owner.h.

◆ clear_objects()

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

Definition at line 149 of file arranger_object_owner.h.

◆ copy_children()

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

Definition at line 199 of file arranger_object_owner.h.

◆ copy_members_from()

template<FinalArrangerObjectSubclass ChildT>
void ArrangerObjectOwner< ChildT >::copy_members_from ( const ArrangerObjectOwner< ChildT > & other,
ObjectCloneType clone_type )
inline

Definition at line 185 of file arranger_object_owner.h.

◆ get_children_snapshots_vector() [1/2]

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

Definition at line 59 of file arranger_object_owner.h.

◆ get_children_snapshots_vector() [2/2]

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

Definition at line 60 of file arranger_object_owner.h.

◆ get_children_snapshots_view()

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

Definition at line 62 of file arranger_object_owner.h.

◆ get_children_vector() [1/2]

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

Definition at line 47 of file arranger_object_owner.h.

◆ get_children_vector() [2/2]

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

Definition at line 49 of file arranger_object_owner.h.

◆ get_children_view()

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

Definition at line 51 of file arranger_object_owner.h.

◆ get_field_name_for_serialization()

template<FinalArrangerObjectSubclass ChildT>
virtual std::string 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 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 * ArrangerObjectOwner< ChildT >::get_model ( ) const
inline

Definition at line 78 of file arranger_object_owner.h.

◆ insert_object()

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

Definition at line 112 of file arranger_object_owner.h.

◆ remove_object()

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

Definition at line 82 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 211 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 205 of file arranger_object_owner.h.

Field Documentation

◆ clearing_

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

Definition at line 226 of file arranger_object_owner.h.


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