ORE Studio 0.0.4
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
environment_mapper_factory Class Reference

Makes environment mappers for program options. More...

#include <environment_mapper_factory.hpp>

Collaboration diagram for environment_mapper_factory:
Collaboration graph

Static Public Member Functions

static std::function< std::string(const std::string &)> make_mapper (const std::string app_name)
 Creates an environment variable name mapping function.
 

Detailed Description

Makes environment mappers for program options.

Note
Logging is not available during configuration.

Member Function Documentation

◆ make_mapper()

std::function< std::string(const std::string &)> make_mapper ( const std::string  app_name)
static

Creates an environment variable name mapping function.

Maps environment variables with ORES_ prefix to command-line option names. For example: ORES_DB_PASSWORD -> db-password

Parameters
app_namename of the app, in capitals, e.g. CLI.
Returns
Function that maps environment variable names to option names.