class CCmdArg {
public:
enum ArgType { CmdSwitch=1, CmdOption, CmdString };
bool IsSwitch() { return m_type == CmdSwitch; }
bool IsOption() { return m_type == CmdOption; }
bool IsString() { return m_type == CmdString; }
const ArgType& GetType() { return m_type; }
const tstring& GetPart1() { return m_part1; }
const tstring& GetSwitch() { return m_part1; }
const tstring& GetOptionName() { return m_part1; }
const tstring& GetOptionValue() { return m_part2; }
const tstring& GetString() { return m_part1; }
// Constructor which takes a single string and a type
CCmdArg( ArgType t, const tstring& str1 ):
m_type(t), m_part1(str1) {}
// Constructor which takes two strings and a type
CCmdArg( ArgType t, const tstring& str1,
const tstring& str2 ):
m_type(t), m_part1(str1), m_part2(str2) {}
~CCmdArg() { }
private:
ArgType m_type;
tstring m_part1;
tstring m_part2;
};