thibaultmarin / hpp2plantuml

Convert C++ header files to PlantUML
MIT License
223 stars 35 forks source link

Do not handle nest namespace correctly #22

Closed superxcgm closed 2 years ago

superxcgm commented 2 years ago

Demo

namespace a::b::c {
  class A {
  public:
    void foo();
  };
}

namespace a::b {
  class B{
  public:
    void bar();
  };
}

Currently it generate:

@startuml
/' Objects '/
namespace a {
    namespace b {
        class B {
            +bar() : void
        }

        namespace c {
            class A {
                +foo() : void
            }
        }
    }
}

namespace a {
    namespace b {
        class B {
            +bar() : void
        }

        namespace c {
            class A {
                +foo() : void
            }
        }
    }
}
/' Inheritance relationships '/
/' Aggregation relationships '/
/' Nested objects '/
@enduml

As you can see, hpp2plantuml generate duplicate text. I'm using version 0.8.2.

thibaultmarin commented 2 years ago

Thanks for reporting this, v0.8.3 should fix this.

superxcgm commented 2 years ago

Would you mind add relating test case for this bug?