4#ifndef SWIFT_MISC_TESTVALUEOBJECT_H
5#define SWIFT_MISC_TESTVALUEOBJECT_H
13#include <QDBusArgument>
117 bool operator<(
const CNotHashable &other)
const {
return n < other.n; }
118 QString toQString(
bool =
false)
const {
return {}; }
119 bool operator==(
const CNotHashable &other)
const {
return n == other.n; }
121 inline QJsonArray &
operator<<(QJsonArray &a,
const CNotHashable &) {
return a; }
122 inline const QJsonValueRef &operator>>(
const QJsonValueRef &v, CNotHashable &) {
return v; }
123 inline QDBusArgument &
operator<<(QDBusArgument &a,
const CNotHashable &) {
return a; }
124 inline const QDBusArgument &operator>>(
const QDBusArgument &a,
const CNotHashable &) {
return a; }
125 inline QDataStream &
operator<<(QDataStream &a,
const CNotHashable &) {
return a; }
126 inline QDataStream &operator>>(QDataStream &a,
const CNotHashable &) {
return a; }
135Q_DECLARE_METATYPE(swift::misc::CNotHashable)
145 swift::misc::CDictionary<swift::misc::CTestValueObject, swift::misc::CTestValueObject,
QHash>;
156 "Expected CValueObjectDictionary to use QHash");
158 "Expected CDictionary<CNotHashableDictionary, Value> to use QMap");
Generic ordered container with value semantics.
bool isMyself() const
Myself index, used with nesting.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
Generic sequential container with value semantics.
void setPropertyByIndex(const swift::misc::CPropertyIndex &index, const CVariant &variant)
Set property by index.
ColumnIndex
Properties by index.
const QString & getName() const
Get name.
QString convertToQString(bool i18n=false) const
Cast as QString.
void setDescription(const QString &description)
Set description.
CTestValueObject(const QString &name, const QString &description)
Constructor.
void setName(const QString &name)
Set name.
CTestValueObject()=default
Default constructor.
CVariant propertyByIndex(const swift::misc::CPropertyIndex &index) const
Property by index.
const QString & getDescription() const
Get description.
Mix of the most commonly used mixin classes.
Wrapper around QVariant which provides transparent access to CValueObject methods of the contained ob...
static CVariant fromValue(T &&value)
Construct a variant from a value.
T value() const
Return the value converted to the type T.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Free functions in swift::misc.
QDebug operator<<(QDebug d, const CRange< I > &range)
Streaming operators for CRange to qDebug.
QString & append(QChar ch)
swift::misc::CDictionary< swift::misc::CNotHashable, QString > CNotHashableDictionary
Test value object dictionary using ordered container with not hashable key.
swift::misc::CDictionary< swift::misc::CTestValueObject, swift::misc::CTestValueObject > CValueObjectDictionary
Test value object dictionary using ordered container.
swift::misc::CDictionary< swift::misc::CTestValueObject, swift::misc::CTestValueObject, QHash > CValueObjectHashDictionary
Test value object dictionary using unordered container.
swift::misc::CDictionary< swift::misc::CNotHashable, QString, QMap > CNotHashableMapDictionary
Test value object dictionary using unordered container with not hashable key.