Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
Path Class Reference

Path manipulation class for tool-specific directory structure. More...

#include <path.hpp>

Public Member Functions

bool is_empty ()
 Checks if path is empty.
 
 Path ()
 Default constructor.
 
 Path (string string_path)
 Constructs from path string.
 
string build_source_path ()
 Builds source file path.
 
string build_header_path ()
 Builds header file path.
 
string build_info_path ()
 Builds metadata file path.
 
string build_relative_path ()
 Builds relative path portion.
 
string build_function_name ()
 Extracts function name from path.
 
vector< string > get_common_folders (Path path)
 Finds common folders with another path.
 
bool contains_given_pattern (string pattern)
 Checks for pattern in path.
 
bool operator< (const Path &path) const
 Path comparison operator.
 

Detailed Description

Path manipulation class for tool-specific directory structure.

Manages paths to source files, headers, and metadata in the temporary codebase. Provides methods for path construction and analysis without file I/O.

Definition at line 27 of file path.hpp.

Constructor & Destructor Documentation

◆ Path() [1/2]

Path::Path ( )

Default constructor.

Definition at line 37 of file path.cpp.

◆ Path() [2/2]

Path::Path ( string string_path)

Constructs from path string.

Parameters
string_pathPath to parse

Definition at line 40 of file path.cpp.

Member Function Documentation

◆ build_function_name()

string Path::build_function_name ( )

Extracts function name from path.

Returns
string Function name without extension

Definition at line 121 of file path.cpp.

◆ build_header_path()

string Path::build_header_path ( )

Builds header file path.

Returns
string Path to header file

Definition at line 72 of file path.cpp.

◆ build_info_path()

string Path::build_info_path ( )

Builds metadata file path.

Returns
string Path to JSON metadata file

Definition at line 76 of file path.cpp.

◆ build_relative_path()

string Path::build_relative_path ( )

Builds relative path portion.

Returns
string Relative path

Definition at line 112 of file path.cpp.

◆ build_source_path()

string Path::build_source_path ( )

Builds source file path.

Returns
string Path to source file

Definition at line 68 of file path.cpp.

◆ contains_given_pattern()

bool Path::contains_given_pattern ( string pattern)

Checks for pattern in path.

Parameters
patternPattern to search for
Returns
bool True if pattern found

Definition at line 151 of file path.cpp.

◆ get_common_folders()

vector< string > Path::get_common_folders ( Path path)

Finds common folders with another path.

Parameters
pathOther path to compare
Returns
vector<string> Common base folders

Definition at line 130 of file path.cpp.

◆ is_empty()

bool Path::is_empty ( )

Checks if path is empty.

Returns
bool True if no path components

Definition at line 33 of file path.cpp.

◆ operator<()

bool Path::operator< ( const Path & path) const

Path comparison operator.

Parameters
pathOther path to compare
Returns
bool True if this path is ordered first

Definition at line 147 of file path.cpp.


The documentation for this class was generated from the following files: