mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-08 15:20:36 +02:00
Commands
- Rewrote Command::factory to construct all commands, indexed by primary command keyword.
This commit is contained in:
parent
f53d509930
commit
8e4a757200
3 changed files with 16 additions and 17 deletions
|
@ -27,6 +27,7 @@
|
|||
#ifndef INCLUDED_COMMAND
|
||||
#define INCLUDED_COMMAND
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class Command
|
||||
|
@ -38,7 +39,7 @@ public:
|
|||
bool operator== (const Command&) const; // TODO Is this necessary?
|
||||
virtual ~Command ();
|
||||
|
||||
static Command* factory (const std::string&);
|
||||
static void factory (std::map <std::string, Command*>&);
|
||||
|
||||
std::string keyword () const;
|
||||
std::string usage () const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue