|
Arkanjo 0.2
A tool for find code duplicated functions in codebases
|
Represents a code function with its content and metadata. More...
#include <function.hpp>
Public Member Functions | |
| int | number_of_lines () const |
| Calculates the total number of lines in the function. | |
| Function (const Path &_path) | |
| Constructs a Function object. | |
| void | load () |
| std::array< int, 3 > | get_scope_function_in_file () const |
| Gets the function's line number scope. | |
| const std::vector< std::string > & | get_header () const |
| Gets the function's header content. | |
| std::vector< std::string > | build_all_content () |
| Builds combined content of header and source. | |
| void | print_basic_info () |
| Prints formatted function information to console. | |
| void | print_code (bool no_numbers=false) |
Represents a code function with its content and metadata.
Provides access to function source, header, line information, and various utility methods for function manipulation and display.
Definition at line 30 of file function.hpp.
|
explicit |
Constructs a Function object.
| _path | Path object containing function location info |
Definition at line 28 of file function.cpp.
| std::vector< std::string > Function::build_all_content | ( | ) |
Builds combined content of header and source.
Definition at line 47 of file function.cpp.
| const std::vector< std::string > & Function::get_header | ( | ) | const |
Gets the function's header content.
Definition at line 43 of file function.cpp.
| std::array< int, 3 > Function::get_scope_function_in_file | ( | ) | const |
Gets the function's line number scope.
Definition at line 39 of file function.cpp.
| void Function::load | ( | ) |
Definition at line 30 of file function.cpp.
| int Function::number_of_lines | ( | ) | const |
Calculates the total number of lines in the function.
Definition at line 24 of file function.cpp.
| void Function::print_basic_info | ( | ) |
Prints formatted function information to console.
Definition at line 65 of file function.cpp.
| void Function::print_code | ( | bool | no_numbers = false | ) |
Definition at line 80 of file function.cpp.