RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::range Class Reference

#include <common.h>

Inheritance diagram for RINGMesh::range:
RINGMesh::entity_range< DIMENSION > RINGMesh::corner_range< DIMENSION > RINGMesh::geol_entity_range< DIMENSION > RINGMesh::line_range< DIMENSION > RINGMesh::region_range< DIMENSION > RINGMesh::surface_range< DIMENSION >

Public Member Functions

template<typename T1 , typename T2 >
 range (T1 begin, T2 end)
 
template<typename T >
 range (T end)
 
const rangebegin () const
 
const rangeend () const
 
bool operator!= (const range &) const
 
void operator++ ()
 
index_t operator* () const
 

Protected Attributes

index_t iter_ { 0 }
 
index_t last_ { 0 }
 

Detailed Description

This class can be used to iterate over integer loop. Example: = C++98 loop = for( index_t i = 0; i < n; i++ ) { // do something }

    = C++11-like loop =

for( index_t i : range( n ) ) { // do something }

Definition at line 202 of file common.h.

Constructor & Destructor Documentation

◆ range() [1/2]

template<typename T1 , typename T2 >
RINGMesh::range::range ( T1  begin,
T2  end 
)
inline

Definition at line 206 of file common.h.

◆ range() [2/2]

template<typename T >
RINGMesh::range::range ( end)
inlineexplicit

Definition at line 212 of file common.h.

Member Function Documentation

◆ begin()

const range& RINGMesh::range::begin ( ) const
inline

Definition at line 216 of file common.h.

◆ end()

const range& RINGMesh::range::end ( ) const
inline

Definition at line 220 of file common.h.

◆ operator!=()

bool RINGMesh::range::operator!= ( const range ) const
inline

Definition at line 225 of file common.h.

◆ operator*()

index_t RINGMesh::range::operator* ( ) const
inline

Definition at line 233 of file common.h.

◆ operator++()

void RINGMesh::range::operator++ ( )
inline

Definition at line 229 of file common.h.

Member Data Documentation

◆ iter_

index_t RINGMesh::range::iter_ { 0 }
protected

Definition at line 239 of file common.h.

◆ last_

index_t RINGMesh::range::last_ { 0 }
protected

Definition at line 240 of file common.h.


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