www.gusucode.com > 一个VC++语法分析模块程序实例源码程序 > 一个VC++语法分析模块程序实例/CompileSys/CompileSys/IDE/IDEDoc.cpp

    // IDEDoc.cpp : implementation of the CIDEDoc class
//

#include "stdafx.h"
#include "IDE.h"

#include "IDEDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CIDEDoc

IMPLEMENT_DYNCREATE(CIDEDoc, CDocument)

BEGIN_MESSAGE_MAP(CIDEDoc, CDocument)
	//{{AFX_MSG_MAP(CIDEDoc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CIDEDoc construction/destruction

CIDEDoc::CIDEDoc()
{
	// TODO: add one-time construction code here

}

CIDEDoc::~CIDEDoc()
{
}

BOOL CIDEDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CIDEDoc serialization

void CIDEDoc::Serialize(CArchive& ar)
{
	// CEditView contains an edit control which handles all serialization
	((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CIDEDoc diagnostics

#ifdef _DEBUG
void CIDEDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CIDEDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CIDEDoc commands