aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli/cli.h
diff options
context:
space:
mode:
authorRenĂ© Korthaus <[email protected]>2017-08-28 22:45:11 +0200
committerRenĂ© Korthaus <[email protected]>2018-01-04 18:18:22 +0100
commit5fb1cdfb5d7c6f854102ce33f8c7cad2a3b27153 (patch)
treea643600981c025985599c1a0ee13f1a516a9731e /src/cli/cli.h
parent5ac3d723d1be27098bc3a18204a07a5972a0e283 (diff)
Print a command description for cli help
Diffstat (limited to 'src/cli/cli.h')
-rw-r--r--src/cli/cli.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/cli/cli.h b/src/cli/cli.h
index 118d61cb6..7ba54d370 100644
--- a/src/cli/cli.h
+++ b/src/cli/cli.h
@@ -86,6 +86,10 @@ class Command
int run(const std::vector<std::string>& params);
+ virtual std::string group() const = 0;
+
+ virtual std::string description() const = 0;
+
virtual std::string help_text() const;
const std::string& cmd_spec() const
@@ -98,7 +102,7 @@ class Command
protected:
/*
- * The actual functionality of the cli command implemented in subclas.
+ * The actual functionality of the cli command implemented in subclass.
* The return value from main will be zero.
*/
virtual void go() = 0;
@@ -156,13 +160,12 @@ class Command
Botan::RandomNumberGenerator& rng();
- private:
- void parse_spec();
-
typedef std::function<Command* ()> cmd_maker_fn;
-
static std::map<std::string, cmd_maker_fn>& global_registry();
+ private:
+ void parse_spec();
+
// set in constructor
std::string m_spec;