Newer
Older
ZXSSCJ / PhaseCompAcq / common / ConstCache.h
#ifndef CONSTCACHE_H
#define CONSTCACHE_H

#include <QObject>
#include <QMap>
#include <QList>
#include <QJsonObject>
#include "PhaseDevice.h"

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;
    QMap<QString, PhaseDevice *> deviceMap; // key=deviceId
    QMap<QString, QString> channelMap; // key=channelId value=deviceId-no

private:
    ConstCache() {};

};

#endif // CONSTCACHE_H