Fixed class visitor continuation after inner class
This commit is contained in:
@@ -186,6 +186,7 @@ static enum CXChildVisitResult class_visitor(
|
|||||||
|
|
||||||
ctx->ctx->d.classes.emplace_back(std::move(c));
|
ctx->ctx->d.classes.emplace_back(std::move(c));
|
||||||
});
|
});
|
||||||
|
ret = CXChildVisit_Continue;
|
||||||
break;
|
break;
|
||||||
case CXCursor_EnumDecl:
|
case CXCursor_EnumDecl:
|
||||||
if (!config.should_include(cursor.fully_qualified())) {
|
if (!config.should_include(cursor.fully_qualified())) {
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ std::vector<std::string> split(std::string str, std::string delimiter)
|
|||||||
std::string ns_relative(
|
std::string ns_relative(
|
||||||
const std::vector<std::string> &namespaces, const std::string &n)
|
const std::vector<std::string> &namespaces, const std::string &n)
|
||||||
{
|
{
|
||||||
for (const auto &ns : namespaces) {
|
std::vector<std::string> namespaces_sorted{namespaces};
|
||||||
|
|
||||||
|
std::sort(namespaces_sorted.rbegin(), namespaces_sorted.rend());
|
||||||
|
|
||||||
|
for (const auto &ns : namespaces_sorted) {
|
||||||
if (ns.empty())
|
if (ns.empty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ diagrams:
|
|||||||
glob:
|
glob:
|
||||||
- ../../tests/t00004/t00004.cc
|
- ../../tests/t00004/t00004.cc
|
||||||
using_namespace:
|
using_namespace:
|
||||||
- clanguml::t00004::A::AA
|
|
||||||
- clanguml::t00004::A
|
|
||||||
- clanguml::t00004
|
- clanguml::t00004
|
||||||
|
- clanguml::t00004::A
|
||||||
|
- clanguml::t00004::A::AA
|
||||||
include:
|
include:
|
||||||
namespaces:
|
namespaces:
|
||||||
- clanguml::t00004
|
- clanguml::t00004
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ namespace t00004 {
|
|||||||
|
|
||||||
class A {
|
class A {
|
||||||
public:
|
public:
|
||||||
|
void foo() const {}
|
||||||
|
|
||||||
class AA {
|
class AA {
|
||||||
public:
|
public:
|
||||||
enum class Lights { Green, Yellow, Red };
|
enum class Lights { Green, Yellow, Red };
|
||||||
@@ -11,7 +13,7 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
void foo() const {}
|
void foo2() const {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,6 +258,8 @@ TEST_CASE("Test t00004", "[unit-test]")
|
|||||||
REQUIRE_THAT(puml, Contains("A +-- AA"));
|
REQUIRE_THAT(puml, Contains("A +-- AA"));
|
||||||
REQUIRE_THAT(puml, Contains("AA +-- AAA"));
|
REQUIRE_THAT(puml, Contains("AA +-- AAA"));
|
||||||
REQUIRE_THAT(puml, Contains("AA +-- Lights"));
|
REQUIRE_THAT(puml, Contains("AA +-- Lights"));
|
||||||
|
REQUIRE_THAT(puml, Contains("+ foo() const"));
|
||||||
|
REQUIRE_THAT(puml, Contains("+ foo2() const"));
|
||||||
|
|
||||||
save_puml(
|
save_puml(
|
||||||
"./" + config.output_directory + "/" + diagram->name + ".puml", puml);
|
"./" + config.output_directory + "/" + diagram->name + ".puml", puml);
|
||||||
|
|||||||
Reference in New Issue
Block a user