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
11
12#ifndef FUNCTION_BREAKER_UTIL_HPP
13#define FUNCTION_BREAKER_UTIL_HPP
14
15#include <bits/stdc++.h>
16#include "../base/utils.hpp"
17#include "../base/config.hpp"
18
24 string content;
25};
26
34
35const string SOURCE_PATH = "source";
36const string HEADER_PATH = "header";
37const string INFO_PATH = "info";
38
44string extract_extension(string file_path);
45
52string build_source_path(string relative_path, string function_name);
53
60string build_header_path(string relative_path, string function_name);
61
68string build_info_path(string relative_path, string function_name);
69
78void create_source_file(int start_number_line, int end_number_line,
79 string relative_path, string function_name,
80 const vector<string> &function_content);
81
88void create_header_file(string relative_path, string function_name,
89 const vector<string> &header_content);
90
99void create_info_file(int line_declaration, int start_number_line,
100 int end_number_line, string relative_path,
101 string function_name);
102
103#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.