Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
function_breaker_util.cpp File Reference
+ Include dependency graph for function_breaker_util.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{function_breaker_util.cpp}
 

Functions

int anonymous_namespace{function_breaker_util.cpp}::find_position_first_open_bracket (string s)
 
string extract_extension (string file_path)
 Extracts file extension from path.
 
string build_source_path (string relative_path, string function_name)
 Builds source file path for a function.
 
string build_header_path (string relative_path, string function_name)
 Builds header file path for a function.
 
string build_info_path (string relative_path, string function_name)
 Builds info file path for a function.
 
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.
 
void create_header_file (string relative_path, string function_name, const vector< string > &header_content)
 Creates header file for a function.
 
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.
 

Function Documentation

◆ build_header_path()

string build_header_path ( string relative_path,
string function_name )

Builds header file path for a function.

Parameters
relative_pathRelative path of the original file
function_nameName of the function
Returns
string Full path for the header file

Definition at line 42 of file function_breaker_util.cpp.

◆ build_info_path()

string build_info_path ( string relative_path,
string function_name )

Builds info file path for a function.

Parameters
relative_pathRelative path of the original file
function_nameName of the function
Returns
string Full path for the info file

Definition at line 51 of file function_breaker_util.cpp.

◆ build_source_path()

string build_source_path ( string relative_path,
string function_name )

Builds source file path for a function.

Parameters
relative_pathRelative path of the original file
function_nameName of the function
Returns
string Full path for the source file

Definition at line 33 of file function_breaker_util.cpp.

◆ create_header_file()

void create_header_file ( string relative_path,
string function_name,
const vector< string > & header_content )

Creates header file for a function.

Parameters
relative_pathRelative path of the original file
function_nameName of the function
header_contentVector of strings containing the header content

Definition at line 65 of file function_breaker_util.cpp.

◆ create_info_file()

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.

Parameters
line_declarationLine number where function is declared
start_number_lineStarting line number of function body
end_number_lineEnding line number of function body
relative_pathRelative path of the original file
function_nameName of the function

Definition at line 71 of file function_breaker_util.cpp.

◆ create_source_file()

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.

Parameters
start_number_lineStarting line number in original file
end_number_lineEnding line number in original file
relative_pathRelative path of the original file
function_nameName of the function
function_contentVector of strings containing the function body

Definition at line 60 of file function_breaker_util.cpp.

◆ extract_extension()

string extract_extension ( string file_path)

Extracts file extension from path.

Parameters
file_pathPath to the file
Returns
string File extension

Definition at line 16 of file function_breaker_util.cpp.