This partial rewrite is designed primarily to make parameters easier to
use while testing. It does also come with some additional improvements,
such as better support for optional parameter sections, better
parsing/casting logic, and better exception support.
Replaced nearly all usage of 'ParamParser' with 'Params', to
separate the usage of parameters from the usage of the parser which
populates them.
Changed getParamX and queryParamX to be templated functions,
using the boost::lexical_cast method to cast the parameter from
string to a usable type.
Updated tryPush to create a temporary param node, to prevent all
the hackish work-arounds with if-blocks and populating default
parameter values.
Added an 'interface' class for a parameter builder, which the new
ParamParser inherits from. A ParamFactory class will also
inherit from this base class. TODO: Find a way to get params back
that doesn't cause a segfault when closing the program.
Added a new test for basic param features, like nested sections and
param value casting.
Updated all param-based code not to use using namespace and to
have slightly better coding practices. (Still need to do a pass over
the entire codebase)
Fixed a couple of minor issues throughout the codebase
This partial rewrite is designed primarily to make parameters easier to use while testing. It does also come with some additional improvements, such as better support for optional parameter sections, better parsing/casting logic, and better exception support.
getParamX
andqueryParamX
to be templated functions, using theboost::lexical_cast
method to cast the parameter from string to a usable type.tryPush
to create a temporary param node, to prevent all the hackish work-arounds with if-blocks and populating default parameter values.ParamParser
inherits from. AParamFactory
class will also inherit from this base class. TODO: Find a way to get params back that doesn't cause a segfault when closing the program.using namespace
and to have slightly better coding practices. (Still need to do a pass over the entire codebase)