1 // HelpCommand.cpp: implementation of the CHelpCommand class.
3 //////////////////////////////////////////////////////////////////////
6 #include "HelpCommand.h"
7 #include "CommandFactory.h"
9 //////////////////////////////////////////////////////////////////////
10 // Construction/Destruction
11 //////////////////////////////////////////////////////////////////////
12 extern void PrintUsage ();
14 bool CHelpCommand::SetArguments (CArguments
& args
)
16 if (m_pFactory
&& !args
.empty ())
18 m_pCommand
= std::auto_ptr
<CCommand
> (m_pFactory
->MakeCommand (args
.front ()));
25 void CHelpCommand::Execute ()
27 if (m_pCommand
.get ())
29 m_pCommand
->PrintUsage ();
37 bool CHelpCommand::SetOption (const COption
& option
)