fielddef.cpp
来自「PALM PDB文件阅读器源代码」· C++ 代码 · 共 67 行
CPP
67 行
// FieldDef.cpp: implementation of the CFieldDef class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "PDB Reader.h"
#include "FieldDef.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFieldDef::CFieldDef()
{
Name = "Unnamed";
Type = "String";
Length = 0;
}
CFieldDef::CFieldDef(CString pName, CString pType, long pLength)
{
Name = pName;
Type = pType;
Length = pLength;
}
CFieldDef::~CFieldDef()
{
}
ostream& AFXAPI operator<<(ostream& ar, CFieldDef& fldInput)
{
int version=1;
ar << version << endl;
ar << fldInput.Name << endl;
ar << fldInput.Type << endl;
ar << fldInput.Length << endl;
return ar;
}
istream& AFXAPI operator>>(istream& ar, CFieldDef& fldInput)
{
int version;
_TCHAR strTemp[1024];
ar >> version;
ar >> strTemp;
fldInput.Name = strTemp;
ar >> strTemp;
fldInput.Type = strTemp;
ar >> fldInput.Length;
return ar;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?