|
ArKanjo 0.5.1
A tool for find code duplicated functions in codebases
|
Represents a function extracted from a codebase. More...
#include <function.hpp>
Public Member Functions | |
| Function ()=default | |
| Function (const Path &_path) | |
| Constructs a Function object. More... | |
| const Path & | path () const |
| Gets the function path information. More... | |
| const std::string & | name () const |
| Gets the function name. More... | |
| const FunctionLocation & | scope_location () const |
| Gets the function location inside the source file. More... | |
| const std::vector< std::string > & | header () const |
| Gets the function's header content. More... | |
| std::vector< std::string > | build_all_content () const |
| Builds combined content of header and source. More... | |
| bool | contains_given_pattern (const std::string &pattern) const |
| Checks whether the function contains a pattern. More... | |
Friends | |
| class | FunctionLoader |
Represents a function extracted from a codebase.
Provides access to function source content, header content, file location, and metadata.
Definition at line 45 of file function.hpp.
|
default |
|
explicit |
Constructs a Function object.
| _path | Path object containing function location info |
Definition at line 13 of file function.cpp.
| std::vector< std::string > Function::build_all_content | ( | ) | const |
Builds combined content of header and source.
Definition at line 25 of file function.cpp.
| bool Function::contains_given_pattern | ( | const std::string & | pattern | ) | const |
Checks whether the function contains a pattern.
| Text | pattern to search. |
Definition at line 41 of file function.cpp.
| const std::vector< std::string > & Function::header | ( | ) | const |
Gets the function's header content.
Definition at line 21 of file function.cpp.
| const std::string & Function::name | ( | ) | const |
| const Path & Function::path | ( | ) | const |
Gets the function path information.
Definition at line 5 of file function.cpp.
| const FunctionLocation & Function::scope_location | ( | ) | const |
Gets the function location inside the source file.
Contains declaration, begin, and end line numbers.
Definition at line 17 of file function.cpp.
|
friend |
Definition at line 46 of file function.hpp.