Refactored include diagram visitors

This commit is contained in:
Bartek Kryza
2022-04-11 23:39:03 +02:00
parent b1b09ab6e8
commit 98f83bc18b
8 changed files with 132 additions and 89 deletions

View File

@@ -50,6 +50,13 @@ class source_file
public:
source_file() = default;
source_file(const std::filesystem::path &p)
{
set_path(p.parent_path().string());
set_name(p.filename());
is_absolute_ = p.is_absolute();
}
void set_path(const filesystem_path &p) { path_ = p; }
void set_absolute() { is_absolute_ = true; }
@@ -70,6 +77,8 @@ public:
return (path_ | name()).to_string();
}
auto full_path() const { return path() | name(); }
void add_file(std::unique_ptr<source_file> &&f)
{
LOG_DBG("Adding source file: {}, {}", f->name(), f->full_name(true));