detox icon indicating copy to clipboard operation
detox copied to clipboard

Refactor code to follow OOP principles

Open dharple opened this issue 4 years ago • 2 comments

While it's not currently possible to switch to using classes, structs and associated functions can still be grouped together in a way that makes more sense. The current structure is organic, and hard to follow.

General:

  • Move functions closer to their represented object (file, translation table, sequence, etc).
  • Use typedefs.

Step 1:

  • The filter needs to reference a cleaner by an enum instead of a class reference.
  • The cleaners need to take options specific to their interface, not a generic, all encompassing "options" struct.

dharple avatar Mar 01 '21 23:03 dharple

Before I can convert the structs to typedefs, I have to stop using chains to link sequences and filters.

dharple avatar Mar 01 '21 23:03 dharple

All of the structs have been updated to use typedefs.

Open items:

  • Rename the filter methods that load tables to something like table_load_from_filesystem and table_load_builtin.

dharple avatar Mar 16 '21 04:03 dharple