166 lines
5.7 KiB
C++
166 lines
5.7 KiB
C++
// DbLowVoltSys.h: interface for the TDbLowVoltSys class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_DBLOWVOLTSYS_H__F4BC9645_AAB2_45DE_A0F6_0E30EB5E6C38__INCLUDED_)
|
|
#define AFX_DBLOWVOLTSYS_H__F4BC9645_AAB2_45DE_A0F6_0E30EB5E6C38__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
/*============================================================================*
|
|
* Copyright(c), 1994-2007, Beijing Tangent Engineering Software Co.Ltd.
|
|
* 作 者: 沈睿
|
|
* 创建时间: 大约在冬季
|
|
* 描 述: 低压单线系统图
|
|
* 归属项目: 电气
|
|
* 历史记录: 2008-6-26 补头文件注释
|
|
=============================================================================*/
|
|
|
|
|
|
#include <dbgridsheet.h>
|
|
|
|
class PS_EXP TDrawerData //抽屉
|
|
{
|
|
public:
|
|
TDrawerData(){m_ID=NULL;};
|
|
TDrawerData(const TDrawerData &src);
|
|
TDrawerData & operator = (const TDrawerData &src);
|
|
CString m_csLoopName; //回路编号
|
|
CString m_csPurpose ; //回路用途
|
|
double m_nLength; //图块长度
|
|
AcDbHardPointerId m_ID; //图块ID
|
|
public:
|
|
Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
};
|
|
|
|
class PS_EXP TCabinetData //电气柜
|
|
{
|
|
public:
|
|
TCabinetData(){};
|
|
TCabinetData(const TCabinetData &src);
|
|
TCabinetData & operator = (const TCabinetData &src);
|
|
CString m_csName; //编号
|
|
CString m_csSpec; //外形尺寸
|
|
Adesk::UInt8 m_iType; // 1: inLine 2:Compensate 3:BusConnect 4:outLine 5:RinLine 6:RBusConnect
|
|
DList<TDrawerData> m_lstDrawer;
|
|
public:
|
|
Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
};
|
|
|
|
class PS_EXP TDbLowVoltSys : public TDbSheet
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbLowVoltSys);
|
|
private:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
public:
|
|
TDbLowVoltSys();
|
|
virtual ~TDbLowVoltSys();
|
|
protected:
|
|
DList<TCabinetData> m_lstCabinet; //数据
|
|
double m_dBusWidth; //母线宽度
|
|
BOOL m_bIsBusNull; //空心母线
|
|
BOOL m_bNeedCalc; //自动计算
|
|
BOOL m_bIsVerOutLine;//竖向出线
|
|
AcDbHardPointerId m_idBusLayer; //母线层
|
|
double m_dCalcFactor; //同时系数
|
|
double m_dSpare; //保留
|
|
XString m_sSpare; //备用
|
|
public:
|
|
void SetBusWidth(double dBusWidth) {
|
|
assertWriteEnabled();
|
|
m_dBusWidth=dBusWidth;
|
|
}
|
|
double GetBusWidth() const {
|
|
return m_dBusWidth;
|
|
}
|
|
void SetSpare(double dSpare) {
|
|
assertWriteEnabled();
|
|
m_dSpare=dSpare;
|
|
}
|
|
double GetSpare() const {
|
|
return m_dSpare;
|
|
}
|
|
void SetCalcFactor(double dCalcFactor) {
|
|
assertWriteEnabled();
|
|
m_dCalcFactor=dCalcFactor;
|
|
}
|
|
double GetCalcFactor() const {
|
|
return m_dCalcFactor;
|
|
}
|
|
void SetBusLayer(const AcDbObjectId& id) {
|
|
assertWriteEnabled();
|
|
m_idBusLayer=id;
|
|
}
|
|
AcDbObjectId GetBusLayer() const {
|
|
return m_idBusLayer;
|
|
}
|
|
void SetBusNull(BOOL bFalg) {
|
|
assertWriteEnabled();
|
|
m_bIsBusNull = bFalg;
|
|
}
|
|
BOOL IsBusNull() const {
|
|
return m_bIsBusNull;
|
|
}
|
|
void SetNeedCalc(BOOL bFalg) {
|
|
assertWriteEnabled();
|
|
m_bNeedCalc = bFalg;
|
|
}
|
|
BOOL IsNeedCalc() const {
|
|
return m_bNeedCalc;
|
|
}
|
|
void SetOutLineType(BOOL bFalg) {
|
|
assertWriteEnabled();
|
|
m_bIsVerOutLine = bFalg;
|
|
}
|
|
BOOL IsVerOutLine() const {
|
|
return m_bIsVerOutLine;
|
|
}
|
|
const TCHAR* GetSpareStr() const {
|
|
return (const TCHAR*)m_sSpare;
|
|
}
|
|
void SetSpareStr(const TCHAR* sText) {
|
|
assertWriteEnabled();
|
|
m_sSpare = sText;
|
|
}
|
|
|
|
void GetDatas(DList<TCabinetData>& lstCabinet) const;
|
|
void SetDatas(DList<TCabinetData>& lstCabinet);
|
|
void SetSheetHead(XStringList &lstHead);
|
|
void RemoveDrawer(int iCol);
|
|
void InsertDrawer(int iCol, AcDbObjectId idBlk, int iType, BOOL bNewCabinet);
|
|
void ModifyDrawer(int iCol, AcDbObjectId idBlk);
|
|
|
|
public: // Override TDbEntity
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrc, unsigned gMatchFlag);
|
|
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual int GetFirstVersion()const{return 7;}
|
|
virtual TSubText* GetSubText(long i)const;
|
|
public: // Override AcDbEntity
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints, AcDbIntArray& osnapModes, AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices, const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler*) const;
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler*);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
virtual Acad::ErrorStatus subClose();
|
|
private:
|
|
XPoint GetCellLeftUpPoint(int nRow, int nCol) const;
|
|
XPoint GetDrawerCellSize(int nRow, int nCol) const;
|
|
void Reset();
|
|
void Calc();
|
|
int GetDrawerNum();
|
|
void DrawPLine(XPoint ptStart, XPoint ptEnd, XExplodeDraw &dc) const;
|
|
|
|
};
|
|
|
|
#endif // !defined(AFX_DBLOWVOLTSYS_H__F4BC9645_AAB2_45DE_A0F6_0E30EB5E6C38__INCLUDED_)
|