15bool FunctionBreaker::is_c_extension(
string extension){
16 for(
auto c_extension : C_EXTENSIONS){
17 if(extension == c_extension){
24bool FunctionBreaker::is_java_extension(
string extension){
25 for(
auto java_extension : JAVA_EXTENSIONS){
26 if(extension == java_extension){
33bool FunctionBreaker::is_allowed_extension(
string extension){
34 for(
auto allowed_extension : ALLOWED_EXTENSIONS){
35 if(extension == allowed_extension){
42void FunctionBreaker::file_breaker(
string file_path,
string folder_path){
45 if(!is_allowed_extension(extension)){
49 if(is_c_extension(extension)){
52 else if(is_java_extension(extension)){
55 assert(
false &&
"NOT ALLOWED FILE PASSED");
59void FunctionBreaker::function_breaker(
string folder_path){
60 for(
const auto &dirEntry: std::filesystem::recursive_directory_iterator(folder_path)){
61 string file_path = dirEntry.path().string();
62 file_breaker(file_path,folder_path);
67 function_breaker(folder_path);
C/C++ function parser and extractor.
Java function parser and extractor.
FunctionBreaker(string folder_path)
Constructs function breaker and processes directory.
Main function extraction interface.
string extract_extension(string file_path)
Extracts file extension from path.