MFC-Simulator/TestSimulator/BlockAnd.h
2023-02-03 10:07:52 +08:00

55 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
//Block衍生類別Block And
#include "BlockBasis.h"
class CBlockAnd : public CBlockBasis
{
private:
//Block rect(存在兩個輸入Pin一個輸出Pin)
CRect m_rcPinIn1;
CRect m_rcPinIn2;
CRect m_rcPinOut;
//連接指標(存在兩個連接指標)
CBlockBasis* m_pBlkHead1;
CBlockBasis* m_pBlkHead2;
//連接Block編號(存在兩個編號)
int m_iBlkHead1Num;
int m_iBlkHead2Num;
public:
//建構、解構子
CBlockAnd ();
virtual ~CBlockAnd ();
//取得、設定rect
virtual void SetBlkRect (CPoint, int, int);
virtual CRect GetPinIn1Rect () const;
virtual CRect GetPinIn2Rect () const;
virtual CRect GetPinOutRect () const;
//取得、設定連接至Block的指標
virtual CBlockBasis* GetBlkHead1Ptr () const;
virtual CBlockBasis* GetBlkHead2Ptr () const;
virtual void SetBlkHead1Ptr (CBlockBasis*);
virtual void SetBlkHead2Ptr (CBlockBasis*);
//取得、設定連接至Block的編號
virtual int GetBlkHead1Num () const;
virtual int GetBlkHead2Num () const;
virtual void SetBlkHead1Num (int) ;
virtual void SetBlkHead2Num (int) ;
virtual double GetBlkValue () const; //取得Block值
virtual int GetValueFlag () const; //取得Value旗標
virtual void Move (CPoint); //移動Block
virtual void Draw (CDC*); //繪製Block
virtual void DrawLine (CDC*); //繪製Block連接線
//判斷Block種類
virtual int BlkTypeIs () const;
};