mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #403 Add Policy::MetaType::None for base class templates
This commit is contained in:
@@ -14,6 +14,15 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
namespace Aviation { class CAvionicsBase; }
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<Aviation::CAvionicsBase> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::None;
|
||||
};
|
||||
|
||||
namespace Aviation
|
||||
{
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace BlackMisc
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<Aviation::CComSystem> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::Default;
|
||||
using LessThan = Policy::LessThan::None;
|
||||
using Compare = Policy::Compare::None;
|
||||
using Hash = Policy::Hash::Own;
|
||||
|
||||
@@ -16,6 +16,15 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
namespace Aviation { class CTransponder; }
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<Aviation::CTransponder> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::Default;
|
||||
};
|
||||
|
||||
namespace Aviation
|
||||
{
|
||||
//! Transponder
|
||||
|
||||
@@ -49,7 +49,9 @@ namespace BlackMisc
|
||||
//! \private
|
||||
template <template <class> class C, class T, class CIt>
|
||||
struct CValueObjectPolicy<CContainerBase<C, T, CIt>> : public CValueObjectLegacy
|
||||
{};
|
||||
{
|
||||
using MetaType = Policy::MetaType::None;
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Base class for CCollection and CSequence adding mutating operations and CValueObject facility on top of CRangeBase.
|
||||
|
||||
@@ -16,6 +16,14 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Geo { template <class> class CEarthAngle; }
|
||||
|
||||
//! \private
|
||||
template <class LATorLON> struct CValueObjectPolicy<Geo::CEarthAngle<LATorLON>> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::None;
|
||||
};
|
||||
|
||||
namespace Geo
|
||||
{
|
||||
/*!
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<Geo::CLatitude> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::Default;
|
||||
};
|
||||
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<Geo::CLongitude> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::Default;
|
||||
};
|
||||
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CAcceleration> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CAngle> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
//! Physical unit angle (radians, degrees)
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CFrequency> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
/*!
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CLength> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CMass> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace BlackMisc
|
||||
//! \private
|
||||
template <class MU, class PQ> struct CValueObjectPolicy<PhysicalQuantities::CPhysicalQuantity<MU, PQ>> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
using MetaType = Policy::MetaType::None;
|
||||
using Equals = Policy::Equals::None;
|
||||
using LessThan = Policy::LessThan::None;
|
||||
using Compare = Policy::Compare::None;
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CPressure> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CSpeed> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CTemperature> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! \private
|
||||
template <> struct CValueObjectPolicy<PhysicalQuantities::CTime> : public CValueObjectPolicy<>
|
||||
{
|
||||
using MetaType = Policy::MetaType::DefaultAndQList;
|
||||
};
|
||||
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
|
||||
@@ -80,6 +80,14 @@ namespace BlackMisc
|
||||
template <class T, class...>
|
||||
static void registerImpl() { Default::registerImpl<T>(); Default::registerImpl<QList<T>>(); }
|
||||
};
|
||||
|
||||
//! CValueObject policy for a class which should not register itself as meta type
|
||||
struct None
|
||||
{
|
||||
//! Register with QMetaType
|
||||
template <class T, class...>
|
||||
static void registerImpl() { }
|
||||
};
|
||||
}
|
||||
|
||||
namespace Equals
|
||||
|
||||
Reference in New Issue
Block a user