add --print-options to print available options in short format

This commit is contained in:
Alexey Rybalchenko
2017-06-07 16:27:40 +02:00
committed by Mohammad Al-Turany
parent cae3fd6aa3
commit 1d38a2350f
4 changed files with 72 additions and 40 deletions

View File

@@ -135,6 +135,7 @@ class FairProgOptions
virtual void ParseAll(const int argc, char** argv, bool allowUnregistered = false) = 0;// TODO change return type to bool and propagate to executable
virtual int PrintOptions();
virtual int PrintOptionsRaw();
int PrintHelp() const;
protected:
@@ -176,7 +177,7 @@ class FairProgOptions
private:
// Methods below are helper functions used in the PrintOptions method
typedef std::tuple<std::string, std::string,std::string, std::string> VarValInfo_t;
typedef std::tuple<std::string, std::string, std::string, std::string> VarValInfo_t;
typedef std::map<std::string, VarValInfo_t> MapVarValInfo_t;
VarValInfo_t GetVariableValueInfo(const po::variable_value& varValue);