Commit caa52fd2 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[common][itrange] modify doc

The functions are self-explanatory and the way it was rendered in
Doxygen was not really helpful. This makes the Doxygen page more
readable.
parent 6e894a3f
......@@ -19,9 +19,9 @@
/*!
* \file
* \ingroup Common
* \brief Simple range between begin and end iterators
* that can be used to support range-based for loops.
* The implementation is strongly inspired by the one provided in Dune, see
* \brief Class that represents a range between begin and end iterators.
* Can be used to support range-based for loops.
* The implementation is inspired by the one provided in Dune, see
* https://gitlab.dune-project.org/core/dune-common/-/blob/master/dune/common/iteratorrange.hh
*/
#ifndef FRACKIT_COMMON_ITERATORRANGE_HH
......@@ -31,37 +31,24 @@ namespace Frackit {
/*!
* \ingroup Common
* \brief Simple range between begin and end iterators
* that can be used to support range-based for loops.
* The implementation is strongly inspired by the one provided in Dune, see
* \brief Class that represents a range between begin and end iterators.
* Can be used to support range-based for loops.
* The implementation is inspired by the one provided in Dune, see
* https://gitlab.dune-project.org/core/dune-common/-/blob/master/dune/common/iteratorrange.hh
*
* \tparam Iterator The type of iterator
*/
template<typename Iterator>
class IteratorRange
{
public:
///@{
//! The iterators belonging to this range.
using iterator = Iterator;
using const_iterator = Iterator;
///@}
//! Constructs an iterator range on [begin, end).
IteratorRange(const Iterator& begin, const Iterator& end)
: begin_(begin)
, end_(end)
{}
//! Default constructor
IteratorRange() = default;
IteratorRange(const Iterator& begin, const Iterator& end)
: begin_(begin) , end_(end) {}
//! Returns an iterator pointing to the begin of the range.
Iterator begin() const { return begin_; }
//! Returns an iterator pointing past the end of the range.
Iterator end() const { return end_; }
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment