Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::utils::UuidIdentifiableObjectView< RegistryT > Class Template Reference

A unified view over UUID-identified objects that supports: More...

#include <src/utils/uuid_identifiable_object.h>

Inheritance diagram for zrythm::utils::UuidIdentifiableObjectView< RegistryT >:
Collaboration diagram for zrythm::utils::UuidIdentifiableObjectView< RegistryT >:

Data Structures

class  Iterator

Public Types

using UuidType = typename RegistryT::UuidType
using VariantType = typename RegistryT::VariantType
using UuidRefType = UuidReference<RegistryT>

Public Member Functions

 UuidIdentifiableObjectView (std::span< const VariantType > objects)
 Constructor for direct object range.
 UuidIdentifiableObjectView (std::span< const UuidRefType > refs)
 Constructor for UuidReference range.
 UuidIdentifiableObjectView (const RegistryT &registry, std::span< const UuidType > uuids)
 Constructor for Uuid + Registry.
 UuidIdentifiableObjectView (const VariantType &obj)
 Single object constructor.
Iterator begin () const
Iterator end () const
VariantType operator[] (size_t index) const
VariantType front () const
VariantType back () const
VariantType at (size_t index) const
size_t size () const
bool empty () const
template<typename T>
auto get_elements_by_type () const
auto as_base_type () const
template<typename T>
bool contains_type () const
template<typename T>
auto as_type () const
template<typename T>
auto get_elements_derived_from () const

Static Public Member Functions

static UuidType uuid_projection (const VariantType &var)
static RegistryT::BaseType * base_projection (const VariantType &var)
template<typename T>
static auto type_projection (const VariantType &var)
template<typename BaseType>
static auto derived_from_type_projection (const VariantType &var)
template<typename T>
static auto type_transformation (const VariantType &var)
template<typename T>
static auto derived_from_type_transformation (const VariantType &var)

Detailed Description

template<typename RegistryT>
class zrythm::utils::UuidIdentifiableObjectView< RegistryT >

A unified view over UUID-identified objects that supports:

  • Range of VariantType (direct object pointers)
  • Range of UuidReference
  • Range of Uuid + Registry

Definition at line 719 of file uuid_identifiable_object.h.

Member Typedef Documentation

◆ UuidRefType

template<typename RegistryT>
using zrythm::utils::UuidIdentifiableObjectView< RegistryT >::UuidRefType = UuidReference<RegistryT>

Definition at line 725 of file uuid_identifiable_object.h.

◆ UuidType

template<typename RegistryT>
using zrythm::utils::UuidIdentifiableObjectView< RegistryT >::UuidType = typename RegistryT::UuidType

Definition at line 723 of file uuid_identifiable_object.h.

◆ VariantType

template<typename RegistryT>
using zrythm::utils::UuidIdentifiableObjectView< RegistryT >::VariantType = typename RegistryT::VariantType

Definition at line 724 of file uuid_identifiable_object.h.

Constructor & Destructor Documentation

◆ UuidIdentifiableObjectView() [1/4]

template<typename RegistryT>
zrythm::utils::UuidIdentifiableObjectView< RegistryT >::UuidIdentifiableObjectView ( std::span< const VariantType > objects)
inlineexplicit

Constructor for direct object range.

Definition at line 905 of file uuid_identifiable_object.h.

◆ UuidIdentifiableObjectView() [2/4]

template<typename RegistryT>
zrythm::utils::UuidIdentifiableObjectView< RegistryT >::UuidIdentifiableObjectView ( std::span< const UuidRefType > refs)
inlineexplicit

Constructor for UuidReference range.

Definition at line 911 of file uuid_identifiable_object.h.

◆ UuidIdentifiableObjectView() [3/4]

template<typename RegistryT>
zrythm::utils::UuidIdentifiableObjectView< RegistryT >::UuidIdentifiableObjectView ( const RegistryT & registry,
std::span< const UuidType > uuids )
inlineexplicit

Constructor for Uuid + Registry.

Definition at line 917 of file uuid_identifiable_object.h.

◆ UuidIdentifiableObjectView() [4/4]

template<typename RegistryT>
zrythm::utils::UuidIdentifiableObjectView< RegistryT >::UuidIdentifiableObjectView ( const VariantType & obj)
inlineexplicit

