Newer
Older
CasicBioRecNew / dao / util / CacheManager.h
Tan Yue on 2 Jun 2022 789 bytes 20220602 人脸识别优化整合
#ifndef CACHEMANAGER_H
#define CACHEMANAGER_H

#include <QMutex>
#include <QList>
#include "dao/SysDeptDao.h"
#include "dao/SysDictDao.h"
#include "dao/SysPersonDao.h"
#include "dao/FaceDataDao.h"
#include "dao/FaceDataImgDao.h"
#include "dao/IrisDataDao.h"
#include "dao/IrisDataImgDao.h"

class CacheManager
{
public:
    ~CacheManager() {};
    CacheManager(const CacheManager&)=delete;
    CacheManager& operator=(const CacheManager&)=delete;

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

    QList<QVariantMap> * getDeptCachePtr();
    QVariantMap getGenderName();

    void updateDeptCache();

private:
    CacheManager();

    QList<QVariantMap> * deptCache;
    QVariantMap genderName;
};

#endif // CACHEMANAGER_H