opensim-creator
opensim-creator copied to clipboard
Refactor `OpenSimCreator/Graphics/*` enum metadata functions
Broken out from #782
In order to implement settings support in #782, various methods were added that map graphics enums (e.g. MuscleColoringStyle
) to metadata structs that contain serializable information like name
s, and id
s.
Refactoring should:
- Try to name the helper functions more consistently
- Remove their dependence on reading from an unordered_map<std::string, AppSettingValue> and, instead, on something higher-level, like std::function<std::optional<AppSettingValue const&>(std::string_view)>
- (so that they are more generic, can be composed more cleanly into a hierarchy, etc.)