thibaultmarin / hpp2plantuml

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

Class enumerator is not connecting #27

Closed JacobNoergaard closed 1 year ago

JacobNoergaard commented 1 year ago

When creating an enumerator in a class it is not connecting correctly in the final diagram. An example is shown below.

class TestClass{
    int var1 = 10;
    int var2 = 10;

    void method1(int a, float b);
    void method2();

    enum class EnumTest{
        e_test1,
        e_test2
    };
};

This results in the following puml code. Is seems like the added "." in front of TestClass::EnumTest is making the arrow point back to "TestClass" instead of the enumerator. By removing the "." the enumerator is pointing correctly.

@startuml
/' Objects '/
class TestClass {
    -var1 : int
    -var2 : int
    -method1(int a, float b) : void
    -method2() : void
}

enum TestClass::EnumTest {
    e_test1
    e_test2
}
/' Inheritance relationships '/
/' Aggregation relationships '/
/' Nested objects '/
.TestClass +-- .TestClass::EnumTest
@enduml

enum

thibaultmarin commented 1 year ago

This seems fixed by the merge of #28. Thanks.