www.pudn.com > NiHe > NiHeDoc.cpp


// NiHeDoc.cpp : implementation of the CNiHeDoc class 
// 
 
#include "stdafx.h" 
#include "NiHe.h" 
 
#include "NiHeDoc.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CNiHeDoc 
 
IMPLEMENT_DYNCREATE(CNiHeDoc, CDocument) 
 
IMPLEMENT_DYNCREATE(LiSanPoint, CObject) 
 
BEGIN_MESSAGE_MAP(CNiHeDoc, CDocument) 
	//{{AFX_MSG_MAP(CNiHeDoc) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
		//    DO NOT EDIT what you see in these blocks of generated code! 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CNiHeDoc construction/destruction 
LiSanPoint::LiSanPoint() 
{ 
	x=0; 
	y=0; 
} 
//LiSanPoint::LiSanPoint(float px, float py) 
//{ 
//	x=px; 
//	y=py; 
//} 
 
CNiHeDoc::CNiHeDoc() 
{ 
	// TODO: add one-time construction code here 
	count=0; 
	cishu=0; 
	int i; 
	for(i=0;i<11;i++) 
		c[i]=0; 
} 
 
CNiHeDoc::~CNiHeDoc() 
{ 
} 
 
BOOL CNiHeDoc::OnNewDocument() 
{ 
	if (!CDocument::OnNewDocument()) 
		return FALSE; 
 
	// TODO: add reinitialization code here 
	// (SDI documents will reuse this document) 
 
	return TRUE; 
} 
 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CNiHeDoc serialization 
 
void CNiHeDoc::Serialize(CArchive& ar) 
{ 
	if (ar.IsStoring()) 
	{ 
		// TODO: add storing code here 
	} 
	else 
	{ 
		// TODO: add loading code here 
	} 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CNiHeDoc diagnostics 
 
#ifdef _DEBUG 
void CNiHeDoc::AssertValid() const 
{ 
	CDocument::AssertValid(); 
} 
 
void CNiHeDoc::Dump(CDumpContext& dc) const 
{ 
	CDocument::Dump(dc); 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CNiHeDoc commands