Added support for C++20 module based packages in class diagrams (#101)

This commit is contained in:
Bartek Kryza
2023-12-18 21:55:18 +01:00
parent ea6892f754
commit c51ae5b6ee
24 changed files with 296 additions and 12 deletions

View File

@@ -292,7 +292,8 @@ modules_filter::modules_filter(
{
}
tvl::value_t modules_filter::match(const diagram &d, const element &e) const
tvl::value_t modules_filter::match(
const diagram & /*d*/, const element &e) const
{
if (modules_.empty())
return {};
@@ -300,7 +301,7 @@ tvl::value_t modules_filter::match(const diagram &d, const element &e) const
if (!e.module().has_value())
return {false};
const auto module_toks = util::split(e.module().value(), ".");
const auto module_toks = util::split(e.module().value(), "."); // NOLINT
auto result = tvl::any_of(modules_.begin(), modules_.end(),
[&e, &module_toks](const auto &modit) {

View File

@@ -32,8 +32,9 @@ namespace clanguml::common::model {
* a nested set of namespaces or nested set of directories.
*/
enum class path_type {
kNamespace, /*!< Namespace path */
kFilesystem /*!< Filesystem path */
kNamespace, /*!< Namespace path */
kFilesystem, /*!< Filesystem path */
kModule /*!< Module path */
};
/**
@@ -54,6 +55,8 @@ class path {
switch (path_type_) {
case path_type::kNamespace:
return "::";
case path_type::kModule:
return ".";
case path_type::kFilesystem:
#ifdef _WIN32
return "\\";