MIRA
Public Types | Public Member Functions | List of all members
IteratorRangeContainer< Iterator > Class Template Reference

Wraps an STL conform container around a range of values within another container. More...

#include <utils/IteratorRangeContainer.h>

Public Types

typedef Iterator iterator
 
typedef Iterator::reference reference
 

Public Member Functions

 IteratorRangeContainer ()
 Default constructor. More...
 
 IteratorRangeContainer (const Iterator &begin, const Iterator &end)
 Constructor taking two iterators that define the range. More...
 
iterator begin () const
 Returns an iterator to the first element of the range. More...
 
iterator end () const
 Returns an iterator to the end of the range. More...
 
reference front () const
 Returns the first element in the range. More...
 
reference back () const
 Returns the last element in the range. More...
 
std::size_t size () const
 Returns the number of elements in the given range. More...
 

Detailed Description

template<typename Iterator>
class mira::IteratorRangeContainer< Iterator >

Wraps an STL conform container around a range of values within another container.

The Range is given by two iterators. Hence, this container can act as a view to a portion of another container.

Member Typedef Documentation

◆ iterator

typedef Iterator iterator

◆ reference

typedef Iterator::reference reference

Constructor & Destructor Documentation

◆ IteratorRangeContainer() [1/2]

Default constructor.

◆ IteratorRangeContainer() [2/2]

IteratorRangeContainer ( const Iterator &  begin,
const Iterator &  end 
)
inline

Constructor taking two iterators that define the range.

Member Function Documentation

◆ begin()

iterator begin ( ) const
inline

Returns an iterator to the first element of the range.

◆ end()

iterator end ( ) const
inline

Returns an iterator to the end of the range.

◆ front()

reference front ( ) const
inline

Returns the first element in the range.

◆ back()

reference back ( ) const
inline

Returns the last element in the range.

◆ size()

std::size_t size ( ) const
inline

Returns the number of elements in the given range.


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