Newer
Older
PhaseMeasure / common / ConstCache.h
[wangxitong] on 22 Dec 2021 538 bytes first commit
#ifndef CONSTCACHE_H
#define CONSTCACHE_H

#include <QObject>
#include <QMap>
#include <QList>
#include <QJsonObject>

class ConstCache : public QObject
{
    Q_OBJECT
public:
    ~ConstCache() {};
    ConstCache(const ConstCache&)=delete;
    ConstCache& operator=(const ConstCache&)=delete;

    static ConstCache& getInstance() {
        static ConstCache instance;
        return instance;
    }

    QMap<QString, QString> deviceTypes;
    QList<QJsonObject> deviceList;

private:
    ConstCache() {};

};

#endif // CONSTCACHE_H