GpsBusLine.cpp
Upload User: yffx2008
Upload Date: 2014-10-12
Package Size: 12414k
Code Size: 1k
Development Platform:

Visual C++

  1. // GpsBusLine.cpp: implementation of the CGpsBusLine class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "GpsSC.h"
  6. #include "GpsBusLine.h"
  7. #include "GpsBusInfo.h"
  8. #ifdef _DEBUG
  9. #undef THIS_FILE
  10. static char THIS_FILE[]=__FILE__;
  11. #define new DEBUG_NEW
  12. #endif
  13. //////////////////////////////////////////////////////////////////////
  14. // Construction/Destruction
  15. //////////////////////////////////////////////////////////////////////
  16. CGpsBusLine::CGpsBusLine()
  17. {
  18. m_sBusLineID.Empty();
  19. }
  20. CGpsBusLine::~CGpsBusLine()
  21. {
  22. ClearBusList();
  23. }
  24. void CGpsBusLine::ClearBusList()
  25. {
  26. CGpsBusInfo *pBus = NULL;
  27. POSITION pos;
  28. pos = m_lBusLineList.GetTailPosition();
  29. while(pos != NULL) {
  30. pBus = (CGpsBusInfo*)m_lBusLineList.GetPrev(pos);
  31. delete pBus;
  32. }
  33. m_lBusLineList.RemoveAll();
  34. }