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

#include <sorted_list.hpp>

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

Public Types

using value_type = T
using Comparator = aria::inplace_function<bool(const T&, const T&), 32>
 Strict weak ordering on items.
using Signal = detail::ListSignal<T>

Public Member Functions

 SortedList (std::shared_ptr< Source > source, Comparator comparator)
 ~SortedList ()=default
 SortedList (const SortedList &)=delete
SortedListoperator= (const SortedList &)=delete
std::size_t size () const
bool empty () const
std::shared_ptr< T > at (std::size_t derived_index) const
std::vector< std::shared_ptr< T > > snapshot () const
std::optional< std::size_t > source_index_of (std::size_t derived_index) const
void set_comparator (Comparator new_comparator)

Member Typedef Documentation

◆ value_type

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

◆ Comparator

template<typename T, typename Source = ObservableList<T>>
using aria::SortedList< T, Source >::Comparator = aria::inplace_function<bool(const T&, const T&), 32>

Strict weak ordering on items.

Must be stable across calls for the lifetime of the SortedList (or until set_comparator). Owning, heap-free comparator handle (capacity 32 bytes).

◆ Signal

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

Constructor & Destructor Documentation

◆ SortedList() [1/2]

template<typename T, typename Source = ObservableList<T>>
aria::SortedList< T, Source >::SortedList ( std::shared_ptr< Source > source,
Comparator comparator )
inline

◆ ~SortedList()

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

◆ SortedList() [2/2]

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

Member Function Documentation

◆ operator=()

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

◆ size()

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

◆ empty()

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

◆ at()

template<typename T, typename Source = ObservableList<T>>
std::shared_ptr< T > aria::SortedList< T, Source >::at ( std::size_t derived_index) const
inlinenodiscard

◆ snapshot()

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

◆ source_index_of()

template<typename T, typename Source = ObservableList<T>>
std::optional< std::size_t > aria::SortedList< T, Source >::source_index_of ( std::size_t derived_index) const
inlinenodiscard

◆ set_comparator()

template<typename T, typename Source = ObservableList<T>>
void aria::SortedList< T, Source >::set_comparator ( Comparator new_comparator)
inline

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