Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
function_breaker_util.hpp
Go to the documentation of this file.
1
12#ifndef FUNCTION_BREAKER_UTIL_HPP
13#define FUNCTION_BREAKER_UTIL_HPP
14
15#include <string>
16#include <vector>
17#include "../base/utils.hpp"
18#include "../base/config.hpp"
19
25 string content;
26};
27
35
36const string SOURCE_PATH = "source";
37const string HEADER_PATH = "header";
38const string INFO_PATH = "info";
39
45string extract_extension(string file_path);
46
53string build_source_path(string relative_path, string function_name);
54
61string build_header_path(string relative_path, string function_name);
62
69string build_info_path(string relative_path, string function_name);
70
79void create_source_file(int start_number_line, int end_number_line,
80 string relative_path, string function_name,
81 const vector<string> &function_content);
82
89void create_header_file(string relative_path, string function_name,
90 const vector<string> &header_content);
91
100void create_info_file(int line_declaration, int start_number_line,
101 int end_number_line, string relative_path,
102 string function_name);
103
104#endif
Configuration management interface.
PROGRAMMING_LANGUAGE
Enumeration of supported programming languages.
@ JAVA
Java programming language.
@ C
C programming language.
void create_info_file(int line_declaration, int start_number_line, int end_number_line, string relative_path, string function_name)
Creates JSON metadata file for a function.
string build_info_path(string relative_path, string function_name)
Builds info file path for a function.
const string SOURCE_PATH
Directory name for source files.
string build_source_path(string relative_path, string function_name)
Builds source file path for a function.
void create_header_file(string relative_path, string function_name, const vector< string > &header_content)
Creates header file for a function.
const string HEADER_PATH
Directory name for header files.
string extract_extension(string file_path)
Extracts file extension from path.
string build_header_path(string relative_path, string function_name)
Builds header file path for a function.
const string INFO_PATH
Directory name for metadata files.
void create_source_file(int start_number_line, int end_number_line, string relative_path, string function_name, const vector< string > &function_content)
Creates source file for a function.
Structure representing a line of source code.
int line_number
Line number in the original file.
string content
Text content of the line.
Defines utility functions used across all files.