Class ConfigurationOption¶
Defined in File configuration_option.h
Class Documentation¶
-
class 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
Public Functions
-
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>
inline 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&¶
Friends
-
friend auto pre_init(ConfigurationOption const &clo) -> ConfigurationOption¶
Update the option to be called back before Mir initialization starts.
- Parameters:
clo – the option
-
ConfigurationOption(std::function<void(int value)> callback, std::string const &option, std::string const &description, int default_value)¶