7#include "Stroika/Foundation/StroikaPreComp.h"
9#include "Stroika/Foundation/Common/Concepts.h"
10#include "Stroika/Foundation/Containers/KeyedCollection.h"
12#ifndef _Stroika_Foundation_Containers_SortedKeyedCollection_h_
13#define _Stroika_Foundation_Containers_SortedKeyedCollection_h_ 1
24 using Common::ITotallyOrderingComparer;
59 template <
typename T,
typename KEY_TYPE,
typename TRAITS = KeyedCollection_DefaultTraits<T, KEY_TYPE>>
120 template <ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER = less<KEY_TYPE>>
127 template <IIterableOfTo<T> ITERABLE_OF_ADDABLE, ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER = less<KEY_TYPE>>
132 : SortedKeyedCollection{}
135 _AssertRepValidType ();
139 template <IIterableOfTo<T> ITERABLE_OF_ADDABLE, ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER = less<KEY_TYPE>>
142 template <ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER, IIterableOfTo<T> ITERABLE_OF_ADDABLE>
144 template <IInputIterator<T> ITERATOR_OF_ADDABLE, ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER = less<KEY_TYPE>>
147 template <IInputIterator<T> ITERATOR_OF_ADDABLE, ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER = less<KEY_TYPE>>
150 template <ITotallyOrderingComparer<KEY_TYPE> KEY_COMPARER, IInputIterator<T> ITERATOR_OF_ADDABLE>
154 explicit SortedKeyedCollection (shared_ptr<_IRep>&&
src)
noexcept;
155 explicit SortedKeyedCollection (
const shared_ptr<_IRep>&
src)
noexcept;
160 nonvirtual SortedKeyedCollection& operator= (SortedKeyedCollection&&) noexcept =
default;
161 nonvirtual SortedKeyedCollection& operator= (
const SortedKeyedCollection&) =
default;
166 nonvirtual KeyInOrderComparerType GetInOrderKeyComparer ()
const;
171 nonvirtual KeyThreeWayComparerType GetThreeWayKeyComparer ()
const;
204 nonvirtual
void _AssertRepValidType ()
const;
227#include "SortedKeyedCollection.inl"
a cross between Mapping<KEY, T> and Collection<T> and Set<T>
typename inherited::value_type value_type
typename TRAITS::KeyExtractorType KeyExtractorType
nonvirtual unsigned int AddAll(ITERATOR_OF_ADDABLE &&start, ITERATOR_OF_ADDABLE2 &&end)
Common::ComparisonRelationDeclaration< Common::ComparisonRelationType::eEquals, function< bool(ArgByValueType< KEY_TYPE >, ArgByValueType< KEY_TYPE >)> > KeyEqualityComparerType
Implementation detail for SortedKeyedCollection<T, TRAITS> implementors.
A SortedKeyedCollection is a KeyedCollection<T> which remains sorted (iteration produces items sorted...
typename inherited::value_type value_type
nonvirtual RESULT_CONTAINER Where(INCLUDE_PREDICATE &&includeIfTrue) const
subset of this SortedKeyedCollection matching filter-function
nonvirtual RESULT_CONTAINER Map(ELEMENT_MAPPER &&elementMapper) const
'override' Iterable<>::Map () function so RESULT_CONTAINER defaults to SortedKeyedCollection,...
Iterable<T> is a base class for containers which easily produce an Iterator<T> to traverse them.
nonvirtual CONTAINER_OF_T As(CONTAINER_OF_T_CONSTRUCTOR_ARGS... args) const
static constexpr default_sentinel_t end() noexcept
Support for ranged for, and STL syntax in general.