nodedata.cpp

来自「功能主要是串口通信和网络通信方面的」· C++ 代码 · 共 64 行

CPP
64
字号
// NodeData.cpp: implementation of the CNodeData class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "faketolcan.h"
#include "NodeData.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CNodeData::CNodeData()
{
	m_strNodeType = _T("");
	m_iBase = 0;
	m_iBound = 0;
	m_iMinValue = 0;
	m_iMaxValue = 0;
	m_iFirstValue = 0;
	m_iStep = 0;
	m_iCurrentValue = 0;
	m_iCurrentStep = 0;
}

CNodeData::~CNodeData()
{

}

IMPLEMENT_SERIAL(CNodeData, CObject, 1)
void CNodeData::Serialize(CArchive &ar)
{
	if (ar.IsStoring())
	{
		ar << m_strNodeType;
		ar << m_iBase;
		ar << m_iBound;
		ar << m_iMinValue;
		ar << m_iMaxValue;
		ar << m_iFirstValue;
		ar << m_iStep;
		ar << m_iCurrentValue;
		ar << m_iCurrentStep;
	} 
	else
	{
		ar >> m_strNodeType;
		ar >> m_iBase;
		ar >> m_iBound;
		ar >> m_iMinValue;
		ar >> m_iMaxValue;
		ar >> m_iFirstValue;
		ar >> m_iStep;
		ar >> m_iCurrentValue;
		ar >> m_iCurrentStep;
	}
}

⌨️ 快捷键说明

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