PreVerify/lib/PCBInspector/include/4_PCBResultCollector/PCBPanelResultQuerier/PCBPanelResultQuerier.h

41 lines
968 B
C
Raw Permalink Normal View History

2024-09-09 19:18:28 +08:00
#ifndef _PCB_PANEL_RESULT_QUERIER_H_
#define _PCB_PANEL_RESULT_QUERIER_H_
#pragma once
#include <memory>
#include <vector>
#include "../../1_PCBModules/PCBType/PCBDefectType.h"
#include "../../1_PCBModules/PCBType/PCBDefectSpecificType.h"
class PCBPanelResultQuerierImpl;
template class __declspec(dllexport) std::shared_ptr<PCBPanelResultQuerierImpl>; // 消除警告C2451
class __declspec(dllexport) PCBPanelResultQuerier {
public:
PCBPanelResultQuerier(const std::vector<cv::Mat>& results);
// 获取缺陷数量
size_t getDefectCount();
// 根据ID获取缺陷 id从1开始计数
const PCBDefectBase* getDefectBasicInfoById(int id);
// 获取所有缺陷
std::vector<const PCBDefectBase*> getAllDefectBasicInfos();
// 获取缺陷类型名称枚举
static DefectTypeName getDefectTypeName(const PCBDefectBase* defect);
private:
std::shared_ptr<PCBPanelResultQuerierImpl> querierImpl = nullptr;
};
#endif