Goby3
3.1.5a
2024.05.23
|
Defines the interface to a "configurator", a class that can read command line parameters (argc, argv) and produce a configuration object. More...
#include <goby/middleware/application/configurator.h>
Public Member Functions | |
const Config & | cfg () const |
The configuration object produced from the command line parameters. More... | |
virtual const protobuf::AppConfig & | app_configuration () const |
Subset of the configuration used to configure the Application itself. More... | |
virtual void | validate () const |
Override to validate the configuration. More... | |
virtual void | handle_config_error (middleware::ConfigException &e) const |
Override to customize how ConfigException errors are handled. More... | |
virtual std::string | str () const =0 |
Override to output the configuration object as a string. More... | |
Protected Member Functions | |
Config & | mutable_cfg () |
Derived classes can modify the configuration as needed in their constructor. More... | |
virtual protobuf::AppConfig & | mutable_app_configuration () |
Derived classes can modify the application configuration as needed in their constructor. More... | |
Defines the interface to a "configurator", a class that can read command line parameters (argc, argv) and produce a configuration object.
Configurators are used to read command line parameters (and subsequently possibly open one or more configuration files) to populate the values in a configuration object that is used by the code to be configured (SingleThreadApplication, MultiThreadApplication, SimpleThread, etc.).
Config | The type of the configuration object produced by the configurator |
Definition at line 38 of file configurator.h.
|
inlinevirtual |
Subset of the configuration used to configure the Application itself.
Reimplemented in goby::middleware::ProtobufConfigurator< Config >.
Definition at line 46 of file configurator.h.
|
inline |
The configuration object produced from the command line parameters.
Definition at line 42 of file configurator.h.
|
inlinevirtual |
Override to customize how ConfigException errors are handled.
Definition at line 54 of file configurator.h.
|
inlineprotectedvirtual |
Derived classes can modify the application configuration as needed in their constructor.
Definition at line 67 of file configurator.h.
|
inlineprotected |
Derived classes can modify the configuration as needed in their constructor.
Definition at line 64 of file configurator.h.
|
pure virtual |
Override to output the configuration object as a string.
|
inlinevirtual |
Override to validate the configuration.
ConfigException | if the configuration is not valid |
Reimplemented in goby::middleware::ProtobufConfigurator< Config >.
Definition at line 51 of file configurator.h.