-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Options classes to pass named optional arguments. (#14)
This streamlines many user-visible constructors by aggregating all non-required parameters into a separate class for more self-document argument passing. As a result, we can now pass along the DuplicateAction from the handler constructors to the inner MismatchTries. We also introduce a separate SearchStrand enum to provide a consistent method to specify the strand to search in all handlers. We remove all default arguments in constructors (same for overloads). Now that we just have a single class to contain all optional parameters, the caller can just default-construct an instance and pass it in, which is more explicit. If we need to customize the options, we use IIFE to create Options instances in the constructor - we now do this extensively in the tests. Note that the MismatchTrie and ScanTemplate functions do not get Options, as they are low-level (and simple) enough to have relatively few arguments.
- Loading branch information
Showing
23 changed files
with
1,303 additions
and
511 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.