From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- .../sqlitestudiocli/commands/clicommandfactory.h | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 SQLiteStudio3/sqlitestudiocli/commands/clicommandfactory.h (limited to 'SQLiteStudio3/sqlitestudiocli/commands/clicommandfactory.h') diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandfactory.h b/SQLiteStudio3/sqlitestudiocli/commands/clicommandfactory.h new file mode 100644 index 0000000..4329463 --- /dev/null +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandfactory.h @@ -0,0 +1,25 @@ +#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 -- cgit v1.2.3