preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
precice::mesh::IndexRangeIterator< Source, Value > Class Template Reference

#include <RangeAccessor.hpp>

Inheritance diagram for precice::mesh::IndexRangeIterator< Source, Value >:
[legend]
Collaboration diagram for precice::mesh::IndexRangeIterator< Source, Value >:
[legend]

Public Member Functions

 IndexRangeIterator ()=default
 
 IndexRangeIterator (Source *src, size_t index)
 
const Value & dereference () const
 
size_t equal (const IndexRangeIterator< Source, Value > &other) const
 
void increment ()
 
void decrement ()
 
void advance (size_t n)
 
size_t distance_to (const IndexRangeIterator< Source, Value > &other) const
 

Private Attributes

Source * src_ {nullptr}
 the source to access
 
size_t idx_ {0}
 the current index to access
 

Detailed Description

template<typename Source, typename Value>
class precice::mesh::IndexRangeIterator< Source, Value >

random-access iterator over an indexable Source.

Template Parameters
Sourcethe underlying container to index into
Valuethe resulting value
Note
This version currently only supports Sources with a const src.vertex(index).getCoords() access.

Definition at line 15 of file RangeAccessor.hpp.

Constructor & Destructor Documentation

◆ IndexRangeIterator() [1/2]

template<typename Source , typename Value >
precice::mesh::IndexRangeIterator< Source, Value >::IndexRangeIterator ( )
default

◆ IndexRangeIterator() [2/2]

template<typename Source , typename Value >
precice::mesh::IndexRangeIterator< Source, Value >::IndexRangeIterator ( Source * src,
size_t index )
inline

Definition at line 21 of file RangeAccessor.hpp.

Member Function Documentation

◆ advance()

template<typename Source , typename Value >
void precice::mesh::IndexRangeIterator< Source, Value >::advance ( size_t n)
inline

Definition at line 51 of file RangeAccessor.hpp.

◆ decrement()

template<typename Source , typename Value >
void precice::mesh::IndexRangeIterator< Source, Value >::decrement ( )
inline

Definition at line 46 of file RangeAccessor.hpp.

◆ dereference()

template<typename Source , typename Value >
const Value & precice::mesh::IndexRangeIterator< Source, Value >::dereference ( ) const
inline

Definition at line 24 of file RangeAccessor.hpp.

◆ distance_to()

template<typename Source , typename Value >
size_t precice::mesh::IndexRangeIterator< Source, Value >::distance_to ( const IndexRangeIterator< Source, Value > & other) const
inline

Definition at line 56 of file RangeAccessor.hpp.

◆ equal()

template<typename Source , typename Value >
size_t precice::mesh::IndexRangeIterator< Source, Value >::equal ( const IndexRangeIterator< Source, Value > & other) const
inline

Definition at line 36 of file RangeAccessor.hpp.

◆ increment()

template<typename Source , typename Value >
void precice::mesh::IndexRangeIterator< Source, Value >::increment ( )
inline

Definition at line 41 of file RangeAccessor.hpp.

Member Data Documentation

◆ idx_

template<typename Source , typename Value >
size_t precice::mesh::IndexRangeIterator< Source, Value >::idx_ {0}
private

the current index to access

Definition at line 63 of file RangeAccessor.hpp.

◆ src_

template<typename Source , typename Value >
Source* precice::mesh::IndexRangeIterator< Source, Value >::src_ {nullptr}
private

the source to access

Definition at line 62 of file RangeAccessor.hpp.


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