|
swift
|
Specialized value object compliant map for variants, based on indexes. More...
#include <propertyindexvariantmap.h>
Public Member Functions | |
| CPropertyIndexVariantMap (bool wildcard=false) | |
| Constructor. | |
| CPropertyIndexVariantMap (const CPropertyIndex &index, const CVariant &value) | |
| Single value constructor. | |
| void | addValue (const CPropertyIndex &index, const CVariant &value) |
| Add a value. | |
| void | addValue (const CPropertyIndex &index, const QVariant &value) |
| Add a value. | |
| void | addValue (const CPropertyIndex &index, const char *str) |
| Add QString as literal, disambiguate as I want to add QString. | |
| template<class T> | |
| void | addValue (const CPropertyIndex &index, const T &value) |
| Add a value as non CVariant. | |
| void | prependIndex (int index) |
| Prepend index to all property indexes. | |
| bool | isEmpty () const |
| Is empty? | |
| CVariant | value (const CPropertyIndex &index) const |
| Value. | |
| void | value (const CPropertyIndex &index, const CVariant &value) |
| Set value. | |
| CPropertyIndexList | indexes () const |
| Indexes. | |
| bool | contains (const CPropertyIndex &index) const |
| Contains index? | |
| QList< CVariant > | values () const |
| values | |
| bool | isWildcard () const |
| Wildcard, only relevant when used in search. | |
| void | setWildcard (bool wildcard) |
| Wildcard, only relevant when used in search. | |
| void | clear () |
| clear | |
| int | size () const |
| Number of elements. | |
| bool | matchesVariant (const CVariant &value) const |
| True if this map matches the value contained in the variant. | |
| template<typename T> requires (!std::is_same_v<T, CVariant>) | |
| bool | matches (const T &value) const |
| True if this map matches the value. | |
| const QMap< CPropertyIndex, CVariant > & | map () const |
| Map. | |
| size_t | getValueHash () const |
| Hash value. | |
| QString | convertToQString (bool i18n=false) const |
| Cast as QString. | |
| void | marshallToDbus (QDBusArgument &argument) const |
| Marshall without begin/endStructure, for when composed within another object. | |
| void | unmarshallFromDbus (const QDBusArgument &argument) |
| Unmarshall without begin/endStructure, for when composed within another object. | |
| void | marshalToDataStream (QDataStream &stream) const |
| Marshal a value to a QDataStream. | |
| void | unmarshalFromDataStream (QDataStream &stream) |
| Unmarshal a value from a QDataStream. | |
| Public Member Functions inherited from swift::misc::mixin::MetaType< CPropertyIndexVariantMap > | |
| int | getMetaTypeId () const |
| Returns the Qt meta type ID of this object. | |
| QString | getClassName () const |
| Class name. | |
| bool | isA (int metaTypeId) const |
| Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
| Public Member Functions inherited from swift::misc::mixin::String< CPropertyIndexVariantMap > | |
| QString | toQString (bool i18n=false) const |
| Cast as QString. | |
| std::string | toStdString (bool i18n=false) const |
| To std string. | |
| QString | stringForStreaming () const |
| String for streaming operators. | |
Protected Attributes | |
| QMap< CPropertyIndex, CVariant > | m_values |
| values | |
| bool | m_wildcard |
| wildcard | |
Friends | |
| SWIFT_MISC_EXPORT friend bool | operator== (const CPropertyIndexVariantMap &a, const CPropertyIndexVariantMap &b) |
| Equal operator, required if maps are directly compared, not with CValueObject. | |
| SWIFT_MISC_EXPORT friend bool | operator!= (const CPropertyIndexVariantMap &a, const CPropertyIndexVariantMap &b) |
| Equal operator, required if maps are directly compared, not with CValueObject. | |
| size_t | qHash (const CPropertyIndexVariantMap &vm) |
| qHash overload, needed for storing value in a QSet. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from swift::misc::mixin::MetaType< CPropertyIndexVariantMap > | |
| static void | registerMetadata () |
| Register metadata. | |
Specialized value object compliant map for variants, based on indexes.
Definition at line 34 of file propertyindexvariantmap.h.
| swift::misc::CPropertyIndexVariantMap::CPropertyIndexVariantMap | ( | bool | wildcard = false | ) |
Constructor.
| wildcard | when used in search, for setting values irrelevant |
|
inline |
Add a value.
Definition at line 52 of file propertyindexvariantmap.h.
|
inline |
Add a value as non CVariant.
Definition at line 59 of file propertyindexvariantmap.h.
|
inline |
clear
Definition at line 92 of file propertyindexvariantmap.h.
|
inline |
Contains index?
Definition at line 80 of file propertyindexvariantmap.h.
| QString swift::misc::CPropertyIndexVariantMap::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
|
inline |
Is empty?
Definition at line 68 of file propertyindexvariantmap.h.
|
inline |
Wildcard, only relevant when used in search.
Definition at line 86 of file propertyindexvariantmap.h.
|
inline |
Map.
Definition at line 114 of file propertyindexvariantmap.h.
| void swift::misc::CPropertyIndexVariantMap::marshallToDbus | ( | QDBusArgument & | argument | ) | const |
Marshall without begin/endStructure, for when composed within another object.
| void swift::misc::CPropertyIndexVariantMap::marshalToDataStream | ( | QDataStream & | stream | ) | const |
Marshal a value to a QDataStream.
|
inline |
True if this map matches the value.
Definition at line 108 of file propertyindexvariantmap.h.
|
inline |
Wildcard, only relevant when used in search.
Definition at line 89 of file propertyindexvariantmap.h.
| void swift::misc::CPropertyIndexVariantMap::unmarshalFromDataStream | ( | QDataStream & | stream | ) |
Unmarshal a value from a QDataStream.
| void swift::misc::CPropertyIndexVariantMap::unmarshallFromDbus | ( | const QDBusArgument & | argument | ) |
Unmarshall without begin/endStructure, for when composed within another object.
|
inline |
Value.
Definition at line 71 of file propertyindexvariantmap.h.
|
inline |
Set value.
Definition at line 74 of file propertyindexvariantmap.h.
values
Definition at line 83 of file propertyindexvariantmap.h.
|
friend |
qHash overload, needed for storing value in a QSet.
Definition at line 120 of file propertyindexvariantmap.h.
|
protected |
values
Definition at line 126 of file propertyindexvariantmap.h.
|
protected |
wildcard
Definition at line 127 of file propertyindexvariantmap.h.