6 #include "includes/kratos_export_api.h"
12 #include <type_traits>
28 template <
class TIterator>
32 using value_type =
typename TIterator::value_type::first_type;
55 {
return mWrapped->first;}
58 {
return &mWrapped->first;}
61 {++mWrapped;
return *
this;}
67 {
return Left.mWrapped == Right.mWrapped;}
70 {
return !(Left == Right);}
82 using MapKeyRange = Range<MapKeyIterator<typename TMap::const_iterator>>;
90 MapKeyRange<TMap> KRATOS_API(WR_APPLICATION) MakeConstMapKeyRange(
const TMap& rMap)
92 return Range<MapKeyIterator<typename TMap::const_iterator>>(rMap.begin(), rMap.end());
Iterator providing access to the keys of an std::map or std::unordered_map.
Definition: MapKeyRange.hpp:30
MapKeyIterator(MapKeyIterator &&rOther) noexcept=default
typename std::conditional< Detail::IsConstIterator< TIterator >::value, const value_type *, value_type * >::type pointer
const key_type* if const_iterator else key_type*
Definition: MapKeyRange.hpp:35
pointer operator->()
Definition: MapKeyRange.hpp:57
typename TIterator::value_type::first_type value_type
Definition: MapKeyRange.hpp:32
friend bool operator!=(MapKeyIterator Left, MapKeyIterator Right)
Definition: MapKeyRange.hpp:69
reference operator*()
Definition: MapKeyRange.hpp:54
typename std::conditional< Detail::IsConstIterator< TIterator >::value, const value_type &, value_type & >::type reference
const key_type& if const_iterator else key_type&
Definition: MapKeyRange.hpp:38
typename TIterator::difference_type difference_type
Definition: MapKeyRange.hpp:40
std::forward_iterator_tag iterator_category
Definition: MapKeyRange.hpp:42
MapKeyIterator operator++(int)
Definition: MapKeyRange.hpp:63
MapKeyIterator(TIterator Wrapped)
Definition: MapKeyRange.hpp:46
MapKeyIterator(const MapKeyIterator &rOther) noexcept=default
friend bool operator==(MapKeyIterator Left, MapKeyIterator Right)
Definition: MapKeyRange.hpp:66
MapKeyIterator & operator++()
Definition: MapKeyRange.hpp:60
Range< MapKeyIterator< typename TMap::const_iterator > > MapKeyRange
Range class iterating over the keys of a standard-conforming map type.
Definition: MapKeyRange.hpp:82
Definition: MPIUtils.hpp:9