summaryrefslogtreecommitdiff
path: root/Bus/Horloge/HorlogeParseCmdLine.cpp
diff options
context:
space:
mode:
authorfcolin2007-02-01 12:52:34 +0000
committerfcolin2007-02-01 12:52:34 +0000
commited71499daa683ba4407a9096d2f94b05cad9f873 (patch)
tree14100656b9c0074762518074c695aa2af601fcb1 /Bus/Horloge/HorlogeParseCmdLine.cpp
parent69a01dbf2a3331c286b83aa827886c5dcd3a7e91 (diff)
downloadivy-cplusplus-ed71499daa683ba4407a9096d2f94b05cad9f873.zip
ivy-cplusplus-ed71499daa683ba4407a9096d2f94b05cad9f873.tar.gz
ivy-cplusplus-ed71499daa683ba4407a9096d2f94b05cad9f873.tar.bz2
ivy-cplusplus-ed71499daa683ba4407a9096d2f94b05cad9f873.tar.xz
Utilisateur : Fcolin Date : 25/10/01 Heure : 11:44 Créé (vss 1)
Diffstat (limited to 'Bus/Horloge/HorlogeParseCmdLine.cpp')
-rw-r--r--Bus/Horloge/HorlogeParseCmdLine.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/Bus/Horloge/HorlogeParseCmdLine.cpp b/Bus/Horloge/HorlogeParseCmdLine.cpp
new file mode 100644
index 0000000..bd3e4e9
--- /dev/null
+++ b/Bus/Horloge/HorlogeParseCmdLine.cpp
@@ -0,0 +1,58 @@
+// 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;
+ }
+}