ReactOS  0.4.14-dev-98-gb0d4763
ArgumentParser.h
Go to the documentation of this file.
1 //
2 // ArgumentParser.h: interface for the CArgumentParser class.
3 //
5 
6 #if !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)
7 #define ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_
8 
9 // Use this class to create parser of command line object
11 {
12 public:
13  // Call this function to specify buffer containing the command line to be parsed
14  // Parameters:
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.
18  //
19  // Remarks:
20  // This object can be reused by setting the buffer multiple times.
21  void SetArgumentList(TCHAR *pchArguments);
22 
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.
26 
27  // Call this function to get next argument from command line.
28  //
29  // Returns:
30  // Function returns next argument. If this is first call after calling SetArgumentList or
31  // ResetArgumentIteration, functions returns the first argument (The command itself ?).
34  virtual ~CArgumentParser();
35 private:
36  TCHAR *m_pchArgumentList; // points to begin of argumet list
37  const TCHAR *m_pchArgumentListEnd; // points to last 0 in argument list
39 };
40 
41 #endif // !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)
void SetArgumentList(TCHAR *pchArguments)
TCHAR * m_pchArgument
virtual ~CArgumentParser()
const TCHAR * m_pchArgumentListEnd
TCHAR * GetNextArgument()
void ResetArgumentIteration()
char TCHAR
Definition: xmlstorage.h:189
TCHAR * m_pchArgumentList