/** * @file command_factory.hpp * @author Julian Iseringhausen * @date Thu May 19 16:48:40 2011 * * @brief Class to store possible commands. * */ #ifndef COMMAND_FACTORY_HPP_ #define COMMAND_FACTORY_HPP_ #include #include namespace VMG { class Command; class CommandProxyBase; class CommandFactory { public: CommandFactory(); virtual ~CommandFactory(); void Register(CommandProxyBase* command); ///< Registers a command Command* Get(const std::string& id); ///< Returns a command void Delete(const std::string& id); ///< Deletes a command bool CheckNumberOfArguments(const std::string& id, const int& num_arguments); void PrintAvailableCommands(); ///< Prints the names of all registered commands private: std::map proxy_map; std::map instance_map; }; } #endif /* COMMAND_FACTORY_HPP_ */