#ifndef CLICOMMANDFACTORY_H #define CLICOMMANDFACTORY_H #include #include class CliCommand; class CliCommandFactory { public: static void init(); static CliCommand* getCommand(const QString& cmdName); static QHash getAllCommands(); static QStringList getCommandNames(); private: typedef CliCommand* (*CliCommandCreatorFunc)(); static void registerCommand(CliCommandCreatorFunc func); static QHash mapping; }; #endif // CLICOMMANDFACTORY_H