Metall  v0.29
A persistent memory allocator for data-centric analytics
metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type > Class Template Reference

Utility class that provides an iterator for a container of containers, e.g., map of vectors This is an experimental implementation and only support forward iterator for now. More...

#include </home/runner/work/metall/metall/include/metall/utility/container_of_containers_iterator_adaptor.hpp>

Public Types

using difference_type = typename std::iterator_traits< inner_iterator_type >::difference_type
 
using value_type = typename std::iterator_traits< inner_iterator_type >::value_type
 
using pointer = typename std::iterator_traits< inner_iterator_type >::pointer
 
using reference = typename std::iterator_traits< inner_iterator_type >::reference
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 container_of_containers_iterator_adaptor (outer_iterator_type outer_begin, outer_iterator_type outer_end)
 
 container_of_containers_iterator_adaptor (outer_iterator_type outer_begin, inner_iterator_type inner_iterator, outer_iterator_type outer_end)
 
reference operator++ ()
 
container_of_containers_iterator_adaptor operator++ (int)
 
pointer operator-> ()
 
reference operator* ()
 
bool equal (const container_of_containers_iterator_adaptor &other) const
 

Detailed Description

template<typename outer_iterator_type, typename inner_iterator_type>
class metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >

Utility class that provides an iterator for a container of containers, e.g., map of vectors This is an experimental implementation and only support forward iterator for now.

Template Parameters
outer_iterator_typeAn outer iterator class
inner_iterator_typeAn inner iterator class

Member Typedef Documentation

◆ difference_type

template<typename outer_iterator_type , typename inner_iterator_type >
using metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::difference_type = typename std::iterator_traits<inner_iterator_type>::difference_type

◆ value_type

template<typename outer_iterator_type , typename inner_iterator_type >
using metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::value_type = typename std::iterator_traits<inner_iterator_type>::value_type

◆ pointer

template<typename outer_iterator_type , typename inner_iterator_type >
using metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::pointer = typename std::iterator_traits<inner_iterator_type>::pointer

◆ reference

template<typename outer_iterator_type , typename inner_iterator_type >
using metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::reference = typename std::iterator_traits<inner_iterator_type>::reference

◆ iterator_category

template<typename outer_iterator_type , typename inner_iterator_type >
using metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::iterator_category = std::forward_iterator_tag

Constructor & Destructor Documentation

◆ container_of_containers_iterator_adaptor() [1/2]

template<typename outer_iterator_type , typename inner_iterator_type >
metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::container_of_containers_iterator_adaptor ( outer_iterator_type  outer_begin,
outer_iterator_type  outer_end 
)
inline

◆ container_of_containers_iterator_adaptor() [2/2]

template<typename outer_iterator_type , typename inner_iterator_type >
metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::container_of_containers_iterator_adaptor ( outer_iterator_type  outer_begin,
inner_iterator_type  inner_iterator,
outer_iterator_type  outer_end 
)
inline

Member Function Documentation

◆ operator++() [1/2]

template<typename outer_iterator_type , typename inner_iterator_type >
reference metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename outer_iterator_type , typename inner_iterator_type >
container_of_containers_iterator_adaptor metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::operator++ ( int  )
inline

◆ operator->()

template<typename outer_iterator_type , typename inner_iterator_type >
pointer metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::operator-> ( )
inline

◆ operator*()

template<typename outer_iterator_type , typename inner_iterator_type >
reference metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::operator* ( )
inline

◆ equal()

template<typename outer_iterator_type , typename inner_iterator_type >
bool metall::utility::container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type >::equal ( const container_of_containers_iterator_adaptor< outer_iterator_type, inner_iterator_type > &  other) const
inline

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