ArKanjo 0.5.1
A tool for find code duplicated functions in codebases
path.cpp
Go to the documentation of this file.
2
3Path::Path(const fs::path& _path) {
4 resource_path = _path;
5}
6
7const fs::path& Path::value() const {
8 return resource_path;
9}
10
11bool Path::empty() const {
12 return resource_path.empty();
13}
14
15fs::path Path::relative_path() const {
16 return resource_path.parent_path();
17}
18
19bool Path::operator<(const Path& path) const {
20 return resource_path < path.resource_path;
21}
22
23bool Path::operator!=(const Path& path) const {
24 return resource_path != path.resource_path;
25}
26
27bool Path::operator==(const Path& path) const {
28 return resource_path == path.resource_path;
29}
Represents a logical path to a function in the codebase.
Definition: path.hpp:26
bool operator!=(const Path &path) const
Definition: path.cpp:23
fs::path relative_path() const
Gets the directory portion of the path.
Definition: path.cpp:15
Path()=default
Default constructor.
bool empty() const
Checks if path is empty.
Definition: path.cpp:11
const fs::path & value() const
Gets the underlying filesystem path.
Definition: path.cpp:7
bool operator<(const Path &path) const
Path comparison operator.
Definition: path.cpp:19
bool operator==(const Path &path) const
Definition: path.cpp:27
Logical path abstraction for source code elements.