From 05107f383b2c3042d9fac1c247239ba78c498cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 28 Feb 2012 10:13:14 +0100 Subject: [PATCH] Doc: some workarounds for Doxygen C++11 support etc. --- src/BufferedImage.h | 7 ++++++- src/Image.h | 10 +++++++++- src/Math/Matrix.h | 4 ++++ src/Math/Matrix3.h | 9 ++++++++- src/Math/Matrix4.h | 9 ++++++++- src/Math/Vector.h | 4 ++++ src/Primitives/Icosphere.h | 4 ++++ src/SizeTraits.h | 8 +++++--- 8 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/BufferedImage.h b/src/BufferedImage.h index e1487d8dd..31556a4cb 100644 --- a/src/BufferedImage.h +++ b/src/BufferedImage.h @@ -116,7 +116,12 @@ typedef BufferedImage<1> BufferedImage1D; /** @brief Two-dimensional buffered image */ class MAGNUM_EXPORT BufferedImage2D: public BufferedImage<2> { public: - /** @copydoc BufferedImage::BufferedImage */ + /** + * @brief Constructor + * @param colorFormat Color format of the data. + * @param type Data type per color channel + */ + /* doxygen: @copydoc BufferedImage::BufferedImage doesn't work */ inline BufferedImage2D(AbstractTexture::ColorFormat colorFormat, Type type): BufferedImage(colorFormat, type) {} /** diff --git a/src/Image.h b/src/Image.h index 046a11033..e53201143 100644 --- a/src/Image.h +++ b/src/Image.h @@ -121,7 +121,15 @@ typedef Image<1> Image1D; /** @brief Two-dimensional image */ class MAGNUM_EXPORT Image2D: public Image<2> { public: - /** @copydoc Image::Image */ + /** + * @brief Constructor + * @param colorFormat Color format of passed data + * @param type Data type per color channel + * + * Dimensions and data pointer are are set to zero, call + * setDimensions() and setData() to fill the image with data. + */ + /* doxygen: @copydoc Image::Image doesn't work */ inline Image2D(AbstractTexture::ColorFormat colorFormat, Type type): Image(colorFormat, type) {} /** diff --git a/src/Math/Matrix.h b/src/Math/Matrix.h index b2e8ea696..b0e2063ee 100644 --- a/src/Math/Matrix.h +++ b/src/Math/Matrix.h @@ -48,7 +48,11 @@ template class Matrix { * * Note that the values are in column-major order. */ + #ifndef DOXYGEN_GENERATING_OUTPUT template inline Matrix(T first, U&&... next): _data{first, std::forward(next)...} {} + #else + template inline Matrix(T first, U&&... next); + #endif /** * @brief Constructor diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index 7309e3441..879d87b85 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -30,7 +30,14 @@ template class Matrix3: public Matrix { /** @copydoc Matrix::Matrix(bool) */ inline Matrix3(bool identity = true): Matrix(identity) {} - /** @copydoc Matrix::Matrix(T, U&&...) */ + /** + * @brief Initializer-list constructor + * @param first First value + * @param next Next values + * + * Note that the values are in column-major order. + */ + /* doxygen: @copydoc Matrix::Matrix(T, U&&...) doesn't work */ template inline Matrix3(T first, U&&... next): Matrix(first, std::forward(next)...) {} /** @copydoc Matrix::Matrix(const T*) */ diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index 7bc0eeaa3..920b24d82 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -96,7 +96,14 @@ template class Matrix4: public Matrix { /** @copydoc Matrix::Matrix(bool) */ inline Matrix4(bool identity = true): Matrix(identity) {} - /** @copydoc Matrix::Matrix(T, U&&...) */ + /** + * @brief Initializer-list constructor + * @param first First value + * @param next Next values + * + * Note that the values are in column-major order. + */ + /* doxygen: @copydoc Matrix::Matrix(T, U&&...) doesn't work */ template inline Matrix4(T first, U&&... next): Matrix(first, std::forward(next)...) {} /** @copydoc Matrix::Matrix(const T*) */ diff --git a/src/Math/Vector.h b/src/Math/Vector.h index b6f436172..e38fed5dd 100644 --- a/src/Math/Vector.h +++ b/src/Math/Vector.h @@ -48,7 +48,11 @@ template class Vector { * @param first First value * @param next Next values */ + #ifndef DOXYGEN_GENERATING_OUTPUT template inline Vector(T first, U&&... next): _data{first, std::forward(next)...} {} + #else + template inline Vector(T first, U&&... next); + #endif /** * @brief Constructor diff --git a/src/Primitives/Icosphere.h b/src/Primitives/Icosphere.h index fc307051f..5cd011e03 100644 --- a/src/Primitives/Icosphere.h +++ b/src/Primitives/Icosphere.h @@ -43,7 +43,11 @@ template<> class Icosphere<0>: public Trade::MeshData { * @brief %Icosphere primitive * @tparam subdivisions Number of subdivisions */ +#ifndef DOXYGEN_GENERATING_OUTPUT template class Icosphere: public Icosphere<0> { +#else +template class Icosphere { +#endif public: /** @brief Constructor */ Icosphere() { diff --git a/src/SizeTraits.h b/src/SizeTraits.h index aad5dcc3a..5683a8d33 100644 --- a/src/SizeTraits.h +++ b/src/SizeTraits.h @@ -35,8 +35,8 @@ if you want to store 289 elements, they occupy two bytes, so convenience you can use Log class to compute logarithms at compile time, e.g. %SizeTraits<Log<256, 289>::%value>::%SizeType. */ -template struct SizeTraits: public SizeTraits { - #ifdef DOXYGEN_GENERATING_OUTPUT +#ifdef DOXYGEN_GENERATING_OUTPUT +template struct SizeTraits { /** * @brief (Unsigned) type able to index the data * @@ -44,8 +44,10 @@ template struct SizeTraits: public SizeTraits { * OpenGL doesn't have any type which would be able to store the indices. */ typedef T SizeType; - #endif }; +#else +template struct SizeTraits: public SizeTraits {}; +#endif #ifndef DOXYGEN_GENERATING_OUTPUT template<> struct SizeTraits<0> {