GpsLinkStruct.cpp
上传用户:yffx2008
上传日期:2014-10-12
资源大小:12414k
文件大小:4k
源码类别:

交通/航空行业

开发平台:

Visual C++

  1. // GpsLinkLibStruct.cpp: implementation of the CGpsLinkStruct class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "GpsSC.h"
  6. #include "GpsLinkStruct.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. //////////////////////////////////////////////////////////////////////
  13. // Construction/Destruction
  14. //////////////////////////////////////////////////////////////////////
  15. CGpsLinkStruct::CGpsLinkStruct()
  16. {
  17. BYTE i;
  18. m_LinkLibName_Bytes = GpsLibFileLen + 1;
  19. for(i = 0; i < m_LinkLibName_Bytes; i++) {
  20. m_LinkLibName[i] = 0;
  21. }
  22. m_PlaceName_Bytes = GpsLibFileLen;
  23. for(i = 0; i < m_PlaceName_Bytes + 1; i++) {
  24. m_PlaceName[i] = 0;
  25. }
  26. m_CurrFilePos = 0;
  27. m_CurrFilePos_Bytes = 2;
  28. m_CurrMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
  29. m_CurrMapIsTown_Bytes = 2;
  30. m_TopMapName_Bytes = GpsLibFileLen;
  31. for(i = 0; i < m_TopMapName_Bytes + 1; i++) {
  32. m_TopMapName[i] = 0;
  33. }
  34. m_TopMapPos = 0;
  35. m_TopMapPos_Bytes = 2;
  36. m_TopMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
  37. m_TopMapIsTown_Bytes = 2;
  38. m_BottomMapName_Bytes = GpsLibFileLen;
  39. for(i = 0; i < m_BottomMapName_Bytes + 1; i++) {
  40. m_BottomMapName[i] = 0;
  41. }
  42. m_BottomMapPos = 0;
  43. m_BottomMapPos_Bytes = 2;
  44. m_BottomMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
  45. m_BottomMapIsTown_Bytes = 2;
  46. m_LeftMapName_Bytes = GpsLibFileLen;
  47. for(i = 0; i < m_LeftMapName_Bytes + 1; i++) {
  48. m_LeftMapName[i] = 0;
  49. }
  50. m_LeftMapPos = 0;
  51. m_LeftMapPos_Bytes = 2;
  52. m_LeftMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
  53. m_LeftMapIsTown_Bytes = 2;
  54. m_RightMapName_Bytes = GpsLibFileLen;
  55. for(i = 0; i < m_RightMapName_Bytes + 1; i++) {
  56. m_RightMapName[i] = 0;
  57. }
  58. m_RightMapPos = 0;
  59. m_RightMapPos_Bytes = 2;
  60. m_RightMapIsTown = 0x0000; //0x0000表示不是城区,0x1000表示为城区
  61. m_RightMapIsTown_Bytes = 2;
  62. m_MapMinX = m_MapMinY = 0;
  63. m_MapMaxX = m_MapMaxY = 0;
  64. m_MapXY_Bytes = 2;
  65. m_SignLibName_Bytes = GpsLibFileLen;
  66. for(i = 0; i < m_SignLibName_Bytes + 1; i++) {
  67. m_RelatedSignLibName[i] = 0;
  68. }
  69. }
  70. CGpsLinkStruct::~CGpsLinkStruct()
  71. {
  72. }
  73. CGpsLinkStruct& CGpsLinkStruct::operator = (CGpsLinkStruct& ds)
  74. {
  75. BYTE i;
  76. for(i = 0; i < m_LinkLibName_Bytes; i++) {
  77. m_LinkLibName[i] = ds.m_LinkLibName[i];
  78. }
  79. for(i = 0; i < m_PlaceName_Bytes + 1; i++) {
  80. m_PlaceName[i] = ds.m_PlaceName[i];
  81. }
  82. m_CurrFilePos = ds.m_CurrFilePos;
  83. m_CurrMapIsTown = ds.m_CurrMapIsTown; //0x0000表示不是城区,0x1000表示为城区
  84. for(i = 0; i < m_TopMapName_Bytes + 1; i++) {
  85. m_TopMapName[i] = ds.m_TopMapName[i];
  86. }
  87. m_TopMapPos = ds.m_TopMapPos;
  88. m_TopMapIsTown = ds.m_TopMapIsTown; //0x0000表示不是城区,0x1000表示为城区
  89. for(i = 0; i < m_BottomMapName_Bytes + 1; i++) {
  90. m_BottomMapName[i] = ds.m_BottomMapName[i];
  91. }
  92. m_BottomMapPos = ds.m_BottomMapPos;
  93. m_BottomMapIsTown = ds.m_BottomMapIsTown; //0x0000表示不是城区,0x1000表示为城区
  94. for(i = 0; i < m_LeftMapName_Bytes + 1; i++) {
  95. m_LeftMapName[i] = ds.m_LeftMapName[i];
  96. }
  97. m_LeftMapPos = ds.m_LeftMapPos;
  98. m_LeftMapIsTown = ds.m_LeftMapIsTown; //0x0000表示不是城区,0x1000表示为城区
  99. for(i = 0; i < m_RightMapName_Bytes + 1; i++) {
  100. m_RightMapName[i] = ds.m_RightMapName[i];
  101. }
  102. m_RightMapPos = ds.m_RightMapPos;
  103. m_RightMapIsTown = ds.m_RightMapIsTown; //0x0000表示不是城区,0x1000表示为城区
  104. m_MapMinX  = ds.m_MapMinX;
  105. m_MapMinY = ds.m_MapMinY;
  106. m_MapMaxX = ds.m_MapMaxX;
  107. m_MapMaxY = ds.m_MapMaxY;
  108. for(i = 0; i < m_SignLibName_Bytes + 1; i++) {
  109. m_RelatedSignLibName[i] = ds.m_RelatedSignLibName[i];
  110. }
  111. m_MapTri = ds.m_MapTri;
  112. return *this;
  113. }