www.pudn.com > CHECKER.zip > TEXTDOC.CPP


// textdoc.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "checker.h" 
#include "textdoc.h" 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char BASED_CODE THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CTextDoc 
 
IMPLEMENT_DYNCREATE(CTextDoc, CDocument) 
 
CTextDoc::CTextDoc() 
{ 
} 
 
BOOL CTextDoc::OnNewDocument() 
{ 
	if (!CDocument::OnNewDocument()) 
		return FALSE; 
	return TRUE; 
} 
 
CTextDoc::~CTextDoc() 
{ 
} 
 
 
BEGIN_MESSAGE_MAP(CTextDoc, CDocument) 
	//{{AFX_MSG_MAP(CTextDoc) 
		// NOTE - the ClassWizard will add and remove mapping macros here. 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
 
 
///////////////////////////////////////////////////////////////////////////// 
// CTextDoc diagnostics 
 
#ifdef _DEBUG 
void CTextDoc::AssertValid() const 
{ 
	CDocument::AssertValid(); 
} 
 
void CTextDoc::Dump(CDumpContext& dc) const 
{ 
	CDocument::Dump(dc); 
} 
#endif //_DEBUG 
 
///////////////////////////////////////////////////////////////////////////// 
// CTextDoc serialization 
 
void CTextDoc::Serialize(CArchive& ar) 
{ 
// Assume only one view -- a CEditView! 
POSITION pos=GetFirstViewPosition(); 
CEditView *eview=(CEditView *)GetNextView(pos); 
eview->SerializeRaw(ar);  // read write ASCII text 
} 
 
///////////////////////////////////////////////////////////////////////////// 
// CTextDoc commands