21namespace fs = std::filesystem;
45 Comparation(std::string _path1, std::string _path2,
double _sim);
70 static constexpr const char* PROJECT_PATH_MESSAGE =
"Enter your project path:";
71 static constexpr const char* MINIMUM_SIMILARITY_MESSAGE =
"Enter minimum similarity desired on using the tool:";
74 double similarity_cap;
75 std::set<Comparation> comparations;
82 std::vector<std::string> parser_line(
const std::string& line);
89 bool is_an_file(
const std::string& s);
96 double retrive_similarity(
const std::string& s);
103 void parser_block_stream(
const std::string& path,
const std::vector<std::string>& tokens, std::set<Comparation>& comparations);
111 explicit Parser(
const fs::path& output_file,
double similarity_cap);
Parses and transforms duplication detection tool output.
void exec_from_stream(FILE *pipe)
Main parsing execution method using stream.
Parser(const fs::path &output_file, double similarity_cap)
Constructs parser with configuration.
Structure representing a code comparison result.
bool operator<(const Comparation &com) const
Comparison operator for sorting.
double similarity
Similarity score between the files (0-100)
Comparation()
Default constructor.
std::string path1
Path to first code file being compared.
std::string path2
Path to second code file being compared.
bool operator==(const Comparation &com) const
Equality comparison operator.