libMesh
Classes | Public Member Functions | Private Attributes | List of all members
libMesh::IntRange< T > Class Template Reference

The IntRange templated class is intended to make it easy to loop over integers which are indices of a container. More...

#include <int_range.h>

Classes

class  iterator
 

Public Member Functions

 IntRange (T begin, T end)
 
iterator begin () const
 
iterator end () const
 

Private Attributes

iterator _begin
 
iterator _end
 

Detailed Description

template<typename T>
class libMesh::IntRange< T >

The IntRange templated class is intended to make it easy to loop over integers which are indices of a container.

In cases where such a range is defined by the result of a virtual function call, this allows range-based for loops to be easily written which make only a single such call, rather than a new call for each iteration.

Author
Roy H. Stogner

Definition at line 42 of file int_range.h.

Constructor & Destructor Documentation

template<typename T>
libMesh::IntRange< T >::IntRange ( begin,
end 
)

Definition at line 74 of file int_range.h.

74 : _begin(begin), _end(end) {}
iterator _begin
Definition: int_range.h:81
iterator begin() const
Definition: int_range.h:76
iterator end() const
Definition: int_range.h:78
iterator _end
Definition: int_range.h:81

Member Function Documentation

template<typename T>
iterator libMesh::IntRange< T >::begin ( ) const

Definition at line 76 of file int_range.h.

References libMesh::IntRange< T >::_begin.

76 { return _begin; }
iterator _begin
Definition: int_range.h:81
template<typename T>
iterator libMesh::IntRange< T >::end ( ) const

Definition at line 78 of file int_range.h.

References libMesh::IntRange< T >::_end.

78 { return _end; }
iterator _end
Definition: int_range.h:81

Member Data Documentation

template<typename T>
iterator libMesh::IntRange< T >::_begin
private

Definition at line 81 of file int_range.h.

Referenced by libMesh::IntRange< T >::begin().

template<typename T>
iterator libMesh::IntRange< T >::_end
private

Definition at line 81 of file int_range.h.

Referenced by libMesh::IntRange< T >::end().


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