3 // ArgumentParser.h: interface for the CArgumentParser class.
5 //////////////////////////////////////////////////////////////////////
7 #if !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)
8 #define ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_
10 // Use this class to create parser of command line object
14 // Call this function to specify buffer containing the command line to be parsed
16 // pchArguments - pointer to buffer containing the command line. This buffer is modified by object,
17 // and must not be accessed extrenaly when object is used, unless you interate it
18 // only once and modify only substrings returned by GetNextArgument.
21 // This object can be reused by setting the buffer multiple times.
22 void SetArgumentList(TCHAR
*pchArguments
);
24 // Call this function to reset argument iteration. You don't need to call this function after call
25 // to set SetArgumentList, because calling SetArgumentList resets iteration with new buffer.
26 void ResetArgumentIteration();
28 // Call this function to get next argument from command line.
31 // Function returns next argument. If this is first call after calling SetArgumentList or
32 // ResetArgumentIteration, functions returns the first argument (The command itself ?).
33 TCHAR
* GetNextArgument();
35 virtual ~CArgumentParser();
37 TCHAR
*m_pchArgumentList
; // points to begin of argumet list
38 const TCHAR
*m_pchArgumentListEnd
; // points to last 0 in argument list
42 #endif // !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)