ConfigParser.get

Alternative form non-strict config value getter, returning the retrieved value via a reference. (For interface consistency with the reference version of getStrict(), above.)

Template can be instantiated with integer, float or string (istring) type.

Usage Example:

Config.parseFile("some-config.ini");
istring str;
int n;

Config.get(str, "some-cat", "some-key", "default value");
Config.get(n, "some-cat", "some-key", 23);
  1. T get(cstring category, cstring key, T default_value)
  2. void get(T value, cstring category, cstring key, T default_value)
    class ConfigParser

Parameters

value T

output for config value

category cstring

category to get key from

key cstring

key whose value is to be got

default_value T

default value to use if missing in the config

TODO: perhaps we should discuss removing the other version of get(), above? It seems a little bit confusing having both methods, and I feel the reference version is more convenient to use.

Meta