📄 fjview.h
字号:
// FJView.h : interface of the CFJView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_FJVIEW_H__CE2DBA37_D852_4BE7_A98C_E57F92B14C6A__INCLUDED_)
#define AFX_FJVIEW_H__CE2DBA37_D852_4BE7_A98C_E57F92B14C6A__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "CardContainer.h"
#include <queue>
#include <vector>
#include <stdlib.h>
#include "Park.h"
#include "MyTime.h"
#include "DIB.H"
class CFJView;
class Defence
{
private:
//0为放下,1为抬起
int m_intInDefenceState;
int m_intOutDefenceState;
public:
void openIn();
void openOut();
void closeIn();
void closeOut();
bool isInON();
bool isOutON();
Defence();
protected:
BOOL m_intOutMoveing;
BOOL m_intInMoveing;
friend class CFJView;
};
//声明全局对象
extern CFJApp theApp;
class CFJView : public CView
{
protected: // create from serialization only
CFJView();
DECLARE_DYNCREATE(CFJView)
CCardContainer m_ccCards;
std::queue<int> m_queIncomeCars;
std::queue<int> m_queOutCars;
std::vector<int> m_vctLots;
CPark m_park;
// Attributes
public:
CFJDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFJView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
VOID write(LPSTR str);
CFJView(int x, int y);
INT getObstaclePosition();
VOID setEmpty();
VOID setObstacle(int hipPOS = theApp.m_intN+1);
BOOL isObstacle();
INT getRam(int max);
virtual ~CFJView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
SYSTEMTIME m_systiStart;
int m_fTotalTime;
ULONG m_ulTotalOut;
ULONG m_ulTotalIn;
ULONG m_intWaitDefenceIn;
bool m_bHasStartRollOut;
bool m_bHasStartRollIn;
CFile m_filOut;
int m_intRecentOut;
int m_intRecentIn;
BOOL m_bLotLocked;
BOOL m_bincome;
//{{AFX_MSG(CFJView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
Defence m_defence;
};
#ifndef _DEBUG // debug version in FJView.cpp
inline CFJDoc* CFJView::GetDocument()
{ return (CFJDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FJVIEW_H__CE2DBA37_D852_4BE7_A98C_E57F92B14C6A__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -