MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::datastructures::CellContainer< CellIndexT, dim >::Iterator Class Reference

Provides iterator functionality (increment, access as <*cell, index> pair, equality) More...

#include <CellContainer.h>

Public Types

using CouplingCellIterator = typename std::vector<coupling::datastructures::CouplingCell<dim>*>::const_iterator
 

Public Member Functions

 Iterator (CouplingCellIterator itCouplingCells, typename CellIndexT::IndexIterator itIdx)
 
const std::pair< coupling::datastructures::CouplingCell< dim > *, CellIndexT > operator* () const
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 

Private Attributes

CouplingCellIterator _itCouplingCells
 
CellIndexT::IndexIterator _itIdx
 

Friends

bool operator== (const Iterator &a, const Iterator &b)
 
bool operator!= (const Iterator &a, const Iterator &b)
 

Detailed Description

template<class CellIndexT, unsigned int dim>
class coupling::datastructures::CellContainer< CellIndexT, dim >::Iterator

Provides iterator functionality (increment, access as <*cell, index> pair, equality)

Member Function Documentation

◆ operator*()

template<class CellIndexT, unsigned int dim>
const std::pair< coupling::datastructures::CouplingCell< dim > *, CellIndexT > coupling::datastructures::CellContainer< CellIndexT, dim >::Iterator::operator* ( ) const
inline

Iterator access, returning the data at the current iterator location

Returns
a std::pair with the cell pointer and the index of the data that the iterator points to

Member Data Documentation

◆ _itCouplingCells

template<class CellIndexT, unsigned int dim>
CouplingCellIterator coupling::datastructures::CellContainer< CellIndexT, dim >::Iterator::_itCouplingCells
private

Iterator to underlying cell* vector

◆ _itIdx

template<class CellIndexT, unsigned int dim>
CellIndexT::IndexIterator coupling::datastructures::CellContainer< CellIndexT, dim >::Iterator::_itIdx
private

Iterator over the index subdomain

As the container spans the whole index subdomain, the iterators already available for this index domain can be reused, and incremented in lockstep with the internal iterator for the vector


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