mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
refs #356 Removed CValueObject and expanded CValueObjectStdTuple to compensate.
* Involves rearranging some header includes to break cyclic include dependencies, * Adding a new, simple base class CEmpty, * Removing any remaining polymorphic uses of CValueObject with templates, * Adding a new trait for use with enable_if to restrict templates to work only with value objects, * Replacing the polymorphic/runtime multimethod-based compare functions with static/compile-time compare functions.
This commit is contained in:
@@ -111,19 +111,23 @@ namespace BlackMisc
|
||||
|
||||
//! Operator == with CValueObject
|
||||
//! \todo Still needed?
|
||||
friend bool operator ==(const CPropertyIndexVariantMap &valueMap, const CValueObject &valueObject);
|
||||
template <class T, class = typename std::enable_if<IsValueObject<T>::value>::type>
|
||||
friend bool operator ==(const CPropertyIndexVariantMap &valueMap, const T &valueObject) { return valueMap == CVariant::from(valueObject); }
|
||||
|
||||
//! Operator != with CValueObject
|
||||
//! \todo Still needed?
|
||||
friend bool operator !=(const CPropertyIndexVariantMap &valueMap, const CValueObject &valueObject);
|
||||
template <class T, class = typename std::enable_if<IsValueObject<T>::value>::type>
|
||||
friend bool operator !=(const CPropertyIndexVariantMap &valueMap, const T &valueObject) { return valueMap != CVariant::from(valueObject); }
|
||||
|
||||
//! Operator == with CValueObject
|
||||
//! \todo Still needed?
|
||||
friend bool operator ==(const CValueObject &valueObject, const CPropertyIndexVariantMap &valueMap);
|
||||
template <class T, class = typename std::enable_if<IsValueObject<T>::value>::type>
|
||||
friend bool operator ==(const T &valueObject, const CPropertyIndexVariantMap &valueMap) { return valueMap == CVariant::from(valueObject); }
|
||||
|
||||
//! Operator != with CValueObject
|
||||
//! \todo Still needed?
|
||||
friend bool operator !=(const CValueObject &valueObject, const CPropertyIndexVariantMap &valueMap);
|
||||
template <class T, class = typename std::enable_if<IsValueObject<T>::value>::type>
|
||||
friend bool operator !=(const T &valueObject, const CPropertyIndexVariantMap &valueMap) { return valueMap != CVariant::from(valueObject); }
|
||||
|
||||
//! Map
|
||||
const QMap<CPropertyIndex, CVariant> &map() const { return this->m_values; }
|
||||
|
||||
Reference in New Issue
Block a user