Fixed glob resolution with multiple threads
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "glob/glob.hpp"
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
@@ -101,6 +102,22 @@ void inheritable_diagram_options::inherit(
|
||||
relative_to.override(parent.relative_to);
|
||||
}
|
||||
|
||||
std::vector<std::string> diagram::get_translation_units(
|
||||
const std::filesystem::path &root_directory) const
|
||||
{
|
||||
std::vector<std::string> translation_units{};
|
||||
|
||||
for (const auto &g : glob()) {
|
||||
const auto matches = glob::glob(g, root_directory);
|
||||
for (const auto &match : matches) {
|
||||
const auto path = root_directory / match;
|
||||
translation_units.emplace_back(path.string());
|
||||
}
|
||||
}
|
||||
|
||||
return translation_units;
|
||||
}
|
||||
|
||||
common::model::diagram_t class_diagram::type() const
|
||||
{
|
||||
return common::model::diagram_t::kClass;
|
||||
|
||||
@@ -147,6 +147,9 @@ struct diagram : public inheritable_diagram_options {
|
||||
|
||||
virtual common::model::diagram_t type() const = 0;
|
||||
|
||||
std::vector<std::string> get_translation_units(
|
||||
const std::filesystem::path &root_directory) const;
|
||||
|
||||
std::string name;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user