diff --git a/Circulator/doc_tex/Circulator/range.tex b/Circulator/doc_tex/Circulator/range.tex index 843d08ca3ec..102c00bd83a 100644 --- a/Circulator/doc_tex/Circulator/range.tex +++ b/Circulator/doc_tex/Circulator/range.tex @@ -1,6 +1,7 @@ \section{Ranges} Most data structures in \cgal\ use the concept of an iterator range. The -\ccc{Range} concept encapsulates the access to the first and the past-the-end -iterators of an iterator range. STL containers are models of \ccc{Range}. -The Boost.Range library provides good support around this concept as well. +\ccc{Range} and \ccc{ConstRange} concepts encapsulate the access to the first +and the past-the-end iterators of an iterator range. STL containers are models +of \ccc{Range}. The Boost.Range library provides good support around this +concept as well. diff --git a/Circulator/doc_tex/Circulator_ref/ConstRange.tex b/Circulator/doc_tex/Circulator_ref/ConstRange.tex new file mode 100644 index 00000000000..076deda82c9 --- /dev/null +++ b/Circulator/doc_tex/Circulator_ref/ConstRange.tex @@ -0,0 +1,38 @@ +\begin{ccRefConcept}{ConstRange} + +\ccDefinition + +A constant iterator range. Refer to the \ccc{Range} concept for more details. + +\ccRefines + +Boost's Range concept + +\ccCreationVariable{r} %% choose variable name + +\ccTypes + +\ccNestedType{const_iterator} {The constant iterator type.} + +\ccHeading{Member functions} + +\def\ccTagRmTrailingConst{\ccFalse} + +\ccMethod{const_iterator begin() const;}{returns the const iterator pointing to the first element.} +\ccGlue +\ccMethod{const_iterator end() const;}{returns the past-the-end const iterator.} + +\ccMethod{difference_type size() const;}{returns the size of the range.} +\ccGlue +\ccMethod{bool empty() const;}{returns whether the range is empty.} + +\def\ccTagRmTrailingConst{\ccTrue} + +\ccHasModels +STL containers\\ +\ccc{boost::iterator_range} + +\ccSeeAlso +\ccc{Range} + +\end{ccRefConcept} diff --git a/Circulator/doc_tex/Circulator_ref/Range.tex b/Circulator/doc_tex/Circulator_ref/Range.tex index 095f7f343c8..b0d8a73a2ed 100644 --- a/Circulator/doc_tex/Circulator_ref/Range.tex +++ b/Circulator/doc_tex/Circulator_ref/Range.tex @@ -17,7 +17,7 @@ bidirectional or random-access. The category can be queried using \ccc{std::iterator_traits} and the corresponding iterator type. Boost also offers the Boost.Range -library\footnote{\url{http://www.boost.org/doc/libs/1_43_0/libs/range/doc/html/index.html}} +library\footnote{\url{http://www.boost.org/doc/libs/1_44_0/libs/range/doc/html/index.html}} which provides good support for ranges. Finally, let us note that ranges, in general (especially in template context) @@ -26,6 +26,8 @@ difference with iterators which are typically passed by value. \ccRefines +\ccc{ConstRange} + Boost's Range concept %\ccCreation @@ -33,26 +35,16 @@ Boost's Range concept \ccTypes -\ccNestedType{const_iterator} {The constant iterator type.} -\ccGlue \ccNestedType{iterator} {The iterator type. It must be convertible to \ccc{const_iterator}.} \ccHeading{Member functions} \def\ccTagRmTrailingConst{\ccFalse} -\ccMethod{const_iterator begin() const;}{returns the const iterator pointing to the first element.} -\ccGlue -\ccMethod{const_iterator end() const;}{returns the past-the-end const iterator.} - \ccMethod{iterator begin();}{returns the iterator pointing to the first element.} \ccGlue \ccMethod{iterator end();}{returns the past-the-end iterator.} -\ccMethod{difference_type size() const;}{returns the size of the range.} -\ccGlue -\ccMethod{bool empty() const;}{returns whether the range is empty.} - \def\ccTagRmTrailingConst{\ccTrue} \ccHasModels diff --git a/Circulator/doc_tex/Circulator_ref/intro.tex b/Circulator/doc_tex/Circulator_ref/intro.tex index 32c15f03bd5..888e880b28a 100644 --- a/Circulator/doc_tex/Circulator_ref/intro.tex +++ b/Circulator/doc_tex/Circulator_ref/intro.tex @@ -15,8 +15,9 @@ The concept of iterators in the \stl\ is tailored for linear sequences. \cgal\ extends this in several directions. First, it supports the notion of \ccc{Handle} (also sometimes refered to as the trivial iterator) which is used to document that no traversal operation is needed, only reference to an -element. It also uses the \ccc{Range} concept which encapsulates the access to -both the first and the past-the-end iterators of an iterator range. +element. It also uses the \ccc{Range} and \ccc{ConstRange} concepts which +encapsulates the access to both the first and the past-the-end iterators of an +iterator range. Besides linear sequences, circular sequences also occur naturally in many combinatorial and geometric structures. Examples are polyhedral surfaces and planar @@ -35,6 +36,7 @@ circulators as well as with iterators. \ccRefConceptPage{Handle}\\ \ccRefConceptPage{Range}\\ +\ccRefConceptPage{ConstRange}\\ \ccRefConceptPage{Circulator}\\ \ccc{Forward_circulator}\\ \ccc{Bidirectional_circulator}\\ diff --git a/Circulator/doc_tex/Circulator_ref/main.tex b/Circulator/doc_tex/Circulator_ref/main.tex index 806e9471f68..943bd86f86d 100644 --- a/Circulator/doc_tex/Circulator_ref/main.tex +++ b/Circulator/doc_tex/Circulator_ref/main.tex @@ -18,6 +18,7 @@ \input{Circulator_ref/Container_from_circulator.tex} \input{Circulator_ref/For_all.tex} \input{Circulator_ref/Handle.tex} +\input{Circulator_ref/ConstRange.tex} \input{Circulator_ref/Range.tex} \input{Circulator_ref/is_empty_range.tex} \input{Circulator_ref/iterator_distance.tex}