From: Wolfgang Bangerth Date: Mon, 18 May 1998 08:38:37 +0000 (+0000) Subject: Doc update. X-Git-Tag: v8.0.0~22952 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b842a4134f2c5abd8899815a7974d80d354dd049;p=dealii.git Doc update. git-svn-id: https://svn.dealii.org/trunk@302 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h index 55ea217d15..ee05a5be52 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.h +++ b/deal.II/deal.II/include/grid/tria_iterator.h @@ -189,12 +189,17 @@ template class Triangulation; * iterator usage. Thus, if you declare pointers to a #const# triangulation * object, you should be well aware that you might involuntarily alter the * data stored in the triangulation. - * + * + * * \subsection{Internals} * * There is a representation of past-the-end-pointers, denoted by special * values of the member variables #present_level# and #present_index#: - * If #present_level>=0# and #present_index>=0#, then the object is valid; + * If #present_level>=0# and #present_index>=0#, then the object is valid + * (there is no check whether the triangulation really has that + * many levels or that many cells on the present level when we investigate + * the state of an iterator; however, in many places where an iterator is + * dereferenced we make this check); * if #present_level==-1# and #present_index==-1#, then the iterator points * past the end; in all other cases, the iterator is considered invalid. * You can check this by calling the #state()# function. @@ -218,6 +223,13 @@ template class Triangulation; * {\it before-the-start} value, when running backwards. There is no * distiction between the iterators pointing past the two ends of a vector. * + * By defining only one value to be past-the-end and making all other values + * invalid porvides a second track of security: if we should have forgotten + * a check in the library when an iterator is incremented or decremented, + * we automatically convert the iterator from the allowed state "past-the-end" + * to the disallowed state "invalid" which increases the chance that somehwen + * earlier than for past-the-end iterators an exception is raised. + * * @see Triangulation * @see TriaDimensionInfo * @author Wolfgang Bangerth, 1998