LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference > Struct Template Reference

#include "stdmap_shims.h"

Public Types

using type = TT
 
using iterator_category = Category
 
using value_type = TT
 
using difference_type = Distance
 
using pointer = Pointer
 
using reference = Reference
 

Public Member Functions

 iter (typename mapmap_t::iterator it) noexcept
 
 iter (typename listmap_t::iterator it) noexcept
 
TT & operator* () noexcept
 
TT * operator-> () noexcept
 
TT const * operator-> () const noexcept
 
TT & operator++ ()
 
bool operator== (iter other) const noexcept
 
bool operator!= (iter other) const noexcept
 
template<typename II >
std::enable_if_t< std::is_same_v< typename mapmap_t::iterator, II >, II > get (II)
 
template<typename II >
std::enable_if_t< std::is_same_v< typename listmap_t::iterator, II >, II > get (II)
 

Private Attributes

iterator_tuple _iters
 

Friends

template<typename IIL , typename IIR >
std::enable_if_t< !std::is_same_v< IIL, IIR > &&std::is_same_v< std::remove_const_t< typename IIL::type >, std::remove_const_t< typename IIR::type > >, bool > operator== (IIL, IIR) noexcept
 
template<typename IIL , typename IIR >
std::enable_if_t< !std::is_same_v< IIL, IIR > &&std::is_same_v< std::remove_const_t< typename IIL::type >, std::remove_const_t< typename IIR::type > >, bool > operator!= (IIL, IIR) noexcept
 

Detailed Description

template<class Key, class T, class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
struct shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >

Definition at line 52 of file stdmap_shims.h.

Member Typedef Documentation

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
using shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::difference_type = Distance

Definition at line 56 of file stdmap_shims.h.

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
using shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::iterator_category = Category

Definition at line 54 of file stdmap_shims.h.

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
using shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::pointer = Pointer

Definition at line 57 of file stdmap_shims.h.

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
using shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::reference = Reference

Definition at line 58 of file stdmap_shims.h.

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
using shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::type = TT

Definition at line 53 of file stdmap_shims.h.

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
using shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::value_type = TT

Definition at line 55 of file stdmap_shims.h.

Constructor & Destructor Documentation

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::iter ( typename mapmap_t::iterator  it)
inlinenoexcept

Definition at line 60 of file stdmap_shims.h.

60 { _iters.mapmap_iter = it; }
iterator_tuple _iters
Definition: stdmap_shims.h:136
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::iter ( typename listmap_t::iterator  it)
inlinenoexcept

Definition at line 61 of file stdmap_shims.h.

62  {
63  _iters.listmap_iter = it;
64  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44

Member Function Documentation

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
template<typename II >
std::enable_if_t<std::is_same_v<typename mapmap_t::iterator, II>, II> shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::get ( II  )
inline

Definition at line 107 of file stdmap_shims.h.

Referenced by shims::map< Key, T, Compare, Allocator >::erase().

108  {
109  return _iters.mapmap_iter;
110  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
template<typename II >
std::enable_if_t<std::is_same_v<typename listmap_t::iterator, II>, II> shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::get ( II  )
inline

Definition at line 114 of file stdmap_shims.h.

References shims::operator!=(), and shims::operator==().

115  {
116  return _iters.listmap_iter;
117  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
bool shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator!= ( iter< Category, TT, Distance, Pointer, Reference >  other) const
inlinenoexcept

Definition at line 100 of file stdmap_shims.h.

References shims::operator==(), and fhicl::other.

101  {
102  return !operator==(other);
103  }
bool operator==(iter other) const noexcept
Definition: stdmap_shims.h:92
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
TT& shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator* ( )
inlinenoexcept

Definition at line 67 of file stdmap_shims.h.

References shims::isSnippetMode().

68  {
70  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
bool isSnippetMode(bool m=false) noexcept
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
TT& shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator++ ( )
inline

Definition at line 85 of file stdmap_shims.h.

References shims::isSnippetMode().

Referenced by lar::sparse_vector< T >::const_iterator::operator++(), lar::sparse_vector< T >::iterator::operator++(), and lar::sparse_vector< T >::iterator::operator[]().

86  {
87  return isSnippetMode() ? *(_iters.listmap_iter++) :
88  *(_iters.mapmap_iter++);
89  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
bool isSnippetMode(bool m=false) noexcept
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
TT* shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator-> ( )
inlinenoexcept

Definition at line 73 of file stdmap_shims.h.

References shims::isSnippetMode().

74  {
76  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
bool isSnippetMode(bool m=false) noexcept
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
TT const* shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator-> ( ) const
inlinenoexcept

Definition at line 79 of file stdmap_shims.h.

References shims::isSnippetMode().

80  {
82  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
bool isSnippetMode(bool m=false) noexcept
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
bool shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::operator== ( iter< Category, TT, Distance, Pointer, Reference >  other) const
inlinenoexcept

Definition at line 92 of file stdmap_shims.h.

References shims::isSnippetMode(), and fhicl::other.

93  {
94  return isSnippetMode() ?
95  _iters.listmap_iter == other._iters.listmap_iter :
96  _iters.mapmap_iter == other._iters.mapmap_iter;
97  }
iterator_tuple _iters
Definition: stdmap_shims.h:136
listmap_t::iterator listmap_iter
Definition: stdmap_shims.h:44
mapmap_t::iterator mapmap_iter
Definition: stdmap_shims.h:43
bool isSnippetMode(bool m=false) noexcept

Friends And Related Function Documentation

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
template<typename IIL , typename IIR >
std::enable_if_t< !std::is_same_v<IIL, IIR> && std::is_same_v<std::remove_const_t<typename IIL::type>, std::remove_const_t<typename IIR::type> >, bool> operator!= ( IIL  left,
IIR  right 
)
friend

Definition at line 349 of file stdmap_shims.h.

350  {
351  return !operator==(left, right);
352  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
bool operator==(iter other) const noexcept
Definition: stdmap_shims.h:92
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:94
template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
template<typename IIL , typename IIR >
std::enable_if_t< !std::is_same_v<IIL, IIR> && std::is_same_v<std::remove_const_t<typename IIL::type>, std::remove_const_t<typename IIR::type> >, bool> operator== ( IIL  left,
IIR  right 
)
friend

Definition at line 337 of file stdmap_shims.h.

338  {
339  return isSnippetMode() ?
340  left._iters.listmap_iter == right._iters.listmap_iter :
341  left._iters.mapmap_iter == right._iters.mapmap_iter;
342  }
constexpr auto const & right(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:102
constexpr auto const & left(const_AssnsIter< L, R, D, Dir > const &a, const_AssnsIter< L, R, D, Dir > const &b)
Definition: AssnsIter.h:94
bool isSnippetMode(bool m=false) noexcept

Member Data Documentation

template<class Key , class T , class Compare = std::less<Key>, class Allocator = std::allocator<std::pair<const Key, T>>>
template<class Category, class TT, class Distance = std::ptrdiff_t, class Pointer = TT*, class Reference = TT&>
iterator_tuple shims::map< Key, T, Compare, Allocator >::iter< Category, TT, Distance, Pointer, Reference >::_iters
private

Definition at line 136 of file stdmap_shims.h.


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