update// implemented dump method to each datastoretype

This commit is contained in:
Strider
2020-05-17 14:12:27 +02:00
parent 4f584ac86e
commit d4bf7a83c8
14 changed files with 183 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
#ifndef CONTACTDATASTORE_H
#define CONTACTDATASTORE_H
#include "../Model/ContactItem.h"
#include <string>
using json = nlohmann::json;
class ContactDataStore
{
private:
static bool instanced;
static ContactDataStore* instance;
std::map<QString, ContactItem> data;
ContactDataStore()
{
}
public:
static ContactDataStore* getInstance();
void clear();
void setData(QString key, ContactItem value);
ContactItem getData(QString key);
QString dump();
~ContactDataStore()
{
ContactDataStore::instanced = false;
ContactDataStore::instance = nullptr;
}
};
#endif