ArgsManager::ReadConfigStream

Read and interpret configuration settings from a stream.

Synopsis

Declared in <common/args.h>

[[nodiscard, requires_capability(0x7f2e381ab9e8)]]
bool
ReadConfigStream(
    std::istream& stream,
    std::string const& filepath,
    std::string& error,
    bool ignore_invalid_keys = false);

Return Value

true if the stream was parsed successfully.

NOTE

The return value should not be discarded.

Parameters

NameDescription
streamThe input stream to read config lines from.
filepathPath used for error messages and section tracking.
errorPopulated with a message if parsing fails.
ignore_invalid_keysSkip unknown keys instead of failing.