forked from aya/aya
31 lines
607 B
C++
31 lines
607 B
C++
/**
|
|
* SimulationManager.h
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QMap>
|
|
|
|
class QVariant;
|
|
|
|
class NameValueStoreManager
|
|
{
|
|
public:
|
|
typedef QMap<QString, QVariant> Properties;
|
|
typedef QMap<QString, Properties> Stores;
|
|
|
|
static NameValueStoreManager& singleton()
|
|
{
|
|
static NameValueStoreManager manager;
|
|
return manager;
|
|
}
|
|
|
|
void setValue(const QString& storeID, const QString& key, const QVariant& value);
|
|
QVariant getValue(const QString& storeID, const QString& key, bool* isOK = NULL);
|
|
|
|
bool clear(const QString& storeID);
|
|
void clearAll();
|
|
|
|
private:
|
|
Stores store;
|
|
}; |