#pragma once
#include "CommonObject.h"

class CGate : public CCommonObject
{
public:
	CGate(int nIn, int nOut, CPoint TopLeftOrigin, CString strName, CStringA strOrigin);
	CGate(int nIn, int nOut, CPoint TopLeftOrigin, CString strName, CStringA strOrigin, GraphicsPath *gp, CRect *rectIn, CRect *rectOut, bool *bInvIn, bool*bInvOut);
	~CGate();

	void OutScreen(Graphics &g);
	void OutXml(stringstream &ss);
	bool HitTest(CPoint point);
	CCommonObject* Clone(CPoint TopLeftOrigin, CString strNewName, int nRotation);
	CString GetObjectName(){return m_strUniqueName;}
	void SetConnection(bool bIn, int nPos, CCommonObject* pConnectTo);
	void DisconnectCObject(CCommonObject *pObject);
	void Disconnect();

private:
	void TransformCObject(Matrix* pMat);

public:

private:
};