The SerializableKeyValueMap class provides an easy way to serialize and deserialize ordered key value pairs.
More...
#include <serializablekeyvaluemap.h>
|
QMap< QString, typename T::ValueType > | mValues |
|
template<typename T>
class librepcb::SerializableKeyValueMap< T >
The SerializableKeyValueMap class provides an easy way to serialize and deserialize ordered key value pairs.
- Note
- This map guarantees to always contain a valid default value. A default value has an empty string as key and will be used as fallback for value().
- Warning
- When modifying this class, make sure that it still guarantees to always contain a valid default value! So, don't add a default constructor, a
clear()
method or similar!
◆ OnEditedSlot
◆ Event
Enumerator |
---|
ElementAdded | |
ElementRemoved | |
ElementValueChanged | |
◆ SerializableKeyValueMap() [1/4]
◆ SerializableKeyValueMap() [2/4]
◆ SerializableKeyValueMap() [3/4]
◆ SerializableKeyValueMap() [4/4]
◆ ~SerializableKeyValueMap()
◆ keys()
template<typename T >
QStringList keys |
( |
| ) |
const |
|
inlinenoexcept |
◆ getDefaultValue()
template<typename T >
const T::ValueType & getDefaultValue |
( |
| ) |
const |
|
inlinenoexcept |
◆ contains()
template<typename T >
bool contains |
( |
const QString & |
key | ) |
const |
|
inlinenoexcept |
◆ tryGet()
template<typename T >
std::optional< typename T::ValueType > tryGet |
( |
const QString & |
key | ) |
const |
|
inlinenoexcept |
◆ value()
template<typename T >
const T::ValueType & value |
( |
const QStringList & |
keyOrder, |
|
|
QString * |
usedKey = nullptr |
|
) |
| const |
|
inlinenoexcept |
◆ setDefaultValue()
template<typename T >
void setDefaultValue |
( |
const typename T::ValueType & |
value | ) |
|
|
inlinenoexcept |
◆ insert()
template<typename T >
void insert |
( |
const QString & |
key, |
|
|
const typename T::ValueType & |
value |
|
) |
| |
|
inlinenoexcept |
◆ serialize()
◆ operator=()
◆ operator==()
◆ operator!=()
◆ onEdited
◆ mValues
template<typename T >
QMap<QString, typename T::ValueType> mValues |
|
private |
The documentation for this class was generated from the following file: