LibrePCB Developers Documentation
|
The SerializableKeyValueMap class provides an easy way to serialize and deserialize ordered key value pairs. More...
#include <serializablekeyvaluemap.h>
Public Types | |
enum class | Event |
typedef Slot< SerializableKeyValueMap< T >, const QString &, Event > | OnEditedSlot |
Public Member Functions | |
SerializableKeyValueMap ()=delete | |
SerializableKeyValueMap (const SerializableKeyValueMap< T > &other) noexcept | |
SerializableKeyValueMap (const typename T::ValueType &defaultValue) noexcept | |
SerializableKeyValueMap (const SExpression &node) | |
~SerializableKeyValueMap () noexcept | |
QStringList | keys () const noexcept |
const T::ValueType & | getDefaultValue () const noexcept |
bool | contains (const QString &key) const noexcept |
tl::optional< typename T::ValueType > | tryGet (const QString &key) const noexcept |
const T::ValueType & | value (const QStringList &keyOrder, QString *usedKey=nullptr) const noexcept |
void | setDefaultValue (const typename T::ValueType &value) noexcept |
void | insert (const QString &key, const typename T::ValueType &value) noexcept |
void | serialize (SExpression &root) const |
Serialize into librepcb::SExpression node. More... | |
SerializableKeyValueMap< T > & | operator= (const SerializableKeyValueMap< T > &rhs) noexcept |
bool | operator== (const SerializableKeyValueMap< T > &rhs) const noexcept |
bool | operator!= (const SerializableKeyValueMap< T > &rhs) const noexcept |
Public Attributes | |
Signal< SerializableKeyValueMap< T >, const QString &, Event > | onEdited |
Private Attributes | |
QMap< QString, typename T::ValueType > | mValues |
The SerializableKeyValueMap class provides an easy way to serialize and deserialize ordered key value pairs.
clear()
method or similar! typedef Slot<SerializableKeyValueMap<T>, const QString&, Event> OnEditedSlot |
|
strong |
|
delete |
|
inlinenoexcept |
|
inlineexplicitnoexcept |
|
inlineexplicit |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Serialize into librepcb::SExpression node.
root | Root node to serialize into. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Signal<SerializableKeyValueMap<T>, const QString&, Event> onEdited |
|
private |