From 8e650c3873d2ec2d957f4c216ba2702cd66d0609 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 11 Apr 2018 12:28:57 +0200 Subject: [PATCH] Adding two required functions --- CHANGELOG.md | 2 ++ include/CLI/App.hpp | 12 ++++++++++++ tests/CreationTest.cpp | 12 ++++++++++++ tests/HelpTest.cpp | 6 ++++++ 4 files changed, 32 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0262b0e0..6df6c71e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ ## In progress * Make unlimited positionals vs. unlimited options more intuitive [#102] +* Add missing getters `get_options` and `get_description` to App [#105] [#102]: https://github.com/CLIUtils/CLI11/issues/102 +[#105]: https://github.com/CLIUtils/CLI11/issues/105 ## Version 1.5: Optionals diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index e2c23919..2d2c8f42 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -977,6 +977,18 @@ class App { /// @name Getters ///@{ + /// Get the app or subcommand description + std::string get_description() const { return description_; } + + /// Get the list of options (user facing function, so returns raw pointers) + std::vector