elementserial.cpp

来自「此程序实现了类似protel电路画图程序。」· C++ 代码 · 共 72 行

CPP
72
字号
// ElementSerial.cpp: implementation of the CElementSerial class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Pointtest.h"
#include "ElementSerial.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CElementSerial::CElementSerial()
{

}

CElementSerial::~CElementSerial()
{

}
BOOL CElementSerial::IfCellClosed()
{
	CBase* aa;
	POSITION Pos = GetHeadPosition();
	while(Pos!=NULL){
		aa = (CBase*)GetNext(Pos);
		if(aa->Node1 == aa->Node2)
			return TRUE;
	}
	return FALSE;
}
BOOL CElementSerial::IfAllPortHaveLine()
{
	CBase* aa;
	POSITION Pos = GetHeadPosition();
	while(Pos!=NULL){
		aa = (CBase*)GetNext(Pos);
		if(aa->Node1 == ID_NONODE)
			return FALSE;
		if(aa->Node2 == ID_NONODE)
			return FALSE;
	}
	return TRUE;
}
/*BOOL CElementSerial::IfAmperemeterParallel()//判断是否有电流表并联
{
	CBase* aa;
	POSITION Pos = GetHeadPosition();
	while(Pos!=NULL){
		if(aa->GetType() == ID_CURRENT_METER){

		}
	}
		aa = (CBase*)GetNext(Pos);
		if(aa->Node1 == ID_NONODE)
			return FALSE;
		if(aa->Node2 == ID_NONODE)
			return FALSE;
	}
	return TRUE;
}
BOOL CElementSerial::IfVoltmeterSeries()//判断是否有电压表串联
{

}*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?