2013-03-14 01:14:18 +00:00
|
|
|
//
|
2000-10-04 21:04:31 +00:00
|
|
|
// ShellCommandsLinkedList.h: interface for the CShellCommandsLinkedList class.
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#if !defined(SHELLCOMMANDSLINKEDLIST_H__D29C1198_5942_11D4_A037_C5AC8D00940F__INCLUDED_)
|
|
|
|
#define SHELLCOMMANDSLINKEDLIST_H__D29C1198_5942_11D4_A037_C5AC8D00940F__INCLUDED_
|
|
|
|
|
|
|
|
#include "ShellCommand.h"
|
|
|
|
#include "Console.h"
|
|
|
|
|
|
|
|
#define POSITION int *
|
|
|
|
|
2005-05-07 21:24:31 +00:00
|
|
|
class CShellCommandsLinkedList
|
2000-10-04 21:04:31 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CShellCommandsLinkedList(CConsole& rConsole);
|
|
|
|
virtual ~CShellCommandsLinkedList();
|
|
|
|
void AddCommand(CShellCommand *pCommand);
|
|
|
|
int Execute(CArgumentParser& rArgumentParser, int& nReturnValue);
|
|
|
|
CShellCommand * Match(const TCHAR * pchCommand);
|
|
|
|
POSITION GetFirstCommandPosition();
|
|
|
|
CShellCommand * GetNextCommand(POSITION& rPos);
|
|
|
|
private:
|
|
|
|
struct SNode
|
|
|
|
{
|
|
|
|
SNode() {m_pNext = NULL;};
|
|
|
|
CShellCommand *m_pData;
|
|
|
|
SNode *m_pNext;
|
|
|
|
} *m_pRoot;
|
|
|
|
CConsole &m_rConsole;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // !defined(SHELLCOMMANDSLINKEDLIST_H__D29C1198_5942_11D4_A037_C5AC8D00940F__INCLUDED_)
|