class CommandFactory {
public:
- CommandFactory();
- ~CommandFactory();
- Command* getCommand(string);
+ static CommandFactory* getInstance();
+ Command* getCommand(string, string);
+ Command* getCommand();
+ bool isValidCommand(string);
+ void printCommands(ostream&);
+
private:
Command* command;
+ map<string, string> commands;
+ map<string, string>::iterator it;
+
+ static CommandFactory* _uniqueInstance;
+ CommandFactory( const CommandFactory& ); // Disable copy constructor
+ void operator=( const CommandFactory& ); // Disable assignment operator
+ CommandFactory();
+ ~CommandFactory();
};