Fix umpnpmgr build
[reactos.git] / rosapps / sysutils / regexpl / ArgumentParser.h
1 /* $Id$ */
2
3 // ArgumentParser.h: interface for the CArgumentParser class.
4 //
5 //////////////////////////////////////////////////////////////////////
6
7 #if !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)
8 #define ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_
9
10 // Use this class to create parser of command line object
11 class CArgumentParser
12 {
13 public:
14 // Call this function to specify buffer containing the command line to be parsed
15 // Parameters:
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.
19 //
20 // Remarks:
21 // This object can be reused by setting the buffer multiple times.
22 void SetArgumentList(TCHAR *pchArguments);
23
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();
27
28 // Call this function to get next argument from command line.
29 //
30 // Returns:
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();
34 CArgumentParser();
35 virtual ~CArgumentParser();
36 private:
37 TCHAR *m_pchArgumentList; // points to begin of argumet list
38 const TCHAR *m_pchArgumentListEnd; // points to last 0 in argument list
39 TCHAR *m_pchArgument;
40 };
41
42 #endif // !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)