| | |
| | | m_pPath = nullptr; |
| | | m_type = MaterialsType::G1; |
| | | m_pBuddy = nullptr; |
| | | m_nOriginPort = 0; |
| | | m_nOriginSlot = 0; |
| | | } |
| | | |
| | | CGlass::~CGlass() |
| | |
| | | return m_strID; |
| | | } |
| | | |
| | | void CGlass::setOriginPort(int port, int slot) |
| | | { |
| | | m_nOriginPort = port; |
| | | m_nOriginSlot = slot; |
| | | } |
| | | |
| | | void CGlass::getOrginPort(int& port, int& slot) |
| | | { |
| | | port = m_nOriginPort; |
| | | slot = m_nOriginSlot; |
| | | } |
| | | |
| | | CPath* CGlass::getPath() |
| | | { |
| | | return m_pPath; |
| | |
| | | Lock(); |
| | | ar << (int)m_type; |
| | | WriteString(ar, m_strID); |
| | | ar << m_nOriginPort; |
| | | ar << m_nOriginSlot; |
| | | ar << (ULONGLONG)m_pPath; |
| | | if (m_pPath != nullptr) { |
| | | m_pPath->serialize(ar); |
| | |
| | | ar >> type; |
| | | m_type = (MaterialsType)type; |
| | | ReadString(ar, m_strID); |
| | | ar >> m_nOriginPort; |
| | | ar >> m_nOriginSlot; |
| | | ar >> ullPath; |
| | | if (ullPath != 0) { |
| | | m_pPath = new CPath(); |
| | |
| | | void CGlass::setJobDataS(CJobDataS* pJobDataS) |
| | | { |
| | | m_jobDataS.copy(pJobDataS); |
| | | } |
| | | |
| | | void CGlass::updateJobDataS(CJobDataS* pJobDataS) |
| | | { |
| | | m_jobDataS.update(pJobDataS); |
| | | } |
| | | |
| | | CJobDataS* CGlass::getJobDataS() |
| | |
| | | return m_strBuddyId; |
| | | } |
| | | |
| | | void CGlass::processEnd(unsigned int nEqId, unsigned int nUnit) |
| | | int CGlass::processEnd(unsigned int nEqId, unsigned int nUnit) |
| | | { |
| | | CPath* pPath = getPathWithEq(nEqId, nUnit); |
| | | if (pPath != nullptr) { |
| | | pPath->processEnd(); |
| | | } |
| | | if (pPath == nullptr) return -1; |
| | | |
| | | pPath->processEnd(); |
| | | return 0; |
| | | } |
| | | |
| | | BOOL CGlass::isProcessed(unsigned int nEqId, unsigned int nUnit) |
| | |
| | | |
| | | return pPath->isProcessEnd(); |
| | | } |
| | | |
| | | int CGlass::setInspResult(unsigned int nEqId, unsigned int nUnit, InspResult result) |
| | | { |
| | | CPath* pPath = getPathWithEq(nEqId, nUnit); |
| | | if (pPath == nullptr) return -1; |
| | | |
| | | pPath->setInspResult(result); |
| | | return 0; |
| | | } |
| | | |
| | | InspResult CGlass::getInspResult(unsigned int nEqId, unsigned int nUnit) |
| | | { |
| | | CPath* pPath = getPathWithEq(nEqId, nUnit); |
| | | if (pPath == nullptr) return InspResult::NotInspected; |
| | | |
| | | return pPath->getInspResult(); |
| | | } |
| | | } |