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 @@ ...@@ -19,9 +19,9 @@
/*! /*!
* \file * \file
* \ingroup Common * \ingroup Common
* \brief Simple range between begin and end iterators * \brief Class that represents a range between begin and end iterators.
* that can be used to support range-based for loops. * Can be used to support range-based for loops.
* The implementation is strongly inspired by the one provided in Dune, see * 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 * https://gitlab.dune-project.org/core/dune-common/-/blob/master/dune/common/iteratorrange.hh
*/ */
#ifndef FRACKIT_COMMON_ITERATORRANGE_HH #ifndef FRACKIT_COMMON_ITERATORRANGE_HH
...@@ -31,37 +31,24 @@ namespace Frackit { ...@@ -31,37 +31,24 @@ namespace Frackit {
/*! /*!
* \ingroup Common * \ingroup Common
* \brief Simple range between begin and end iterators * \brief Class that represents a range between begin and end iterators.
* that can be used to support range-based for loops. * Can be used to support range-based for loops.
* The implementation is strongly inspired by the one provided in Dune, see * 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 * https://gitlab.dune-project.org/core/dune-common/-/blob/master/dune/common/iteratorrange.hh
*
* \tparam Iterator The type of iterator
*/ */
template<typename Iterator> template<typename Iterator>
class IteratorRange class IteratorRange
{ {
public: public:
///@{
//! The iterators belonging to this range.
using iterator = Iterator; using iterator = Iterator;
using const_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() = 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_; } Iterator begin() const { return begin_; }
//! Returns an iterator pointing past the end of the range.
Iterator end() const { return end_; } Iterator end() const { return end_; }
private: 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