Ref T725 Extend CLogMessage to allow ICoordinateGeodetic arguments,

using a system of traits to select the stringifier corresponding to the argument type.
This commit is contained in:
Mat Sutcliffe
2019-09-25 21:11:19 +01:00
committed by Klaus Basan
parent b569040492
commit 07e64099b1
4 changed files with 130 additions and 19 deletions

View File

@@ -20,6 +20,7 @@
#include "blackmisc/math/mathutils.h"
#include "blackmisc/metaclass.h"
#include "blackmisc/propertyindex.h"
#include "blackmisc/stringutils.h"
#include "blackmisc/valueobject.h"
#include "blackmisc/variant.h"
#include "blackmisc/blackmiscexport.h"
@@ -135,9 +136,6 @@ namespace BlackMisc
//! \copydoc Mixin::String::toQString
QString convertToQString(bool i18n = false) const;
//! \copydoc Mixin::String::toQString
// QString toQString(bool i18n = false) const { return this->convertToQString(i18n); }
//! Check values @{
bool isNaNVector() const;
bool isNaNVectorDouble() const;
@@ -353,6 +351,14 @@ namespace BlackMisc
);
};
} // namespace
//! \cond
template <>
struct TString<Geo::ICoordinateGeodetic>
{
static QString toQString(const Geo::ICoordinateGeodetic &coord) { return coord.convertToQString(); }
};
//! \endcond
} // namespace
Q_DECLARE_METATYPE(BlackMisc::Geo::CCoordinateGeodetic)