index.html: add new file
[vss2svn.git] / ssphys / SSPhys / HelpCommand.cpp
blob08e1de152f0415a1f0e4621bf8e7c28aacb3e8ee
1 // HelpCommand.cpp: implementation of the CHelpCommand class.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #include "stdafx.h"
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 ()));
19 args.pop ();
20 return true;
22 return false;
25 void CHelpCommand::Execute ()
27 if (m_pCommand.get ())
29 m_pCommand->PrintUsage ();
31 else if (m_pFactory)
33 ::PrintUsage ();
37 bool CHelpCommand::SetOption (const COption& option)
39 return false;