Add a user configuration option to Mir's option handling. By default the callback will be invoked following Mir initialisation but prior to the server starting. The value supplied to the callback will come from the command line, environment variable, config file or the default.
More...
#include <configuration_option.h>
|
| ConfigurationOption (std::function< void(int value)> callback, std::string const &option, std::string const &description, int default_value) |
|
| ConfigurationOption (std::function< void(double value)> callback, std::string const &option, std::string const &description, double default_value) |
|
| ConfigurationOption (std::function< void(std::string const &value)> callback, std::string const &option, std::string const &description, std::string const &default_value) |
|
| ConfigurationOption (std::function< void(std::string const &value)> callback, std::string const &option, std::string const &description, char const *default_value) |
|
| ConfigurationOption (std::function< void(bool value)> callback, std::string const &option, std::string const &description, bool default_value) |
|
| ConfigurationOption (std::function< void(mir::optional_value< int > const &value)> callback, std::string const &option, std::string const &description) |
|
| ConfigurationOption (std::function< void(mir::optional_value< std::string > const &value)> callback, std::string const &option, std::string const &description) |
|
| ConfigurationOption (std::function< void(mir::optional_value< bool > const &value)> callback, std::string const &option, std::string const &description) |
|
| ConfigurationOption (std::function< void(bool is_set)> callback, std::string const &option, std::string const &description) |
|
| ConfigurationOption (std::function< void(std::vector< std::string > const &values)> callback, std::string const &option, std::string const &description) |
|
template<typename Lambda > |
| ConfigurationOption (Lambda &&callback, std::string const &option, std::string const &description) |
|
void | operator() (mir::Server &server) const |
|
| ~ConfigurationOption () |
|
| ConfigurationOption (ConfigurationOption const &) |
|
auto | operator= (ConfigurationOption const &) -> ConfigurationOption & |
|
Add a user configuration option to Mir's option handling. By default the callback will be invoked following Mir initialisation but prior to the server starting. The value supplied to the callback will come from the command line, environment variable, config file or the default.
- Note
- Except for re-ordering implied by "pre_init()" the callbacks will be invoked in the order supplied. \Remark: Renamed (from CommandLineOption) in MirAL 3.6
◆ ConfigurationOption() [1/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(int value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
int |
default_value |
|
) |
| |
◆ ConfigurationOption() [2/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(double value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
double |
default_value |
|
) |
| |
◆ ConfigurationOption() [3/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(std::string const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
std::string const & |
default_value |
|
) |
| |
◆ ConfigurationOption() [4/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(std::string const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
char const * |
default_value |
|
) |
| |
◆ ConfigurationOption() [5/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(bool value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
bool |
default_value |
|
) |
| |
◆ ConfigurationOption() [6/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(mir::optional_value< int > const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ ConfigurationOption() [7/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(mir::optional_value< std::string > const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ ConfigurationOption() [8/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(mir::optional_value< bool > const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ ConfigurationOption() [9/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(bool is_set)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ ConfigurationOption() [10/12]
miral::ConfigurationOption::ConfigurationOption |
( |
std::function< void(std::vector< std::string > const &values)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ ConfigurationOption() [11/12]
template<typename Lambda >
miral::ConfigurationOption::ConfigurationOption |
( |
Lambda && |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
|
inline |
◆ ~ConfigurationOption()
miral::ConfigurationOption::~ConfigurationOption |
( |
| ) |
|
◆ ConfigurationOption() [12/12]
◆ operator()()
void miral::ConfigurationOption::operator() |
( |
mir::Server & |
server | ) |
const |
◆ operator=()
◆ pre_init
Update the option to be called back before Mir initialization starts.
- Parameters
-
The documentation for this class was generated from the following file:
Copyright © 2012-2023
Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.