Boost logo

Boost Users :

From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2008-05-24 05:45:34


Hi!

Rupert Bruce schrieb:
> So anywhere in my code I can do, for example:
> if (PropertyCatalog::getBooleanProperty("testapp.profile",false))
> {
> profile.append(currentStatus);
> }

Which has a design flaw, I think. I just got rid of a lot of such
function calls in a project I'm working at. The flaw: do not keep
configuration default values distributed in the code. What if the
default value needs to change? It does commonly change for directory
paths. If you now tell me to always write the correct value into the
config file, then I wouldn't need any default value at all and I could
just remove them. And if you need different default values for the same
key in different places, then you simply need also different keys.

I now have "getConfig" calls without defaults in the call.

Frank


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net