ArKanjo 0.5.1
A tool for find code duplicated functions in codebases
Path Class Reference

Represents a logical path to a function in the codebase. More...

#include <path.hpp>

Public Member Functions

 Path ()=default
 Default constructor. More...
 
 Path (const fs::path &path)
 Constructs from path string. More...
 
const fs::path & value () const
 Gets the underlying filesystem path. More...
 
bool empty () const
 Checks if path is empty. More...
 
fs::path relative_path () const
 Gets the directory portion of the path. More...
 
bool operator< (const Path &path) const
 Path comparison operator. More...
 
bool operator!= (const Path &path) const
 
bool operator== (const Path &path) const
 

Detailed Description

Represents a logical path to a function in the codebase.

Provides path analysis and manipulation utilities without performing filesystem operations.

Definition at line 26 of file path.hpp.

Constructor & Destructor Documentation

◆ Path() [1/2]

Path::Path ( )
default

Default constructor.

◆ Path() [2/2]

Path::Path ( const fs::path &  path)
explicit

Constructs from path string.

Parameters
pathPath to parse

Definition at line 3 of file path.cpp.

Member Function Documentation

◆ empty()

bool Path::empty ( ) const

Checks if path is empty.

Returns
True if no path components

Definition at line 11 of file path.cpp.

◆ operator!=()

bool Path::operator!= ( const Path &  path) const

Definition at line 23 of file path.cpp.

◆ operator<()

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

Path comparison operator.

Parameters
Otherpath to compare
Returns
True if this path is ordered first

Definition at line 19 of file path.cpp.

◆ operator==()

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

Definition at line 27 of file path.cpp.

◆ relative_path()

fs::path Path::relative_path ( ) const

Gets the directory portion of the path.

Returns
Path containing the parent directory.

Definition at line 15 of file path.cpp.

◆ value()

const fs::path & Path::value ( ) const

Gets the underlying filesystem path.

Returns
Original path represented by this object.

Definition at line 7 of file path.cpp.


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