Browse Source

Doc: using @overload for const overloads of member functions.

vectorfields
Vladimír Vondruš 14 years ago
parent
commit
5a42ee4e91
  1. 22
      src/Math/Matrix.h
  2. 23
      src/Math/Vector.h
  3. 8
      src/Trade/MeshData.h

22
src/Math/Matrix.h

@ -60,12 +60,7 @@ template<size_t size, class T> class Matrix {
inline constexpr static Matrix<size, T>& from(T* data) {
return *reinterpret_cast<Matrix<size, T>*>(data);
}
/**
* @copybrief from(T*)
* @copydetails from(T*)
* @todoc Remove workaround when Doxygen supports \@copydoc again
*/
/** @overload */
inline constexpr static const Matrix<size, T>& from(const T* data) {
return *reinterpret_cast<const Matrix<size, T>*>(data);
}
@ -133,24 +128,13 @@ template<size_t size, class T> class Matrix {
* order.
*/
inline T* data() { return _data; }
/**
* @copybrief data()
* @copydetails data()
* @todoc Remove workaround when Doxygen supports \@copydoc again
*/
inline constexpr const T* data() const { return _data; }
inline constexpr const T* data() const { return _data; } /**< @overload */
/** @brief %Matrix column */
inline Vector<size, T>& operator[](size_t col) {
return Vector<size, T>::from(_data+col*size);
}
/**
* @copybrief operator[]()
* @copydetails operator[]()
* @todoc Remove workaround when Doxygen supports \@copydoc again
*/
/** @overload */
inline constexpr const Vector<size, T>& operator[](size_t col) const {
return Vector<size, T>::from(_data+col*size);
}

23
src/Math/Vector.h

@ -47,12 +47,7 @@ template<size_t size, class T> class Vector {
inline constexpr static Vector<size, T>& from(T* data) {
return *reinterpret_cast<Vector<size, T>*>(data);
}
/**
* @copybrief from(T*)
* @copydetails from(T*)
* @todoc Remove workaround when Doxygen supports \@copydoc again
*/
/** @overload */
inline constexpr static const Vector<size, T>& from(const T* data) {
return *reinterpret_cast<const Vector<size, T>*>(data);
}
@ -124,23 +119,11 @@ template<size_t size, class T> class Vector {
* @return Array with the same size as the vector
*/
inline T* data() { return _data; }
/**
* @copybrief data()
* @copydetails data()
* @todoc Remove workaround when Doxygen supports \@copydoc again
*/
inline constexpr const T* data() const { return _data; }
inline constexpr const T* data() const { return _data; } /**< @overload */
/** @brief Value at given position */
inline T& operator[](size_t pos) { return _data[pos]; }
/**
* @copybrief operator[]()
* @copydetails operator[]()
* @todoc Remove workaround when Doxygen supports \@copydoc again
*/
inline constexpr T operator[](size_t pos) const { return _data[pos]; }
inline constexpr T operator[](size_t pos) const { return _data[pos]; } /**< @overload */
/** @brief Equality operator */
inline bool operator==(const Vector<size, T>& other) const {

8
src/Trade/MeshData.h

@ -60,7 +60,7 @@ class MAGNUM_EXPORT MeshData {
* @return Indices or nullptr if the mesh is not indexed.
*/
inline std::vector<unsigned int>* indices() { return _indices; }
inline const std::vector<unsigned int>* indices() const { return _indices; } /**< @copydoc indices() */
inline const std::vector<unsigned int>* indices() const { return _indices; } /**< @overload */
/** @brief Count of vertex arrays */
inline size_t vertexArrayCount() const { return _vertices.size(); };
@ -72,7 +72,7 @@ class MAGNUM_EXPORT MeshData {
* ID.
*/
inline std::vector<Vector4>* vertices(size_t id) { return _vertices[id]; }
inline const std::vector<Vector4>* vertices(size_t id) const { return _vertices[id]; } /**< @copydoc vertices() */
inline const std::vector<Vector4>* vertices(size_t id) const { return _vertices[id]; } /**< @overload */
/** @brief Count of normal arrays */
inline size_t normalArrayCount() const { return _normals.size(); };
@ -84,7 +84,7 @@ class MAGNUM_EXPORT MeshData {
* ID.
*/
inline std::vector<Vector3>* normals(size_t id) { return _normals[id]; }
inline const std::vector<Vector3>* normals(size_t id) const { return _normals[id]; } /**< @copydoc normals() */
inline const std::vector<Vector3>* normals(size_t id) const { return _normals[id]; } /**< @overload */
/** @brief Count of 2D texture coordinate arrays */
inline size_t textureCoords2DArrayCount() const { return _textureCoords2D.size(); };
@ -96,7 +96,7 @@ class MAGNUM_EXPORT MeshData {
* coordinates array with given ID.
*/
inline std::vector<Vector2>* textureCoords2D(size_t id) { return _textureCoords2D[id]; }
inline const std::vector<Vector2>* textureCoords2D(size_t id) const { return _textureCoords2D[id]; } /**< @copydoc textureCoords2D() */
inline const std::vector<Vector2>* textureCoords2D(size_t id) const { return _textureCoords2D[id]; } /**< @overload */
private:
Mesh::Primitive _primitive;

Loading…
Cancel
Save