package com.hh.lib_qr;


import com.hh.ib_base_qr.BaseQRScan;
import com.hh.lib_dx_multi_qr.DxMultiQRScan;
import com.hh.lib_dx_qr.DxGeneralQRScan;

/**
 * @Description:二维码工厂类
 * @author: Xia WeiHao
 * @date: 2024/7/1
 */
public class QRScanFactory {


    public static BaseQRScan createQRScan(int  qrReaderBrand) {
        QRScanType type = QRScanType.fromValue(qrReaderBrand);
        switch (type) {
            case DEFAULT:
                return DxGeneralQRScan.getInstance();

            case DX:
                return DxMultiQRScan.getInstance();

            default:
                return null;
        }
    }

}
