3void Function::read_content(){
8void Function::read_header(){
12void Function::read_info(){
15 line_declaration = info.value(LINE_DECLARATION_JSON,-1);
16 start_number_line = info.value(START_NUMBER_LINE_JSON,-1);
17 end_number_line = info.value(END_NUMBER_LINE_JSON,-1);
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];
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);
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.
string build_source_path()
Builds source file path.
string build_info_path()
Builds metadata file path.
string build_relative_path()
Builds relative path portion.
string build_header_path()
Builds header file path.
bool is_empty()
Checks if path is empty.
string build_function_name()
Extracts function name from path.
Function abstraction for temporary codebase.
NLOHMANN_BASIC_JSON_TPL_DECLARATION std::string to_string(const NLOHMANN_BASIC_JSON_TPL &j)
user-defined to_string function for JSON values
json read_json(string string_path)
Reads and parses a JSON file, uses nlohmann json library.
@ 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.