⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testsetobject.cpp

📁 本源码给出了xml解释程序以及基于xml文件内容的数据结构构造示例
💻 CPP
字号:
// TestSetObject.cpp: implementation of the CTestSetObject class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "CXML2ITEMS.h"
#include "TestSetObject.h"
#include "XMLFile.h"

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


//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CTestSetObject, CObject, 0)

CTestSetObject::CTestSetObject()
{

}

CTestSetObject::~CTestSetObject()
{

}

void CTestSetObject::FormatMyObject(CString& str)
{
	str.Format(_T("{%s, %s, %s, %s, %s}"),
				(LPCTSTR)m_strCycleID, 
				(LPCTSTR)m_strName, 
				(LPCTSTR)m_strTestSetDesc,
				(LPCTSTR)m_strTestSetFolder,
				(LPCTSTR)m_strProject);
}

void CTestSetObject::Serialize(CArchive& ar)
{
	//WORD w;
	if (ar.IsStoring())
	{
		//w = (WORD)m_int;
		ar << m_strCycleID;
		ar << m_strName;
		ar << m_strTestSetDesc;
		ar << m_strTestSetFolder;
		ar << m_strProject;
	}
	else
	{
		//ar >> w;
		//m_int = w;
		ar >> m_strCycleID;
		ar >> m_strName;
		ar >> m_strTestSetDesc;
		ar >> m_strTestSetFolder;
		ar >> m_strProject;
	}
}

⌨️ 快捷键说明

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