- // GpsLinkLibStruct.cpp: implementation of the CGpsLinkStruct class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "GpsSC.h"
- #include "GpsLinkStruct.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- CGpsLinkStruct::CGpsLinkStruct()
- {
- BYTE i;
- m_LinkLibName_Bytes = GpsLibFileLen + 1;
- for(i = 0; i < m_LinkLibName_Bytes; i++) {
- m_LinkLibName[i] = 0;
- }
- m_PlaceName_Bytes = GpsLibFileLen;
- for(i = 0; i < m_PlaceName_Bytes + 1; i++) {
- m_PlaceName[i] = 0;
- }
- m_CurrFilePos = 0;
- m_CurrFilePos_Bytes = 2;
- m_CurrMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
- m_CurrMapIsTown_Bytes = 2;
- m_TopMapName_Bytes = GpsLibFileLen;
- for(i = 0; i < m_TopMapName_Bytes + 1; i++) {
- m_TopMapName[i] = 0;
- }
- m_TopMapPos = 0;
- m_TopMapPos_Bytes = 2;
- m_TopMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
- m_TopMapIsTown_Bytes = 2;
- m_BottomMapName_Bytes = GpsLibFileLen;
- for(i = 0; i < m_BottomMapName_Bytes + 1; i++) {
- m_BottomMapName[i] = 0;
- }
- m_BottomMapPos = 0;
- m_BottomMapPos_Bytes = 2;
- m_BottomMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
- m_BottomMapIsTown_Bytes = 2;
- m_LeftMapName_Bytes = GpsLibFileLen;
- for(i = 0; i < m_LeftMapName_Bytes + 1; i++) {
- m_LeftMapName[i] = 0;
- }
- m_LeftMapPos = 0;
- m_LeftMapPos_Bytes = 2;
- m_LeftMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
- m_LeftMapIsTown_Bytes = 2;
- m_RightMapName_Bytes = GpsLibFileLen;
- for(i = 0; i < m_RightMapName_Bytes + 1; i++) {
- m_RightMapName[i] = 0;
- }
- m_RightMapPos = 0;
- m_RightMapPos_Bytes = 2;
- m_RightMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
- m_RightMapIsTown_Bytes = 2;
- m_MapMinX = m_MapMinY = 0;
- m_MapMaxX = m_MapMaxY = 0;
- m_MapXY_Bytes = 2;
- m_SignLibName_Bytes = GpsLibFileLen;
- for(i = 0; i < m_SignLibName_Bytes + 1; i++) {
- m_RelatedSignLibName[i] = 0;
- }
- }
- CGpsLinkStruct::~CGpsLinkStruct()
- {
- }
- CGpsLinkStruct& CGpsLinkStruct::operator = (CGpsLinkStruct& ds)
- {
- BYTE i;
- for(i = 0; i < m_LinkLibName_Bytes; i++) {
- m_LinkLibName[i] = ds.m_LinkLibName[i];
- }
- for(i = 0; i < m_PlaceName_Bytes + 1; i++) {
- m_PlaceName[i] = ds.m_PlaceName[i];
- }
- m_CurrFilePos = ds.m_CurrFilePos;
- m_CurrMapIsTown = ds.m_CurrMapIsTown; //0x0000表示不是城区,0x1000表示为城区
- for(i = 0; i < m_TopMapName_Bytes + 1; i++) {
- m_TopMapName[i] = ds.m_TopMapName[i];
- }
- m_TopMapPos = ds.m_TopMapPos;
- m_TopMapIsTown = ds.m_TopMapIsTown; //0x0000表示不是城区,0x1000表示为城区
- for(i = 0; i < m_BottomMapName_Bytes + 1; i++) {
- m_BottomMapName[i] = ds.m_BottomMapName[i];
- }
- m_BottomMapPos = ds.m_BottomMapPos;
- m_BottomMapIsTown = ds.m_BottomMapIsTown; //0x0000表示不是城区,0x1000表示为城区
- for(i = 0; i < m_LeftMapName_Bytes + 1; i++) {
- m_LeftMapName[i] = ds.m_LeftMapName[i];
- }
- m_LeftMapPos = ds.m_LeftMapPos;
- m_LeftMapIsTown = ds.m_LeftMapIsTown; //0x0000表示不是城区,0x1000表示为城区
- for(i = 0; i < m_RightMapName_Bytes + 1; i++) {
- m_RightMapName[i] = ds.m_RightMapName[i];
- }
- m_RightMapPos = ds.m_RightMapPos;
- m_RightMapIsTown = ds.m_RightMapIsTown; //0x0000表示不是城区,0x1000表示为城区
- m_MapMinX = ds.m_MapMinX;
- m_MapMinY = ds.m_MapMinY;
- m_MapMaxX = ds.m_MapMaxX;
- m_MapMaxY = ds.m_MapMaxY;
- for(i = 0; i < m_SignLibName_Bytes + 1; i++) {
- m_RelatedSignLibName[i] = ds.m_RelatedSignLibName[i];
- }
- m_MapTri = ds.m_MapTri;
- return *this;
- }