3void Function::read_content(){
4 string source_path = path.build_source_path();
8void Function::read_header(){
9 string header_path = path.build_header_path();
12void Function::read_info(){
13 string info_path = path.build_info_path();
15 line_declaration = info[LINE_DECLARATION_JSON].asInt();
16 start_number_line = info[START_NUMBER_LINE_JSON].asInt();
17 end_number_line = info[END_NUMBER_LINE_JSON].asInt();
21 return end_number_line-line_declaration+1;
35 return {line_declaration,start_number_line,end_number_line};
46 for(
auto line : header){
49 for(
int i = 0; i < int(content.size()); i++){
50 auto line = content[i];
61 string function_message = FUNCTION_PREFIX_PRINT + path.build_function_name();
62 string relative_message = RELATIVE_PATH_PRINT + path.build_relative_path();
63 string start_message = LINE_DECLARATION_PRINT + to_string(line_declaration+1);
64 string end_message = END_DECLARATION_PRINT + to_string(end_number_line+1);
65 string number_message = NUMBER_LINE_PRINT + to_string(
number_of_lines());
vector< string > build_all_content()
Builds combined content of header and source.
array< int, 3 > get_scope_function_in_file()
Gets the function's line number scope.
void print_basic_info()
Prints formatted function information to console.
vector< string > get_header()
Gets the function's header content.
Function(Path _path)
Constructs a Function object.
int number_of_lines()
Calculates the total number of lines in the function.
Path manipulation class for tool-specific directory structure.
Function abstraction for temporary codebase.
Json::Value read_json(string string_path)
Reads and parses a JSON file.
@ BRIGHT_YELLOW
Bright yellow color.
string format_colored_message(string message, COLOR color)
Formats a message with ANSI color codes.
vector< string > read_file_generic(string string_path)
Reads a file line by line into a vector of strings.
const string LIMITER_PRINT
Constant string used as a visual delimiter/separator in prints.