(core): booleans config parsing
Description
-
Parsing booleans in configurations is not homogeneous.
-
Currently there are 2 ways to parse:
-
config.get<std::string>("XXX", "yes") == "yes"
-
config.get<bool>("XXX", true)
Proposal
- use everywhere the same parsing
config.get<bool>("XXX", true/false)
- apply this change on all repositories containing the modified services
- document this in XML coding guidelines (open a new ticket in sight-doc)
However, be aware that some part of the configuration code still uses sight::runtime::ConfigurationElement instead of boost::property_tree
. So the code should first be ported to use boost::property_tree, and this must be carefully tested afterwards, first in unit-tests in they exist or manually in apps/samples/tutorials.
Since sight 21.0 already broke many things, we will not open a deprecation phase. So we must inform users properly when the issue is close to modify their application repositories.
Links / references
- http://www.boost.org/doc/libs/1_66_0/doc/html/property_tree.html (property tree doc is crappy)