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 <command_line_option.h>
|
| CommandLineOption (std::function< void(int value)> callback, std::string const &option, std::string const &description, int default_value) |
|
| CommandLineOption (std::function< void(double value)> callback, std::string const &option, std::string const &description, double default_value) |
|
| CommandLineOption (std::function< void(std::string const &value)> callback, std::string const &option, std::string const &description, std::string const &default_value) |
|
| CommandLineOption (std::function< void(std::string const &value)> callback, std::string const &option, std::string const &description, char const *default_value) |
|
| CommandLineOption (std::function< void(bool value)> callback, std::string const &option, std::string const &description, bool default_value) |
|
| CommandLineOption (std::function< void(mir::optional_value< int > const &value)> callback, std::string const &option, std::string const &description) |
|
| CommandLineOption (std::function< void(mir::optional_value< std::string > const &value)> callback, std::string const &option, std::string const &description) |
|
| CommandLineOption (std::function< void(mir::optional_value< bool > const &value)> callback, std::string const &option, std::string const &description) |
|
| CommandLineOption (std::function< void(bool is_set)> callback, std::string const &option, std::string const &description) |
|
template<typename Lambda > |
| CommandLineOption (Lambda &&callback, std::string const &option, std::string const &description) |
|
void | operator() (mir::Server &server) const |
|
| ~CommandLineOption () |
|
| CommandLineOption (CommandLineOption const &) |
|
auto | operator= (CommandLineOption const &) -> CommandLineOption & |
|
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.
◆ CommandLineOption() [1/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(int value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
int |
default_value |
|
) |
| |
◆ CommandLineOption() [2/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(double value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
double |
default_value |
|
) |
| |
◆ CommandLineOption() [3/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(std::string const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
std::string const & |
default_value |
|
) |
| |
◆ CommandLineOption() [4/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(std::string const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
char const * |
default_value |
|
) |
| |
◆ CommandLineOption() [5/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(bool value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description, |
|
|
bool |
default_value |
|
) |
| |
◆ CommandLineOption() [6/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(mir::optional_value< int > const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ CommandLineOption() [7/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(mir::optional_value< std::string > const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ CommandLineOption() [8/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(mir::optional_value< bool > const &value)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ CommandLineOption() [9/11]
miral::CommandLineOption::CommandLineOption |
( |
std::function< void(bool is_set)> |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
◆ CommandLineOption() [10/11]
template<typename Lambda >
miral::CommandLineOption::CommandLineOption |
( |
Lambda && |
callback, |
|
|
std::string const & |
option, |
|
|
std::string const & |
description |
|
) |
| |
|
inline |
◆ ~CommandLineOption()
miral::CommandLineOption::~CommandLineOption |
( |
| ) |
|
◆ CommandLineOption() [11/11]
◆ operator()()
void miral::CommandLineOption::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-2022
Canonical Ltd.
Generated on Thu Feb 24 10:34:44 UTC 2022
This documentation is licensed under the GPL version 2 or 3.