Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
similar_function_finder.hpp
Go to the documentation of this file.
1
11
12#ifndef SIMILAR_FUNCTION_FINDER_HPP
13#define SIMILAR_FUNCTION_FINDER_HPP
14
15#include <bits/stdc++.h>
16#include "../base/path.hpp"
17#include "../base/function.hpp"
18#include "../base/utils.hpp"
20using namespace std;
21
29 string EMPTY_PATH_MESSAGE_1 = "There is no functions that resembles the name: ";
30 string EMPTY_PATH_MESSAGE_2 = "Value incorrected passed or there is no duplication code with this function";
31 string REFERENCE_PATH_MESSAGE = "The following function was found:";
32 string COUNT_MESSAGE_1 = "The total number of functions that are similar to the found one is ";
33 string COUNT_MESSAGE_2 = ". More info about them are listed below.";
34
35 Similarity_Table *similarity_table;
36 string function_pattern;
37 Path path;
38
42 void find_path_that_meets_pattern();
43
47 void print_empty_path_message();
48
53 void print_function(Path path);
54
58 void print_reference_path();
59
64 void print_similar_functions(vector<Path> similar_paths);
65
69 void print_similar_functions();
70
71 public:
77 Similar_Function_Finder(string _function_pattern, Similarity_Table *_similarity_table);
78};
79
80#endif
Path manipulation class for tool-specific directory structure.
Definition path.hpp:24
Similar_Function_Finder(string _function_pattern, Similarity_Table *_similarity_table)
Constructs finder and initiates search.
Manages and analyzes function similarity relationships.
Function abstraction for temporary codebase.
Path abstraction for temporary codebase.
Similarity relationships storage and analysis.
Defines utility functions used across all files.