1#ifndef COCKATRICE_LAZY_PROPERTIES_HASH_H
2#define COCKATRICE_LAZY_PROPERTIES_HASH_H
57 QString
value(
const QString &key)
const;
65 bool insert(
const QString &key,
const QString &
value);
LazyPropertiesHash()
Default constructor.
Definition lazy_properties_hash.cpp:5
bool isMaterialized
Whether propertiesCache is valid.
Definition lazy_properties_hash.h:22
const QHash< QString, QString > & getProperties() const
Gets a view of the materialized properties hash.
Definition lazy_properties_hash.cpp:91
LazyPropertiesHash & operator=(const LazyPropertiesHash &other)
Definition lazy_properties_hash.cpp:33
QByteArray blob
Serialized properties (load form).
Definition lazy_properties_hash.h:19
QString value(const QString &key) const
Gets the value from the materialized properties hash.
Definition lazy_properties_hash.cpp:73
QMutex propertiesMutex
Guards lazy materialization.
Definition lazy_properties_hash.h:21
void ensureMaterialized() const
Materializes properties from blob if not already done. Clears blob afterward. Safe to call from const...
Definition lazy_properties_hash.cpp:54
QHash< QString, QString > properties
Materialized properties (query form).
Definition lazy_properties_hash.h:20
bool insert(const QString &key, const QString &value)
Inserts a value into the materialized properties hash.
Definition lazy_properties_hash.cpp:79