📄 filedata.cpp
字号:
// FileData.cpp: implementation of the CFileData class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Rich.h"
#include "FileData.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CFileData, CObject, 0)
CFileData::CFileData()
{
m_CreatedBy = _T("");
m_CreatedTime = 0;
}
CFileData::~CFileData()
{
}
CArchive& operator<<(CArchive& ar, CFileData& history)
{
ar.WriteString (history.m_CreatedBy);
ar << '\n';
ar << history.m_CreatedTime;
int nItems = history.m_History.GetSize ();
ar << nItems;
for (int i = 0; i < nItems; ++i)
ar << history.m_History[i];
return (ar);
}
CArchive& operator>>(CArchive& ar, CFileData& history)
{
ar.ReadString (history.m_CreatedBy);
ar >> history.m_CreatedTime;
int nItems;
ar >> nItems;
for (int i = 0; i < nItems; ++i)
{
CModified cm;
ar >> cm;
history.m_History.Add (cm);
}
return (ar);
}
//////////////////////////////////////////////////////////////////////
// CModified Class
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CModified, CObject, 0)
CModified::CModified()
{
}
CModified::~CModified()
{
}
CArchive& operator<<(CArchive& ar, CModified& data)
{
ar.WriteString (data.m_ModUser);
ar << '\n';
ar << data.m_ModTime;
return (ar);
}
CArchive& operator>>(CArchive& ar, CModified& data)
{
ar.ReadString (data.m_ModUser);
ar >> data.m_ModTime;
return (ar);
}
CModified& CModified::operator=(CModified& data)
{
m_ModUser = data.m_ModUser;
m_ModTime = data.m_ModTime;
return (*this);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -