gpsbabel
gpsbabel copied to clipboard
feat: Add runtime validation for option types
This PR introduces a runtime validation mechanism to catch mismatches between declared and actual option types in arglist_t tables.
Key changes:
- A
get_type()virtual method was added to theOptionclass hierarchy to enable runtime type identification. - Validation logic was added to
Vecs::validate_argsto compare the declaredargtypewith the actualOptiontype, callinggbFatalon a mismatch. - This addresses an issue where an incorrect
argtypein thekalmanfilter's options was not caught at startup. - The
Optionclass hierarchy was refactored to fix various build errors, including breaking a circular dependency betweendefs.handoption.h.