Utopia  2
Framework for studying models of complex & adaptive systems.
Public Member Functions | Protected Types | Protected Attributes | List of all members
Utopia::Itertools::zip< Containers > Class Template Reference

A range defined by instances of ZipIterator. More...

#include <zip.hh>

Public Member Functions

auto begin ()
 make Zipiterator containing the begin iterators of the containers 'zip' refers to More...
 
auto end ()
 make Zipiterator containing the end iterators of the containers 'zip' refers to More...
 
auto cbegin ()
 make Zipiterator containing the const begin iterators of the containers 'zip' refers to More...
 
auto cend ()
 make Zipiterator containing the const end iterators of the containers 'zip' refers to More...
 
auto rbegin ()
 make Zipiterator containing the reverse begin iterators of the containers 'zip' refers to More...
 
auto rend ()
 make Zipiterator containing the reverse end iterators of the containers 'zip' refers to More...
 
 zip (const zip &other)=delete
 Construct a new zip object. More...
 
zipoperator= (const zip &other)=delete
 deleted copy assignment More...
 
zipoperator= (zip &&other)=default
 assign zip object More...
 
 zip (zip &&other)=default
 Construct a new zip object. More...
 
 ~zip ()=default
 Destroy the range. More...
 
 zip (Containers &... conts)
 Instantiate a new zip range. More...
 

Protected Types

using Tuple = std::tuple< std::reference_wrapper< Containers >... >
 

Protected Attributes

Tuple _containers
 

Detailed Description

template<typename... Containers>
class Utopia::Itertools::zip< Containers >

A range defined by instances of ZipIterator.

The range itself only references the containers it is constructed from. The containers must exist throughout the life time of this range.

Template Parameters
ContainersTypes of containers iterated over by ZipIterator

Member Typedef Documentation

◆ Tuple

template<typename... Containers>
using Utopia::Itertools::zip< Containers >::Tuple = std::tuple<std::reference_wrapper<Containers>...>
protected

Constructor & Destructor Documentation

◆ zip() [1/3]

template<typename... Containers>
Utopia::Itertools::zip< Containers >::zip ( const zip< Containers > &  other)
delete

Construct a new zip object.

Parameters
other

◆ zip() [2/3]

template<typename... Containers>
Utopia::Itertools::zip< Containers >::zip ( zip< Containers > &&  other)
default

Construct a new zip object.

Parameters
other

◆ ~zip()

template<typename... Containers>
Utopia::Itertools::zip< Containers >::~zip ( )
default

Destroy the range.

◆ zip() [3/3]

template<typename... Containers>
Utopia::Itertools::zip< Containers >::zip ( Containers &...  conts)
inline

Instantiate a new zip range.

Parameters
contsThe pack of containers to create the range from

Member Function Documentation

◆ begin()

template<typename... Containers>
auto Utopia::Itertools::zip< Containers >::begin ( )
inline

make Zipiterator containing the begin iterators of the containers 'zip' refers to

Returns
auto

◆ cbegin()

template<typename... Containers>
auto Utopia::Itertools::zip< Containers >::cbegin ( )
inline

make Zipiterator containing the const begin iterators of the containers 'zip' refers to

Returns
auto

◆ cend()

template<typename... Containers>
auto Utopia::Itertools::zip< Containers >::cend ( )
inline

make Zipiterator containing the const end iterators of the containers 'zip' refers to

Returns
auto

◆ end()

template<typename... Containers>
auto Utopia::Itertools::zip< Containers >::end ( )
inline

make Zipiterator containing the end iterators of the containers 'zip' refers to

Returns
auto

◆ operator=() [1/2]

template<typename... Containers>
zip& Utopia::Itertools::zip< Containers >::operator= ( const zip< Containers > &  other)
delete

deleted copy assignment

Parameters
other
Returns
zip&

◆ operator=() [2/2]

template<typename... Containers>
zip& Utopia::Itertools::zip< Containers >::operator= ( zip< Containers > &&  other)
default

assign zip object

Parameters
other
Returns
zip&

◆ rbegin()

template<typename... Containers>
auto Utopia::Itertools::zip< Containers >::rbegin ( )
inline

make Zipiterator containing the reverse begin iterators of the containers 'zip' refers to

Returns
auto

◆ rend()

template<typename... Containers>
auto Utopia::Itertools::zip< Containers >::rend ( )
inline

make Zipiterator containing the reverse end iterators of the containers 'zip' refers to

Returns
auto

Member Data Documentation

◆ _containers

template<typename... Containers>
Tuple Utopia::Itertools::zip< Containers >::_containers
protected

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