forked from aya/aya
Initial commit
This commit is contained in:
31
client/studio/src/NameValueStoreManager.hpp
Normal file
31
client/studio/src/NameValueStoreManager.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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;
|
||||
};
|
||||
Reference in New Issue
Block a user