gpsbabel icon indicating copy to clipboard operation
gpsbabel copied to clipboard

feat: Add runtime validation for option types

Open robertlipe opened this issue 2 months ago • 0 comments

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 the Option class hierarchy to enable runtime type identification.
  • Validation logic was added to Vecs::validate_args to compare the declared argtype with the actual Option type, calling gbFatal on a mismatch.
  • This addresses an issue where an incorrect argtype in the kalman filter's options was not caught at startup.
  • The Option class hierarchy was refactored to fix various build errors, including breaking a circular dependency between defs.h and option.h.

robertlipe avatar Oct 01 '25 07:10 robertlipe