Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
aria::DistinctList< T, Key, Source > Class Template Reference

#include <distinct_list.hpp>

Inheritance diagram for aria::DistinctList< T, Key, Source >:
[legend]

Public Types

using value_type = T
using KeyOf = aria::inplace_function<Key(const T&), 32>
 Owning, heap-free key extractor (capacity 32 bytes).
using Signal = detail::ListSignal<T>

Public Member Functions

 DistinctList (std::shared_ptr< Source > source, KeyOf key_of=default_key_of_())
 Construct a DistinctList.
 ~DistinctList ()=default
 DistinctList (const DistinctList &)=delete
DistinctListoperator= (const DistinctList &)=delete
std::size_t size () const
bool empty () const
std::shared_ptr< T > at (std::size_t derived_pos) const
std::vector< std::shared_ptr< T > > snapshot () const

Member Typedef Documentation

◆ value_type

template<typename T, typename Key = T, typename Source = ObservableList<T>>
using aria::DistinctList< T, Key, Source >::value_type = T

◆ KeyOf

template<typename T, typename Key = T, typename Source = ObservableList<T>>
using aria::DistinctList< T, Key, Source >::KeyOf = aria::inplace_function<Key(const T&), 32>

Owning, heap-free key extractor (capacity 32 bytes).

◆ Signal

template<typename T, typename Key = T, typename Source = ObservableList<T>>
using aria::DistinctList< T, Key, Source >::Signal = detail::ListSignal<T>

Constructor & Destructor Documentation

◆ DistinctList() [1/2]

template<typename T, typename Key = T, typename Source = ObservableList<T>>
aria::DistinctList< T, Key, Source >::DistinctList ( std::shared_ptr< Source > source,
KeyOf key_of = default_key_of_() )
inline

Construct a DistinctList.

The default key_of projects T to itself, which works as long as T is hashable + equality- comparable. Provide a custom extractor for richer T.

◆ ~DistinctList()

template<typename T, typename Key = T, typename Source = ObservableList<T>>
aria::DistinctList< T, Key, Source >::~DistinctList ( )
default

◆ DistinctList() [2/2]

template<typename T, typename Key = T, typename Source = ObservableList<T>>
aria::DistinctList< T, Key, Source >::DistinctList ( const DistinctList< T, Key, Source > & )
delete

Member Function Documentation

◆ operator=()

template<typename T, typename Key = T, typename Source = ObservableList<T>>
DistinctList & aria::DistinctList< T, Key, Source >::operator= ( const DistinctList< T, Key, Source > & )
delete

◆ size()

template<typename T, typename Key = T, typename Source = ObservableList<T>>
std::size_t aria::DistinctList< T, Key, Source >::size ( ) const
inlinenodiscard

◆ empty()

template<typename T, typename Key = T, typename Source = ObservableList<T>>
bool aria::DistinctList< T, Key, Source >::empty ( ) const
inlinenodiscard

◆ at()

template<typename T, typename Key = T, typename Source = ObservableList<T>>
std::shared_ptr< T > aria::DistinctList< T, Key, Source >::at ( std::size_t derived_pos) const
inlinenodiscard

◆ snapshot()

template<typename T, typename Key = T, typename Source = ObservableList<T>>
std::vector< std::shared_ptr< T > > aria::DistinctList< T, Key, Source >::snapshot ( ) const
inlinenodiscard

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