Browse Source

Doxygen workarounds.

I LOVE this, do you hear me? Especially at 2:40 AM.
pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
c4bf8d6eda
  1. 38
      src/Magnum/Color.h
  2. 14
      src/Magnum/Math/DualComplex.h
  3. 14
      src/Magnum/Math/DualQuaternion.h
  4. 21
      src/Magnum/Math/Matrix.h
  5. 21
      src/Magnum/Math/Matrix3.h
  6. 21
      src/Magnum/Math/Matrix4.h
  7. 28
      src/Magnum/Math/Range.h
  8. 14
      src/Magnum/Math/RectangularMatrix.h
  9. 14
      src/Magnum/Math/Vector2.h
  10. 14
      src/Magnum/Math/Vector3.h
  11. 14
      src/Magnum/Math/Vector4.h

38
src/Magnum/Color.h

@ -254,10 +254,20 @@ template<class T> class BasicColor3: public Math::Vector3<T> {
*
* All components are set to zero.
*/
constexpr /*implicit*/ BasicColor3(Math::ZeroInitT = Math::ZeroInit): Math::Vector3<T>{Math::ZeroInit} {}
/** @copydoc Vector3::Vector3(NoInitT) */
explicit BasicColor3(Math::NoInitT): Math::Vector3<T>{Math::NoInit} {}
constexpr /*implicit*/ BasicColor3(Math::ZeroInitT = Math::ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Math::Vector3<T>{Math::ZeroInit}
#endif
{}
/** @copydoc Math::Vector::Vector(NoInitT) */
explicit BasicColor3(Math::NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Math::Vector3<T>{Math::NoInit}
#endif
{}
/**
* @brief Gray constructor
@ -445,11 +455,21 @@ class BasicColor4: public Math::Vector4<T> {
*/
constexpr /*implicit*/ BasicColor4(): Math::Vector4<T>(T(0), T(0), T(0), Implementation::fullChannel<T>()) {}
/** @copydoc Vector4::Vector4(ZeroInitT) */
constexpr explicit BasicColor4(Math::ZeroInitT): Math::Vector4<T>{Math::ZeroInit} {}
/** @copydoc Vector4::Vector4(NoInitT) */
explicit BasicColor4(Math::NoInitT): Math::Vector4<T>{Math::NoInit} {}
/** @copydoc Math::Vector::Vector(ZeroInitT) */
constexpr explicit BasicColor4(Math::ZeroInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Math::Vector4<T>{Math::ZeroInit}
#endif
{}
/** @copydoc Math::Vector::Vector(NoInitT) */
explicit BasicColor4(Math::NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Math::Vector4<T>{Math::NoInit}
#endif
{}
/**
* @copydoc BasicColor3::BasicColor3(T)

14
src/Magnum/Math/DualComplex.h

@ -110,10 +110,20 @@ template<class T> class DualComplex: public Dual<Complex<T>> {
#endif
/** @brief Construct zero-initialized dual complex number */
constexpr explicit DualComplex(ZeroInitT): Dual<Complex<T>>{Complex<T>{ZeroInit}, Complex<T>{ZeroInit}} {}
constexpr explicit DualComplex(ZeroInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Complex<T>>{Complex<T>{ZeroInit}, Complex<T>{ZeroInit}}
#endif
{}
/** @brief Construct without initializing the contents */
explicit DualComplex(NoInitT): Dual<Complex<T>>{NoInit} {}
explicit DualComplex(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Complex<T>>{NoInit}
#endif
{}
/**
* @brief Construct dual complex number from real and dual part

14
src/Magnum/Math/DualQuaternion.h

@ -116,10 +116,20 @@ template<class T> class DualQuaternion: public Dual<Quaternion<T>> {
#endif
/** @brief Construct zero-initialized dual quaternion */
constexpr explicit DualQuaternion(ZeroInitT): Dual<Quaternion<T>>{Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit}} {}
constexpr explicit DualQuaternion(ZeroInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>{Quaternion<T>{ZeroInit}, Quaternion<T>{ZeroInit}}
#endif
{}
/** @brief Construct without initializing the contents */
explicit DualQuaternion(NoInitT): Dual<Quaternion<T>>{NoInit} {}
explicit DualQuaternion(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Dual<Quaternion<T>>{NoInit}
#endif
{}
/**
* @brief Construct dual quaternion from real and dual part

21
src/Magnum/Math/Matrix.h

@ -81,13 +81,28 @@ template<std::size_t size, class T> class Matrix: public RectangularMatrix<size,
* Creates identity matrix. @p value allows you to specify value on
* diagonal.
*/
constexpr /*implicit*/ Matrix(IdentityInitT = IdentityInit, T value = T(1)): RectangularMatrix<size, size, T>(typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)) {}
constexpr /*implicit*/ Matrix(IdentityInitT = IdentityInit, T value = T(1))
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{typename Implementation::GenerateSequence<size>::Type(), Vector<size, T>(value)}
#endif
{}
/** @copydoc RectangularMatrix::RectangularMatrix(ZeroInitT) */
constexpr explicit Matrix(ZeroInitT): RectangularMatrix<size, size, T>{ZeroInit} {}
constexpr explicit Matrix(ZeroInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{ZeroInit}
#endif
{}
/** @copydoc RectangularMatrix::RectangularMatrix(NoInitT) */
constexpr explicit Matrix(NoInitT): RectangularMatrix<size, size, T>{NoInit} {}
constexpr explicit Matrix(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<size, size, T>{NoInit}
#endif
{}
/**
* @brief Matrix from column vectors

21
src/Magnum/Math/Matrix3.h

@ -159,13 +159,28 @@ template<class T> class Matrix3: public Matrix3x3<T> {
* Creates identity matrix. @p value allows you to specify value on
* diagonal.
*/
constexpr /*implicit*/ Matrix3(IdentityInitT = IdentityInit, T value = T{1}): Matrix3x3<T>{IdentityInit, value} {}
constexpr /*implicit*/ Matrix3(IdentityInitT = IdentityInit, T value = T{1})
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{IdentityInit, value}
#endif
{}
/** @copydoc Matrix::Matrix(ZeroInitT) */
constexpr explicit Matrix3(ZeroInitT): Matrix3x3<T>{ZeroInit} {}
constexpr explicit Matrix3(ZeroInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{ZeroInit}
#endif
{}
/** @copydoc Matrix::Matrix(NoInitT) */
constexpr explicit Matrix3(NoInitT): Matrix3x3<T>{NoInit} {}
constexpr explicit Matrix3(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix3x3<T>{NoInit}
#endif
{}
/** @brief Matrix from column vectors */
constexpr /*implicit*/ Matrix3(const Vector3<T>& first, const Vector3<T>& second, const Vector3<T>& third): Matrix3x3<T>(first, second, third) {}

21
src/Magnum/Math/Matrix4.h

@ -255,13 +255,28 @@ template<class T> class Matrix4: public Matrix4x4<T> {
* Creates identity matrix. @p value allows you to specify value on
* diagonal.
*/
constexpr /*implicit*/ Matrix4(IdentityInitT = IdentityInit, T value = T{1}): Matrix4x4<T>{IdentityInit, value} {}
constexpr /*implicit*/ Matrix4(IdentityInitT = IdentityInit, T value = T{1})
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{IdentityInit, value}
#endif
{}
/** @copydoc Matrix::Matrix(ZeroInitT) */
constexpr explicit Matrix4(ZeroInitT): Matrix4x4<T>{ZeroInit} {}
constexpr explicit Matrix4(ZeroInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{ZeroInit}
#endif
{}
/** @copydoc Matrix::Matrix(NoInitT) */
constexpr explicit Matrix4(NoInitT): Matrix4x4<T>{NoInit} {}
constexpr explicit Matrix4(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Matrix4x4<T>{NoInit}
#endif
{}
/** @brief Matrix from column vectors */
constexpr /*implicit*/ Matrix4(const Vector4<T>& first, const Vector4<T>& second, const Vector4<T>& third, const Vector4<T>& fourth): Matrix4x4<T>(first, second, third, fourth) {}

28
src/Magnum/Math/Range.h

@ -222,10 +222,20 @@ See @ref Range for more information.
template<class T> class Range2D: public Range<2, T> {
public:
/** @copydoc Range(ZeroInitT) */
constexpr /*implicit*/ Range2D(ZeroInitT = ZeroInit): Range<2, T>{ZeroInit} {}
constexpr /*implicit*/ Range2D(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<2, T>{ZeroInit}
#endif
{}
/** @copydoc Range(NoInitT) */
explicit Range2D(NoInitT): Range<2, T>{NoInit} {}
explicit Range2D(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<2, T>{NoInit}
#endif
{}
/** @copydoc Range(const VectorType&, const VectorType&) */
constexpr /*implicit*/ Range2D(const Vector2<T>& min, const Vector2<T>& max): Range<2, T>(min, max) {}
@ -336,10 +346,20 @@ See @ref Range for more information.
template<class T> class Range3D: public Range<3, T> {
public:
/** @copydoc Range(ZeroInitT) */
constexpr /*implicit*/ Range3D(ZeroInitT = ZeroInit): Range<3, T>{ZeroInit} {}
constexpr /*implicit*/ Range3D(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<3, T>{ZeroInit}
#endif
{}
/** @copybrief Range(NoInitT) */
explicit Range3D(NoInitT): Range<3, T>{NoInit} {}
explicit Range3D(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Range<3, T>{NoInit}
#endif
{}
/** @copydoc Range(const VectorType&, const VectorType&) */
constexpr /*implicit*/ Range3D(const Vector3<T>& min, const Vector3<T>& max): Range<3, T>(min, max) {}

14
src/Magnum/Math/RectangularMatrix.h

@ -106,10 +106,20 @@ template<std::size_t cols, std::size_t rows, class T> class RectangularMatrix {
}
/** @brief Construct zero-filled matrix */
constexpr /*implicit*/ RectangularMatrix(ZeroInitT = ZeroInit): RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit} {}
constexpr /*implicit*/ RectangularMatrix(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, ZeroInit}
#endif
{}
/** @brief Construct matrix without initializing the contents */
explicit RectangularMatrix(NoInitT): RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, NoInit} {}
explicit RectangularMatrix(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: RectangularMatrix<cols, rows, T>{typename Implementation::GenerateSequence<cols>::Type{}, NoInit}
#endif
{}
/**
* @brief Construct matrix from column vectors

14
src/Magnum/Math/Vector2.h

@ -112,10 +112,20 @@ template<class T> class Vector2: public Vector<2, T> {
#endif
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr /*implicit*/ Vector2(ZeroInitT = ZeroInit): Vector<2, T>{ZeroInit} {}
constexpr /*implicit*/ Vector2(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<2, T>{ZeroInit}
#endif
{}
/** @copydoc Vector::Vector(NoInitT) */
explicit Vector2(NoInitT): Vector<2, T>{NoInit} {}
explicit Vector2(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<2, T>{NoInit}
#endif
{}
/** @copydoc Vector::Vector(T) */
constexpr explicit Vector2(T value): Vector<2, T>(value) {}

14
src/Magnum/Math/Vector3.h

@ -134,10 +134,20 @@ template<class T> class Vector3: public Vector<3, T> {
#endif
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr /*implicit*/ Vector3(ZeroInitT = ZeroInit): Vector<3, T>{ZeroInit} {}
constexpr /*implicit*/ Vector3(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<3, T>{ZeroInit}
#endif
{}
/** @copydoc Vector::Vector(NoInitT) */
explicit Vector3(NoInitT): Vector<3, T>{NoInit} {}
explicit Vector3(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<3, T>{NoInit}
#endif
{}
/** @copydoc Vector::Vector(T) */
constexpr explicit Vector3(T value): Vector<3, T>(value) {}

14
src/Magnum/Math/Vector4.h

@ -60,10 +60,20 @@ template<class T> class Vector4: public Vector<4, T> {
}
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr /*implicit*/ Vector4(ZeroInitT = ZeroInit): Vector<4, T>{ZeroInit} {}
constexpr /*implicit*/ Vector4(ZeroInitT = ZeroInit)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<4, T>{ZeroInit}
#endif
{}
/** @copydoc Vector::Vector(NoInitT) */
explicit Vector4(NoInitT): Vector<4, T>{NoInit} {}
explicit Vector4(NoInitT)
/** @todoc remove workaround when doxygen is sane */
#ifndef DOXYGEN_GENERATING_OUTPUT
: Vector<4, T>{NoInit}
#endif
{}
/** @copydoc Vector::Vector(T) */
constexpr explicit Vector4(T value): Vector<4, T>(value) {}

Loading…
Cancel
Save