Alexandria 2.31.0
SDC-CH common library for the Euclid project
|
Class providing some helper methods for managing boost program options. More...
#include <ProgramOptionsHelper.h>
Public Member Functions | |
virtual | ~ProgramOptionsHelper ()=default |
Destructor. | |
Static Public Member Functions | |
static std::string | wildcard (const std::string &name, const std::string &instance="*") |
Creates the name to use for a wildcard program option. | |
static std::set< std::string > | findWildcardNames (const std::vector< std::string > &option_name_list, const std::map< std::string, boost::program_options::variable_value > &options) |
Returns the instance names of wildcard options. | |
Class providing some helper methods for managing boost program options.
Definition at line 40 of file ProgramOptionsHelper.h.
|
virtualdefault |
Destructor.
|
static |
Returns the instance names of wildcard options.
This method searches for all wildcard options in the option_name_list and it returns the instance names to be used with the wildcard() method for retrieving the option value from a boost variables_map.
option_name_list | The list of the wildcard options to search for |
options | The map with the values of the user |
Definition at line 36 of file ProgramOptionsHelper.cpp.
References std::set< K >::insert().
|
static |
Creates the name to use for a wildcard program option.
This method has two usages. If is is called with only the name parameter, it returns the name of the option as it should be appended to the boost option_description when describing the option. If it is called with an instance name, it returns the name to be used for retrieving the option value from the boost variables_map. The names of the instances can be retrieved by using the findWildcardNames() method.
name | The name of the wildcard option |
instance | The name of the instance |
Definition at line 31 of file ProgramOptionsHelper.cpp.