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