206 lines
4.0 KiB
C++
206 lines
4.0 KiB
C++
#include "..\stdAfx.h"
|
|
#include "DuctAttri.h"
|
|
|
|
CDuctAttriKey::CDuctAttriKey()
|
|
{
|
|
m_csPipeSystem = _T("");
|
|
m_csSystem = _T("");
|
|
}
|
|
|
|
CDuctAttriKey::CDuctAttriKey(const CString& csPipeSystem, const CString& csSystem)
|
|
{
|
|
m_csPipeSystem = csPipeSystem;
|
|
m_csSystem = csSystem;
|
|
}
|
|
|
|
CDuctAttriKey::CDuctAttriKey(const CDuctAttriKey& tSrc)
|
|
{
|
|
m_csPipeSystem = tSrc.m_csPipeSystem;
|
|
m_csSystem = tSrc.m_csSystem;
|
|
}
|
|
|
|
CDuctAttriKey::~CDuctAttriKey()
|
|
{
|
|
m_csPipeSystem.Empty();
|
|
m_csSystem.Empty();
|
|
}
|
|
|
|
bool CDuctAttriKey::SetSystem(const CString& csSystem)
|
|
{
|
|
m_csSystem = csSystem;
|
|
return true;
|
|
}
|
|
|
|
bool CDuctAttriKey::SetPipeSystem(const CString& csPipeSystem)
|
|
{
|
|
m_csPipeSystem = csPipeSystem;
|
|
return true;
|
|
}
|
|
|
|
CString CDuctAttriKey::GetSystem() const
|
|
{
|
|
return m_csSystem;
|
|
}
|
|
|
|
CString CDuctAttriKey::GetPipeSystem() const
|
|
{
|
|
return m_csPipeSystem;
|
|
}
|
|
|
|
CDuctAttriValue::CDuctAttriValue()
|
|
{
|
|
m_csLayerName = _T("");
|
|
m_csLayerNameNew = _T("");
|
|
m_iColorIndex = 256;
|
|
m_dLineWidth = 0.0;
|
|
m_csLineType = _T("");
|
|
m_csMat = _T("");
|
|
m_csDimKey = _T("");
|
|
m_eFlag = CDuctAttriValue::eNoChg;
|
|
}
|
|
|
|
CDuctAttriValue::CDuctAttriValue(EFlag eFlag,
|
|
const CString& csLayerName,
|
|
int iColorIndex,
|
|
double dLineWidth,
|
|
const CString& csLineType,
|
|
const CString& csMat,
|
|
const CString& csDimKey)
|
|
{
|
|
m_csLayerName = csLayerName;
|
|
m_csLayerNameNew = _T("");
|
|
m_iColorIndex = iColorIndex;
|
|
m_dLineWidth = dLineWidth;
|
|
m_csLineType = csLineType;
|
|
m_csMat = csMat;
|
|
m_eFlag = eFlag;
|
|
m_csDimKey = csDimKey;
|
|
}
|
|
|
|
CDuctAttriValue::CDuctAttriValue(const CDuctAttriValue& tSrc)
|
|
{
|
|
m_csLayerName = tSrc.m_csLayerName;
|
|
m_csLayerNameNew = tSrc.m_csLayerNameNew;
|
|
m_iColorIndex = tSrc.m_iColorIndex;
|
|
m_dLineWidth = tSrc.m_dLineWidth;
|
|
m_csLineType = tSrc.m_csLineType;
|
|
m_csMat = tSrc.m_csMat;
|
|
m_eFlag = tSrc.m_eFlag;
|
|
m_csDimKey = tSrc.m_csDimKey;
|
|
}
|
|
|
|
CDuctAttriValue::~CDuctAttriValue()
|
|
{
|
|
m_csLayerName.Empty();
|
|
m_csLineType.Empty();
|
|
m_csMat.Empty();
|
|
m_csLayerNameNew.Empty();
|
|
}
|
|
|
|
CDuctAttriValue::EFlag CDuctAttriValue::GetFlag() const
|
|
{
|
|
return m_eFlag;
|
|
}
|
|
|
|
CString CDuctAttriValue::GetLayerName() const
|
|
{
|
|
return m_csLayerName;
|
|
}
|
|
|
|
CString CDuctAttriValue::GetLayerNameNew() const
|
|
{
|
|
return m_csLayerNameNew;
|
|
}
|
|
|
|
int CDuctAttriValue::GetColorIndex() const
|
|
{
|
|
return m_iColorIndex;
|
|
}
|
|
|
|
double CDuctAttriValue::GetLineWidth() const
|
|
{
|
|
return m_dLineWidth;
|
|
}
|
|
|
|
CString CDuctAttriValue::GetLineType() const
|
|
{
|
|
return m_csLineType;
|
|
}
|
|
|
|
CString CDuctAttriValue::GetLineTypeNew() const
|
|
{
|
|
return m_csLineTypeNew;
|
|
}
|
|
|
|
CString CDuctAttriValue::GetMat() const
|
|
{
|
|
return m_csMat;
|
|
}
|
|
|
|
CString CDuctAttriValue::GetDimKey() const
|
|
{
|
|
return m_csDimKey;
|
|
}
|
|
|
|
bool CDuctAttriValue::SetLayerName(const CString& csLayerName, EFlag eFlag /* = eNoChg */)
|
|
{
|
|
if (eFlag == eNoChg)
|
|
{
|
|
m_csLayerName = csLayerName;
|
|
}
|
|
else if (eFlag == eLayerNameChg)
|
|
{
|
|
m_csLayerNameNew = csLayerName;
|
|
}
|
|
m_eFlag = (EFlag)((unsigned short)eFlag | (unsigned short)m_eFlag);
|
|
|
|
return true;
|
|
}
|
|
|
|
bool CDuctAttriValue::SetColorIndex(const int& iColorIndex, EFlag eFlag /* = eNoChg */)
|
|
{
|
|
m_iColorIndex = iColorIndex;
|
|
m_eFlag = (EFlag)((unsigned short)eFlag | (unsigned short)m_eFlag);
|
|
|
|
return true;
|
|
}
|
|
|
|
bool CDuctAttriValue::SetLineWidth(const double& dLineWidth, EFlag eFlag /* = eNoChg */)
|
|
{
|
|
m_dLineWidth = dLineWidth;
|
|
m_eFlag = (EFlag)((unsigned short)eFlag | (unsigned short)m_eFlag);
|
|
|
|
return true;
|
|
}
|
|
|
|
bool CDuctAttriValue::SetLineType(const CString& csLineType, EFlag eFlag /* = eNoChg */)
|
|
{
|
|
if (eFlag == eNoChg)
|
|
{
|
|
m_csLineType = csLineType;
|
|
}
|
|
else if (eFlag == eLineTypeChg)
|
|
{
|
|
m_csLineTypeNew = csLineType;
|
|
}
|
|
|
|
m_eFlag = (EFlag)((unsigned short)eFlag | (unsigned short)m_eFlag);
|
|
|
|
return true;
|
|
}
|
|
|
|
bool CDuctAttriValue::SetMat(const CString& csMat, EFlag eFlag /* = eNoChg */)
|
|
{
|
|
m_csMat = csMat;
|
|
m_eFlag = (EFlag)((unsigned short)eFlag | (unsigned short)m_eFlag);
|
|
|
|
return true;
|
|
}
|
|
|
|
bool CDuctAttriValue::SetDimKey(const CString& csDimkey, EFlag eFlag /* = eNoChg */)
|
|
{
|
|
m_csDimKey = csDimkey;
|
|
m_eFlag = (EFlag)((unsigned short)eFlag | (unsigned short)m_eFlag);
|
|
|
|
return true;
|
|
} |