Improve (Selection|FileName)OptionManager handling
The way the managers get passed to the option storage classes is now
reversed: the manager is passed already to the constructor. This has
several benefits:
- Already the constructor can use the manager if necessary.
- It is possible to easily assert on all incorrect usage scenarios.
- There is much less boilerplate code associated with propagating the
manager into the storage classes. There is also less code in
general: even with an addition of a new file and its copyright
header, as well as more extensive documentation, there are still
fewer total lines with the new approach.
The minor disadvantage is that also option types that do not use a
manager get the container passed as an argument to createStorage(), but
they can just ignore the parameter, so the above benefits should clearly
outweigh this.
There was an outdated comment in options.h about the usage of
addSubSection(), which is fixed here. It is now necessary to add
subsections before any options are added to them, but this is likely a
reasonable constraint for some other future stuff as well.
Change-Id: I4a5e69d3fd596dbe265613f81399219f8b8b19c8
26 files changed: