From: Wolfgang Bangerth Date: Tue, 31 Oct 2023 21:08:37 +0000 (-0600) Subject: Replace ACCESSOR -> AccessorType. X-Git-Tag: relicensing~337^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b25cd12301f164d2e9a52084bd336b491eb9ef46;p=dealii.git Replace ACCESSOR -> AccessorType. --- diff --git a/include/deal.II/lac/matrix_iterator.h b/include/deal.II/lac/matrix_iterator.h index c1a437a8c8..efbb9792e1 100644 --- a/include/deal.II/lac/matrix_iterator.h +++ b/include/deal.II/lac/matrix_iterator.h @@ -27,9 +27,9 @@ DEAL_II_NAMESPACE_OPEN * Iterator for constant and non-constant matrices. * * This iterator is abstracted from the actual matrix type and can be used for - * any matrix having the required ACCESSOR type. + * any matrix having the required AccessorType type. */ -template +template class MatrixIterator { public: @@ -41,7 +41,7 @@ public: /** * Typedef for the matrix type (including constness) we are to operate on. */ - using MatrixType = typename ACCESSOR::MatrixType; + using MatrixType = typename AccessorType::MatrixType; /** * Constructor. Create an iterator into the matrix matrix for the @@ -54,11 +54,11 @@ public: /** * Copy from another matrix iterator. Mostly implemented to allow * initialization of a constant iterator from a non constant, this function - * only requires that a conversion from the other iterator's accessor to - * this accessor object is possible. + * only requires that a conversion from the other iterator's AccessorType to + * this AccessorType object is possible. */ - template - MatrixIterator(const MatrixIterator &other); + template + MatrixIterator(const MatrixIterator &other); /** * Prefix increment. @@ -75,28 +75,28 @@ public: /** * Dereferencing operator. */ - const ACCESSOR & + const AccessorType & operator*() const; /** * Dereferencing operator. */ - const ACCESSOR * + const AccessorType * operator->() const; /** * Comparison. True, if both accessors are equal. */ - template + template bool - operator==(const MatrixIterator &) const; + operator==(const MatrixIterator &) const; /** * Inverse of ==. */ - template + template bool - operator!=(const MatrixIterator &) const; + operator!=(const MatrixIterator &) const; /** * Comparison operator. Result is true if either the first row number is @@ -116,46 +116,46 @@ public: private: /** - * Store an object of the accessor class. + * Store an object of the AccessorType class. */ - ACCESSOR accessor; + AccessorType accessor; // Allow other iterators access to private data. - template + template friend class MatrixIterator; }; //----------------------------------------------------------------------// -template -inline MatrixIterator::MatrixIterator(MatrixType *matrix, - const size_type r, - const size_type i) +template +inline MatrixIterator::MatrixIterator(MatrixType *matrix, + const size_type r, + const size_type i) : accessor(matrix, r, i) {} -template -template -inline MatrixIterator::MatrixIterator( - const MatrixIterator &other) +template +template +inline MatrixIterator::MatrixIterator( + const MatrixIterator &other) : accessor(other.accessor) {} -template -inline MatrixIterator & -MatrixIterator::operator++() +template +inline MatrixIterator & +MatrixIterator::operator++() { accessor.advance(); return *this; } -template -inline MatrixIterator -MatrixIterator::operator++(int) +template +inline MatrixIterator +MatrixIterator::operator++(int) { const MatrixIterator iter = *this; accessor.advance(); @@ -163,45 +163,45 @@ MatrixIterator::operator++(int) } -template -inline const ACCESSOR & -MatrixIterator::operator*() const +template +inline const AccessorType & +MatrixIterator::operator*() const { return accessor; } -template -inline const ACCESSOR * -MatrixIterator::operator->() const +template +inline const AccessorType * +MatrixIterator::operator->() const { return &accessor; } -template -template +template +template inline bool -MatrixIterator::operator==( - const MatrixIterator &other) const +MatrixIterator::operator==( + const MatrixIterator &other) const { return (accessor == other.accessor); } -template -template +template +template inline bool -MatrixIterator::operator!=( - const MatrixIterator &other) const +MatrixIterator::operator!=( + const MatrixIterator &other) const { return !(*this == other); } -template +template inline bool -MatrixIterator::operator<(const MatrixIterator &other) const +MatrixIterator::operator<(const MatrixIterator &other) const { Assert(&accessor.get_matrix() == &other.accessor.get_matrix(), ExcInternalError()); @@ -210,9 +210,9 @@ MatrixIterator::operator<(const MatrixIterator &other) const } -template +template inline bool -MatrixIterator::operator>(const MatrixIterator &other) const +MatrixIterator::operator>(const MatrixIterator &other) const { return (other < *this); }