reportrec.cpp

来自「几个老外写的源代码大家块块下载」· C++ 代码 · 共 62 行

CPP
62
字号
// ReportRec.cpp : implementation file
//

#include "stdafx.h"
#include "SerObjDoc.h"

#include "SerObj.h"
#include "ReportRec.h"

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

/////////////////////////////////////////////////////////////////////////////
// CReportRec

IMPLEMENT_DYNAMIC(CReportRec, CRecordset)

CReportRec::CReportRec(long nSize, CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CReportRec)
	m_ReportId = _T("");
	m_DocSize = 0;
	m_nFields = 3;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
	
	//** The size of the Byte array can't be 0
	//** 255 is the default size 
	m_nSize = nSize == 0 ? 255 : nSize;
	
	m_DocumentContents.SetSize( m_nSize );
}

void CReportRec::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CReportRec)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[ReportId]"), m_ReportId);
	RFX_Binary(pFX, _T("[DocumentContents]"), m_DocumentContents, m_nSize ); 
	RFX_Long(pFX, _T("[DocSize]"), m_DocSize);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CReportRec diagnostics

#ifdef _DEBUG
void CReportRec::AssertValid() const
{
	CRecordset::AssertValid();
}

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

⌨️ 快捷键说明

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