From: bangerth Date: Thu, 8 Oct 2009 13:06:21 +0000 (+0000) Subject: Avoid doxygen warning about this function: X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74f90ab1310ee2d1f203ea6925506d8e33b7cb1b;p=dealii-svn.git Avoid doxygen warning about this function: Warning: documented function `VectorView< Number >::operator const Vector< Number > &' was not declared or defined. git-svn-id: https://svn.dealii.org/trunk@19762 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/vector_view.h b/deal.II/lac/include/lac/vector_view.h index 6fc42ae1fa..18d5d7e1a5 100644 --- a/deal.II/lac/include/lac/vector_view.h +++ b/deal.II/lac/include/lac/vector_view.h @@ -84,17 +84,17 @@ DEAL_II_NAMESPACE_OPEN VectorView view(5, array); view(1) = 4; - + // The following line should output 4. cout << array[1] << endl; // If debug mode is on, then the following triggers an execption: view(6) = 4; - + // But notice that no checks are performed, so this is legal but WILL // NOT work VectorView wrong_view(10, array); - + // Now no assert will be thrown if you type wrong_view(6), but most // likely a seg fault will occur. view(6) = 4; @@ -102,11 +102,11 @@ DEAL_II_NAMESPACE_OPEN // Notice that this construction is legal. It will create a copy of // the array. const Vector const_copy(view); - + // Now this is the correct way to instantiate a constant view of the // above vector: const VectorView correct_const_copy_view(5, const_copy.begin()); - + // While this will compile, BUT WILL NOT COMPLAIN if you try to write // on it! VectorView wrong_const_copy_view(5, const_copy.begin()); @@ -114,9 +114,9 @@ DEAL_II_NAMESPACE_OPEN // Now writing to elements of wrong_const_copy_view is allowed, and // will change the same memory as the const_copy object. wrong_const_copy_view(1) = 5; - + if(copy_view(1) == wrong_const_copy_view(1)) cout << "Tautology"; - + @endcode * * @@ -126,13 +126,13 @@ DEAL_II_NAMESPACE_OPEN * @@>; others can be generated in * application programs (see the section on @ref Instantiations in the * manual). - * + * * @author Luca Heltai, 2009 */ template class VectorView : public Vector { - public: + public: /** * Read write constructor. Takes the size * of the vector, just like the standard @@ -141,7 +141,7 @@ class VectorView : public Vector * ptr. */ VectorView(const unsigned int new_size, Number *ptr); - + /** * The constant constructor is the same * as above, however you will not be able @@ -156,7 +156,7 @@ class VectorView : public Vector * attempt to write on it. */ VectorView(const unsigned int new_size, const Number *ptr); - + /** * This desctructor will only reset the * internal sizes and the internal @@ -172,7 +172,7 @@ class VectorView : public Vector * Vector is required. */ operator const Vector &() const; - + /** * The reinit function of this object has * a behavior which is different from the @@ -202,7 +202,7 @@ class VectorView : public Vector * * // Make a view of it * VectorView view_of_long_vector(1, long_vector.begin()); - * + * * // Resize the original vector to a bigger size * long_vector.reinit(100); * @@ -230,17 +230,17 @@ class VectorView : public Vector * this behavior, and you should only * call this reinit function if you * really know what you are doing. - */ + */ virtual void reinit (const unsigned int N, const bool fast=false); - + /** This reinit function is equivalent to constructing a new object with the given size, starting from the pointer ptr. */ void reinit(const unsigned int N, Number * ptr); - + /** This reinit function is equivalent to constructing a new object with the given @@ -249,12 +249,12 @@ class VectorView : public Vector considerations made for the constructor apply here. */ void reinit(const unsigned int N, const Number * ptr); - + /** * This function is here to prevent * memory corruption. It should never be * called, and will throw an exception if - * you try to do so. */ + * you try to do so. */ virtual void swap (Vector &v); }; @@ -263,7 +263,7 @@ class VectorView : public Vector /*@}*/ /*----------------------- Inline functions ----------------------------------*/ - +#ifndef DOXYGEN template inline @@ -278,7 +278,7 @@ VectorView::VectorView(const unsigned int new_size, Number * ptr) template inline -VectorView::VectorView(const unsigned int new_size, const Number * ptr) +VectorView::VectorView(const unsigned int new_size, const Number * ptr) { this->vec_size = new_size; this->max_vec_size = new_size; @@ -330,7 +330,7 @@ void VectorView::reinit(const unsigned int new_size, Number * ptr) template inline -void VectorView::reinit(const unsigned int new_size, const Number * ptr) +void VectorView::reinit(const unsigned int new_size, const Number * ptr) { this->vec_size = new_size; this->max_vec_size = new_size; @@ -345,6 +345,8 @@ void VectorView::swap(Vector &) AssertThrow(false, ExcMessage("Cant' swap a VectorView with a Vector!")); } +#endif + DEAL_II_NAMESPACE_CLOSE #endif