darg_plus.configfile

Validate and parse config files.

Members

Classes

ConfigFileException
class ConfigFileException

Thrown if an error while handling config file occurs.

Enums

SizeUnit
enum SizeUnit

Units for bytes.

Functions

assignConfigValue
void assignConfigValue(Options options, string configKey, Json configValue)
Undocumented in source. Be warned that the author may not have intended to support it.
enforce
T enforce(T value, string message, string configKey, Json configValue, string file, size_t line)
Undocumented in source. Be warned that the author may not have intended to support it.
fromBytes
auto fromBytes(size_t bytes)

Convert bytes to

getConfigValue
auto getConfigValue(string configKey, Json configValue)
Undocumented in source. Be warned that the author may not have intended to support it.
parseConfig
Options parseConfig(string configFile)
Options parseConfig(Json config)

Initialize options using config.

readConfigFile
string readConfigFile(string configFileName)
Undocumented in source. Be warned that the author may not have intended to support it.
retroInitFromConfig
Options retroInitFromConfig(Options options, string configFile)
Options retroInitFromConfig(Options options, Json config)

Retroactively initialize options from config.

toBytes
auto toBytes(size_t value, SizeUnit unit)

Convert a value and unit to number of bytes.

validateConfig
void validateConfig(Json config)

Validate config.

validateConfigFile
void validateConfigFile(string configFile)

Validate config.

Manifest constants

configCommentPrefix
enum configCommentPrefix;

Keys prefixed with this string are ignored.

configEmptyArgument
enum configEmptyArgument;

String-type values equal to this string are considered empty.

maxConfigSize
enum maxConfigSize;

Maximum size of a valid config file.

Templates

configNamesOf
template configNamesOf(alias symbol)
Undocumented in source.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE file.

Authors

Arne Ludwig <arne.ludwig@posteo.de>