6#include <aegis2d/core/export.hpp>
40[[nodiscard]] AEGIS2D_CORE_EXPORT VarSettings
62 std::string_view origin);
78 std::span<const VarSetting> settings);
The settings a console reads and changes by name while the game runs.
Definition console_variables.hpp:80
Console variables: named, typed settings with a default, a description and flags.
Logging, time, main loop, events and configuration shared by client and server.
Definition clock.hpp:11
std::vector< std::string > apply_settings(ConsoleVariables &variables, std::span< const VarSetting > settings)
Sets variables, in order: a later setting wins over an earlier one.
VarSettings settings_from_file(const std::filesystem::path &file)
Reads settings from a file, as settings_from_text() reads text.
VarSettings settings_from_text(std::string_view text, std::string_view origin)
Reads settings from text, one per line.
VarSettings settings_from_arguments(std::span< const std::string_view > arguments)
Reads the +set name value of a command line.
A variable to set, as a command line or a settings file gives it.
Definition variable_settings.hpp:17
std::string name
Name of the variable.
Definition variable_settings.hpp:19
std::string origin
Where it comes from, for the errors: "command line" or "game.cfg:3".
Definition variable_settings.hpp:23
std::string value
Its value as text, read in the variable's type by ConsoleVariables::set_text().
Definition variable_settings.hpp:21
Settings read from a command line or a file, and what could not be read.
Definition variable_settings.hpp:27
std::vector< VarSetting > settings
Settings, in the order they were given.
Definition variable_settings.hpp:29
std::vector< std::string > errors
Such as "command line: +set needs a name and a value".
Definition variable_settings.hpp:31