Current implementation is a hash map with string keys to string values.
It's simple, but not effective.
Also a hash map is so fucking noob.
I propose creating a new class called SettingsOption, which will contain:
- Name
- Value
- Description (optional)
- Type (optional)
- Permitted values (i.e range, string regex)
- Callback functions that will be called when a change occurs (so that any function could register for changes in option)
This could allow the config file to be self documenting when it's first generated.
Even though most config options should be self documenting by name alone.
Along the way we could consider:
- SettingSection (settingOption can be grouped by category)
The current Setting class will be replaced with a abstract Setting parent that will contain:
- init
- clean up
- default
- read/parse
- write/update/generate
And other modules will inherit from it, adding their own options.