Add Dirk Luetjen's ssphys libraries and command-line tool
[vss2svn.git] / ssphys / SSPhys / CommandLine.h
blobc79c28f2969ebec78e1b4e210bf51875572c7e54
1 // CommandLine.h: interface for the CCommandLine class.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_COMMANDLINE_H__094560AC_AAF6_4054_8536_4D6F421ACBCE__INCLUDED_)
6 #define AFX_COMMANDLINE_H__094560AC_AAF6_4054_8536_4D6F421ACBCE__INCLUDED_
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
12 #include "Arguments.h"
13 #include "Options.h"
14 #include "CommandFactory.h"
15 #include <list>
17 //---------------------------------------------------------------------------
18 class CCommandLine
20 public:
21 CCommandLine ();
22 virtual ~CCommandLine ();
24 void Parse (int argc, char* argv[]);
26 void SetCommandFactory (CCommandFactory* pFactory) { m_pCommandFactory = pFactory; }
27 void SetOptionsInfo (COptionInfoList optionsInfo) { m_OptionsInfo = optionsInfo; }
29 COptionsList GetOptions () { return m_Options; }
30 CArguments GetArgs () { return m_Args; }
31 std::string GetCommand () { return m_Command; }
33 protected:
34 bool IsLongArgument (const char* ch, const char* arg);
35 bool IsArgChar (const char ch, const char arg);
37 CCommandFactory *m_pCommandFactory;
38 CArguments m_Args;
39 COptionsList m_Options;
40 COptionInfoList m_OptionsInfo;
41 std::string m_Command;
44 #endif // !defined(AFX_COMMANDLINE_H__094560AC_AAF6_4054_8536_4D6F421ACBCE__INCLUDED_)