// HorlogeParseCmdLine.cpp: implementation of the HorlogeParseCmdLine class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "HorlogeParseCmdLine.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// HorlogeParseCmdLine::HorlogeParseCmdLine() { m_start = FALSE; m_busNumber = ""; } HorlogeParseCmdLine::~HorlogeParseCmdLine() { } void HorlogeParseCmdLine::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast) { if (bFlag) { ParseParamFlag(lpszParam); } else ParseParamNotFlag(lpszParam); } void HorlogeParseCmdLine::ParseParamFlag(LPCTSTR pszParam) { if (lstrcmpi(pszParam, TEXT("start")) == 0) m_start = TRUE; else if (lstrcmpi(pszParam, TEXT("bus")) == 0) m_shellCommand = BusNumber; } void HorlogeParseCmdLine::ParseParamNotFlag(LPCTSTR pszParam) { switch ( m_shellCommand ) { case BusNumber: m_busNumber = pszParam; break; } }