dglsdoc.h

来自「演示道格拉斯数据压缩算法」· C头文件 代码 · 共 80 行

H
80
字号
// DglsDoc.h : interface of the CDglsDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_DGLSDOC_H__FB7696B0_BEC0_4ADC_B719_36C12AC471AF__INCLUDED_)
#define AFX_DGLSDOC_H__FB7696B0_BEC0_4ADC_B719_36C12AC471AF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CDocVirtual:public CObject	//文档纯虚类
{
public:
	virtual void Serialize(CArchive &ar)=0;		//纯虚函数
};
class CMLine : public CDocVirtual
{
protected:
	int PointX[100];	//点X值;
	int PointY[100];	//点Y值;
	int NUM;		//点的个数;
	int RE;			//是否闭合,1为闭合;
	CMLine(){}
	DECLARE_SERIAL(CMLine)
public:
	CMLine(int* pointX,int *pointY,int num,int re);
	void My(CDC *pDC);
    void Serialize(CArchive &ar);
};

class CDglsDoc : public CDocument
{
protected: // create from serialization only
	CDglsDoc();
	DECLARE_DYNCREATE(CDglsDoc)
    CObArray m_MLine;
    CObArray* m_DocVirtual;
// Attributes
public:
    void AddMLine(int *pointX,int *pointY,int num,int re);
	CMLine* GetMLine(int index);
    virtual void DeleteContents();
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDglsDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDglsDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CDglsDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DGLSDOC_H__FB7696B0_BEC0_4ADC_B719_36C12AC471AF__INCLUDED_)

⌨️ 快捷键说明

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