Single object constructor.

Definition at line 925 of file uuid_identifiable_object.h.

Member Function Documentation

◆ as_base_type()

template<typename RegistryT>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::as_base_type ( ) const
inline

Definition at line 1022 of file uuid_identifiable_object.h.

◆ as_type()

template<typename RegistryT>
template<typename T>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::as_type ( ) const
inline

Definition at line 1070 of file uuid_identifiable_object.h.

◆ at()

template<typename RegistryT>
VariantType zrythm::utils::UuidIdentifiableObjectView< RegistryT >::at ( size_t index) const
inline

Definition at line 981 of file uuid_identifiable_object.h.

◆ back()

template<typename RegistryT>
VariantType zrythm::utils::UuidIdentifiableObjectView< RegistryT >::back ( ) const
inline

Definition at line 972 of file uuid_identifiable_object.h.

◆ base_projection()

template<typename RegistryT>
RegistryT::BaseType * zrythm::utils::UuidIdentifiableObjectView< RegistryT >::base_projection ( const VariantType & var)
inlinestatic

Definition at line 1016 of file uuid_identifiable_object.h.

◆ begin()

template<typename RegistryT>
Iterator zrythm::utils::UuidIdentifiableObjectView< RegistryT >::begin ( ) const
inline

Definition at line 930 of file uuid_identifiable_object.h.

◆ contains_type()

template<typename RegistryT>
template<typename T>
bool zrythm::utils::UuidIdentifiableObjectView< RegistryT >::contains_type ( ) const
inline

Definition at line 1032 of file uuid_identifiable_object.h.

◆ derived_from_type_projection()

template<typename RegistryT>
template<typename BaseType>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::derived_from_type_projection ( const VariantType & var)
inlinestatic

Definition at line 1038 of file uuid_identifiable_object.h.

◆ derived_from_type_transformation()

template<typename RegistryT>
template<typename T>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::derived_from_type_transformation ( const VariantType & var)
inlinestatic

Definition at line 1057 of file uuid_identifiable_object.h.

◆ empty()

template<typename RegistryT>
bool zrythm::utils::UuidIdentifiableObjectView< RegistryT >::empty ( ) const
inline

Definition at line 999 of file uuid_identifiable_object.h.

◆ end()

template<typename RegistryT>
Iterator zrythm::utils::UuidIdentifiableObjectView< RegistryT >::end ( ) const
inline

Definition at line 946 of file uuid_identifiable_object.h.

◆ front()

template<typename RegistryT>
VariantType zrythm::utils::UuidIdentifiableObjectView< RegistryT >::front ( ) const
inline

Definition at line 971 of file uuid_identifiable_object.h.

◆ get_elements_by_type()

template<typename RegistryT>
template<typename T>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::get_elements_by_type ( ) const
inline

Definition at line 1007 of file uuid_identifiable_object.h.

◆ get_elements_derived_from()

template<typename RegistryT>
template<typename T>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::get_elements_derived_from ( ) const
inline

Definition at line 1075 of file uuid_identifiable_object.h.

◆ operator[]()

template<typename RegistryT>
VariantType zrythm::utils::UuidIdentifiableObjectView< RegistryT >::operator[] ( size_t index) const
inline

Definition at line 962 of file uuid_identifiable_object.h.

◆ size()

template<typename RegistryT>
size_t zrythm::utils::UuidIdentifiableObjectView< RegistryT >::size ( ) const
inline

Definition at line 990 of file uuid_identifiable_object.h.

◆ type_projection()

template<typename RegistryT>
template<typename T>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::type_projection ( const VariantType & var)
inlinestatic

Definition at line 1027 of file uuid_identifiable_object.h.

◆ type_transformation()

template<typename RegistryT>
template<typename T>
auto zrythm::utils::UuidIdentifiableObjectView< RegistryT >::type_transformation ( const VariantType & var)
inlinestatic
Note
Assumes the range has already been filtered to only contain the type T.

Definition at line 1051 of file uuid_identifiable_object.h.

◆ uuid_projection()

template<typename RegistryT>
UuidType zrythm::utils::UuidIdentifiableObjectView< RegistryT >::uuid_projection ( const VariantType & var)
inlinestatic

Definition at line 1002 of file uuid_identifiable_object.h.


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