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