FACT++  1.0
void Configuration::CreateWildcardOptions ( )
private

Helper for Parse to create list of used wildcard options.

Create a list of all options which were registered using wildcards

Definition at line 1284 of file Configuration.cc.

References fOptionsCommandline, fOptionsConfigfile, fOptionsDatabase, fOptionsEnvironment, fVariables, fWildcardOptions, and i.

Referenced by Max(), and Parse().

1285 {
1286  po::options_description opts;
1287 
1288  for (int i=0; i<2; i++)
1289  {
1290  opts.add(fOptionsCommandline[i]);
1291  opts.add(fOptionsConfigfile[i]);
1292  opts.add(fOptionsEnvironment[i]);
1293  opts.add(fOptionsDatabase[i]);
1294  }
1295 
1296  fWildcardOptions.clear();
1297 
1298  typedef map<string,po::variable_value> Vars;
1299  typedef vector<boost::shared_ptr<po::option_description>> Descs;
1300 
1301  const Descs &desc = opts.options();
1302 
1303  for (Vars::const_iterator io=fVariables.begin(); io!=fVariables.end(); io++)
1304  {
1305  for (Descs::const_iterator id=desc.begin(); id!=desc.end(); id++)
1306 #if BOOST_VERSION > 104000
1307  if ((*id)->match(io->first, false, false, false)==po::option_description::approximate_match)
1308 #else
1309  if ((*id)->match(io->first, false)==po::option_description::approximate_match)
1310 #endif
1311  fWildcardOptions[io->first] = (*id)->long_name();
1312  }
1313 }
int i
Definition: db_dim_client.c:21
po::options_description fOptionsEnvironment[2]
Description of options from the database.
Definition: Configuration.h:26
po::options_description fOptionsDatabase[2]
Description of the options in the configuration file.
Definition: Configuration.h:25
po::options_description fOptionsCommandline[2]
Definition: Configuration.h:23
std::map< std::string, std::string > fWildcardOptions
Storage container for unrecognized options retrieved from the database.
Definition: Configuration.h:35
po::options_description fOptionsConfigfile[2]
Description of the command-line options.
Definition: Configuration.h:24
po::variables_map fVariables
URL for database connection (see Configuration::parse_database)
Definition: Configuration.h:41

+ Here is the caller graph for this function: