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

📄 info.cpp

📁 全国交通咨询系统源代码
💻 CPP
字号:
// Info.cpp: implementation of the Info class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "map.h"
#include "Info.h"

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

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


Info::Info():m_fee(-1),m_time(-1),m_timespend(-1)
{

}

Info::Info(const Info & temp)
{
	m_fee=temp.m_fee;
	m_time=temp.m_time;
	m_timespend=temp.m_timespend;
}


Info::~Info()
{

}

void Info::SetFee(int fee)
{
	m_fee=fee;
}

void Info::SetTime(int time)
{
	m_time=time;
}

void Info::SetTimeSpend(int timespend)
{
	m_timespend=timespend;
}

int Info::GetFee()
{
	return m_fee;
}

int Info::GetTime()
{
	return m_time;
}

int Info::GetTimeSpend()
{
	return m_timespend;
}

//DEL void Info::operator >>(CStdioFile &file)
//DEL {	
//DEL 	file.Write(&m_fee,sizeof(int));
//DEL 	file.Write(&m_time,sizeof(int));
//DEL 	file.Write(&m_timespend,sizeof(int));
//DEL }

//DEL void Info::operator <<(CStdioFile &file)
//DEL {
//DEL 	file.Read(&m_fee,sizeof(int));
//DEL 	file.Read(&m_time,sizeof(int));
//DEL 	file.Read(&m_timespend,sizeof(int));
//DEL }

void Info::Serialize(CArchive &archive)
{
//	CObject::Serialize(archive);
	if(archive.IsStoring()) archive<<m_fee<<m_time<<m_timespend;
    else archive>>m_fee>>m_time>>m_timespend;
}

Info & Info::operator =(const Info & temp)
{
	m_fee=temp.m_fee;
	m_time=temp.m_time;
	m_timespend=temp.m_timespend;
	return *this;
}

⌨️ 快捷键说明

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