refs #345 Style and doxygen.

This commit is contained in:
Mathew Sutcliffe
2014-10-28 19:46:52 +00:00
parent 8f5315b846
commit 798b198d4e
78 changed files with 268 additions and 531 deletions

View File

@@ -6,6 +6,8 @@
#ifndef BLACKMISC_MATHMATRIXBASE_H
#define BLACKMISC_MATHMATRIXBASE_H
//! \file
#include "blackmisc/valueobject.h"
#include "blackmisc/mathvector3dbase.h"
#include "blackmisc/blackmiscfreefunctions.h"
@@ -21,25 +23,6 @@ namespace BlackMisc
*/
template<class ImplMatrix, int Rows, int Columns> class CMatrixBase : public BlackMisc::CValueObject
{
private:
/*!
* \brief Easy access to derived class (CRTP template parameter)
* \return
*/
ImplMatrix const *derived() const
{
return static_cast<ImplMatrix const *>(this);
}
/*!
* \brief Easy access to derived class (CRTP template parameter)
* \return
*/
ImplMatrix *derived()
{
return static_cast<ImplMatrix *>(this);
}
protected:
// no bug, Qt expects columns rows
QGenericMatrix<Columns, Rows, double> m_matrix; //!< backing data
@@ -64,20 +47,14 @@ namespace BlackMisc
public:
//! \brief Default constructor
CMatrixBase() : m_matrix() {}
CMatrixBase() = default;
/*!
* \brief Fill with value
* \param fillValue
*/
explicit CMatrixBase(double fillValue) : m_matrix()
//! \brief Fill with value
explicit CMatrixBase(double fillValue)
{
this->fill(fillValue);
}
//! \brief Virtual destructor
virtual ~CMatrixBase() {}
//! \brief List of values
QList<double> toList() const;
@@ -252,6 +229,18 @@ namespace BlackMisc
virtual void convertFromJson(const QJsonObject &json) override;
private:
//! \brief Easy access to derived class (CRTP template parameter)
ImplMatrix const *derived() const
{
return static_cast<ImplMatrix const *>(this);
}
//! \brief Easy access to derived class (CRTP template parameter)
ImplMatrix *derived()
{
return static_cast<ImplMatrix *>(this);
}
//! \brief Check range of row / column
void checkRange(int row, int column) const;
};