mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #684 Added parametrised cache value key strings.
This commit is contained in:
committed by
Roland Winklmeier
parent
aeb15ea7be
commit
898b8e4078
@@ -433,6 +433,27 @@ namespace BlackMisc
|
||||
Private::CValuePage::Element &m_element; //!< \private
|
||||
};
|
||||
|
||||
/*!
|
||||
* Helper class for generating cache key variations from a key template.
|
||||
*/
|
||||
class BLACKMISC_EXPORT CValueCacheCategory : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor.
|
||||
CValueCacheCategory(QObject *parent, const QString &category) : QObject(parent), m_category(category)
|
||||
{
|
||||
Q_ASSERT_X(parent->findChildren<CValueCacheCategory *>().size() == 1, Q_FUNC_INFO, "Only one CValueCacheCategory per object allowed");
|
||||
}
|
||||
|
||||
//! Get category string.
|
||||
const QString &getCategory() const { return m_category; }
|
||||
|
||||
private:
|
||||
const QString m_category;
|
||||
};
|
||||
|
||||
/*!
|
||||
* RAII object returned by CValueCache::batchChanges. Applies deferred changes when it is destroyed.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user