R-Type  2
Doom but in better
Loading...
Searching...
No Matches
IndexedZipper< Containers > Class Template Reference

Combines multiple containers into a single iterable unit, iterating over corresponding elements from each container. More...

#include <IndexedZipper.hpp>

Collaboration diagram for IndexedZipper< Containers >:
Collaboration graph

Public Types

using iterator = IndexedZipperIterator<Containers...>
 Type alias for the iterator type.
 
using iterator_t = typename iterator::iterator_tuple
 Type alias for the tuple of iterators for the zipped containers.
 

Public Member Functions

 IndexedZipper (Containers &... cs)
 Constructs an IndexedZipper with the given containers.
 
iterator begin ()
 Returns an iterator to the beginning of the zipped containers.
 
iterator end ()
 Returns an iterator to the end of the zipped containers.
 

Detailed Description

template<class... Containers>
class IndexedZipper< Containers >

Combines multiple containers into a single iterable unit, iterating over corresponding elements from each container.

The IndexedZipper class allows simultaneous iteration over multiple containers. It provides an interface to iterate over a tuple of elements from the containers at the same index.

Template Parameters
ContainersVariadic template parameter for the types of containers to zip together.

Definition at line 15 of file IndexedZipper.hpp.

Member Typedef Documentation

◆ iterator

template<class... Containers>
using IndexedZipper< Containers >::iterator = IndexedZipperIterator<Containers...>

Type alias for the iterator type.

Iterator for traversing the zipped containers.

Definition at line 18 of file IndexedZipper.hpp.

◆ iterator_t

template<class... Containers>
using IndexedZipper< Containers >::iterator_t = typename iterator::iterator_tuple

Type alias for the tuple of iterators for the zipped containers.

Definition at line 20 of file IndexedZipper.hpp.

Constructor & Destructor Documentation

◆ IndexedZipper()

template<class... Containers>
IndexedZipper< Containers >::IndexedZipper ( Containers &... cs)
inline

Constructs an IndexedZipper with the given containers.

Parameters
csReferences to the containers to zip together.

Definition at line 27 of file IndexedZipper.hpp.

Member Function Documentation

◆ begin()

template<class... Containers>
iterator IndexedZipper< Containers >::begin ( )
inline

Returns an iterator to the beginning of the zipped containers.

Returns
An iterator pointing to the first tuple of elements from the zipped containers.

Definition at line 36 of file IndexedZipper.hpp.

◆ end()

template<class... Containers>
iterator IndexedZipper< Containers >::end ( )
inline

Returns an iterator to the end of the zipped containers.

Returns
An iterator pointing past the last tuple of elements from the zipped containers.

Definition at line 45 of file IndexedZipper.hpp.


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