John Ralls
3296212aef
Sketch out the rest of the option types.
...
Minimal implentation to get it to compile and pass tests, not functional yet.
2021-07-10 17:24:56 -07:00
John Ralls
6deedd441f
Make the ptr returned by GncOption::get_ui_item() const
...
but not the GtkWidget it points to.
2021-07-10 17:24:56 -07:00
John Ralls
40361ec854
gnc-opption.hpp needs to include <functional>.
2021-07-10 17:24:56 -07:00
John Ralls
41ef2c5d44
Add OptionUIItem composition class to GncOption.
...
Provides a type and a raw pointer member with accessors. The type is one of
enum GncOptionIUType and is either VOID (for internal options that don't
get UI items) or one of the widget types specified in dialog-option.c or
business-options-gnome.c.
2021-07-10 17:24:56 -07:00
John Ralls
083e5b93df
Replace the CRTP class GncOptionBase with direct calls in its former children.
...
Benefit of CRTP too limited to accept the cost of understanding it.
2021-07-10 17:24:56 -07:00
John Ralls
16fd632ec8
Make the GncOption member variables private.
...
GncOption is intended to be final, so there's no point in protected members.
2021-07-10 17:24:56 -07:00
John Ralls
d88ec0dc1b
Replace the gnc_make_foo_option free functions with a template ctor.
...
The free functions will reappear for GncOptionDB. This is to avoid
having to pass naked pointers to Scheme with the attendant object
lifetime issues.
2021-07-10 17:24:56 -07:00
John Ralls
01dc70cc60
Add GncOption accessors for Classifier strings.
2021-07-10 17:24:56 -07:00
John Ralls
01fcae6ac8
Make the OptionClassifier members non-const.
...
Constness deletes the default copy assignment operator, making GncOption
not copy-assignable.
2021-07-10 17:24:56 -07:00
John Ralls
b6fd844774
Wrap GncOptionValue/GncOptionValidatedValue in Boost::Variant.
...
To provide a single type for containers.
2021-07-10 17:24:56 -07:00
John Ralls
c0ba3e2706
[C++ Options] Begin Implementation for basic and validated options.
2021-07-10 17:24:56 -07:00