-
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.
resolve issues with parseArgs and Subcall base class to ensure usabil…
…ity without redundancy
- Loading branch information
Showing
6 changed files
with
37 additions
and
23 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
#include "Overlap.hpp" | ||
|
||
cxxopts::ParseResult Overlap::parseArgs(int argc, char** argv) { | ||
cxxopts::Options options("overlap", "Search for interval overlaps in the index"); | ||
cxxopts::Options options("index", "Index an Interval File"); | ||
options.add_options() | ||
("input", "The search string or file to search for", | ||
cxxopts::value<std::string>()) | ||
("o, output", "The output file to store the overlaps", | ||
cxxopts::value<std::string>()) | ||
("inputfile", "The input file to be indexed", | ||
cxxopts::value<std::string>()) | ||
("-o, outputfile", "Write the index to the specified file", | ||
cxxopts::value<std::string>()->default_value("")) | ||
("k, order", "The order of the tree (default: 3)", | ||
cxxopts::value<int>()->default_value("3")) | ||
; | ||
options.parse_positional({"input"}); | ||
options.parse_positional({"inputfile"}); | ||
return options.parse(argc, argv); | ||
} | ||
|
||
|
||
void Overlap::execute(const cxxopts::ParseResult& args) { | ||
if(args.count("input")) { | ||
std::string input = args["input"].as<std::string>(); | ||
std::cout << "Searching for overlaps in file: " << input << std::endl; | ||
if(args.count("inputfile")) { | ||
std::string inputfile = args["inputfile"].as<std::string>(); | ||
std::cout << "Indexing file: " << inputfile << std::endl; | ||
} | ||
|
||
if(args.count("output")) { | ||
std::string output = args["output"].as<std::string>(); | ||
std::cout << "Writing overlaps to file: " << output << std::endl; | ||
if(args.count("outputfile")) { | ||
std::string outputfile = args["outputfile"].as<std::string>(); | ||
std::cout << "Writing index to file: " << outputfile << std::endl; | ||
} | ||
} | ||
} |
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