| | |
| | | return m_issues; |
| | | } |
| | | |
| | | void CProcessJob::addIssue(uint32_t code, const std::string& msg) |
| | | { |
| | | m_issues.push_back({ code, msg }); |
| | | } |
| | | |
| | | bool CProcessJob::validate(const IResourceView& rv) |
| | | { |
| | | m_issues.clear(); |
| | |
| | | auto add = [&](uint32_t code, std::string msg) { |
| | | m_issues.push_back({ code, std::move(msg) }); |
| | | }; |
| | | |
| | | if (!rv.isProcessJobsEmpty()) { |
| | | add(1000, "ProcessJobs Conflict!"); |
| | | } |
| | | |
| | | // —— 基本 / 标识 —— |
| | | if (m_pjId.empty()) add(1001, "PJID empty"); |
| | |
| | | return false; |
| | | } |
| | | |
| | | bool CProcessJob::setCarrierContexts(std::string carrierId, std::vector<void*> contexts) |
| | | { |
| | | for (auto& c : m_carriers) { |
| | | if (c.carrierId.compare(carrierId) == 0) { |
| | | c.contexts = std::move(contexts); |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | // --------- 核心:serialize/deserialize --------- |
| | | void CProcessJob::serialize(std::ostream& os) const { |
| | | // ͷ |
| | |
| | | |
| | | return nullptr; |
| | | } |
| | | |
| | | void CProcessJob::setLotId(std::string strLotId) |
| | | { |
| | | m_strLotId = strLotId; |
| | | } |
| | | |
| | | std::string& CProcessJob::getLotId() |
| | | { |
| | | return m_strLotId; |
| | | } |
| | | |
| | | void CProcessJob::setProductId(std::string strProductId) |
| | | { |
| | | m_strProductId = strProductId; |
| | | } |
| | | |
| | | std::string& CProcessJob::getProductId() |
| | | { |
| | | return m_strProductId; |
| | | } |
| | | |
| | | void CProcessJob::setOperationId(std::string strOperationId) |
| | | { |
| | | m_strOperationId = strOperationId; |
| | | } |
| | | |
| | | std::string& CProcessJob::getOperationId() |
| | | { |
| | | return m_strOperationId; |
| | | } |
| | | |
| | | void CProcessJob::setPjWarp(PJWarp pjWarp) |
| | | { |
| | | m_pjWarp = pjWarp; |
| | | } |
| | | |
| | | PJWarp& CProcessJob::getPjWarp() |
| | | { |
| | | return m_pjWarp; |
| | | } |
| | | } |