Add ActiveState PerlApp build definition
[vss2svn.git] / ssphys / SSPhys / CommandFactory.h
blob44d6974d0fa9cd9e79535940b1500069c3f988bb
1 // CommandFactory.h: interface for the CCommandFactory class.
2 //
3 //////////////////////////////////////////////////////////////////////
5 #if !defined(AFX_COMMANDFACTORY_H__1ACA9B5D_0D2A_42A2_8C4A_A34C1D867A2A__INCLUDED_)
6 #define AFX_COMMANDFACTORY_H__1ACA9B5D_0D2A_42A2_8C4A_A34C1D867A2A__INCLUDED_
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
12 #include "Command.h"
14 class CCommandLine;
16 /** Class thrown when the command name is not recognized. */
17 class unknown_command : public SSException {
18 public:
19 unknown_command(const std::string& name)
20 : SSException(std::string("unknown command ").append(name))
24 /** Class thrown when no command name was specified. */
25 class missing_command : public SSException {
26 public:
27 missing_command()
28 : SSException(std::string("missing command "))
32 class CCommandFactory
34 public:
35 CCommandFactory();
36 virtual ~CCommandFactory();
38 CCommand* MakeCommand (std::string command);
39 void PrintUsage () const;
41 protected:
44 #endif // !defined(AFX_COMMANDFACTORY_H__1ACA9B5D_0D2A_42A2_8C4A_A34C1D867A2A__INCLUDED_)