⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 argumentparser.h

📁 ReactOS是一些高手根据Windows XP的内核编写出的类XP。内核实现机理和API函数调用几乎相同。甚至可以兼容XP的程序。喜欢研究系统内核的人可以看一看。
💻 H
字号:
/* $Id: ArgumentParser.h 15091 2005-05-07 21:24:31Z sedwards $ */

// ArgumentParser.h: interface for the CArgumentParser class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)
#define ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_

// Use this class to create parser of command line object
class CArgumentParser
{
public:
	// Call this function to specify buffer containing the command line to be parsed
	// Parameters:
	//	pchArguments - pointer to buffer containing the command line. This buffer is modified by object,
	//					and must not be accessed extrenaly when object is used, unless you interate it
	//					only once and modify only substrings returned by GetNextArgument.
	//
	// Remarks:
	// This object can be reused by setting the buffer multiple times.
	void SetArgumentList(TCHAR *pchArguments);

	// Call this function to reset argument iteration. You don't need to call this function after call
	// to set SetArgumentList, because calling SetArgumentList resets iteration with new buffer.
	void ResetArgumentIteration();

	// Call this function to get next argument from command line.
	//
	// Returns:
	//	Function returns next argument. If this is first call after calling SetArgumentList or
	//	ResetArgumentIteration, functions returns the first argument (The command itself ?).
	TCHAR * GetNextArgument();
	CArgumentParser();
	virtual ~CArgumentParser();
private:
	TCHAR *m_pchArgumentList;		// points to begin of argumet list
	const TCHAR *m_pchArgumentListEnd;	// points to last 0 in argument list
	TCHAR *m_pchArgument;
};

#endif // !defined(ARGUMENTPARSER_H__D4C1F637_BEBF_11D3_91EE_204C4F4F5020__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -