thibaultmarin / hpp2plantuml

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

Enums are not connected to classes which hold them #11

Closed DavidRisch closed 3 years ago

DavidRisch commented 3 years ago

The relationship between enums and classes which have an attribute of their type is not present in the output. I am not sure if this is intentional, if it is some kind of flag to enable this feature would be nice.

Minimal example:

echo '
enum ExampleEnum{
  A, B
};

class ExampleClass {
 public:
  ExampleEnum enum_attr;
};
' >  Example.h
hpp2plantuml -i Example.h -o hpp2plantuml
cat hpp2plantuml

Output (whitespace modified):

hpp2plantuml 0.7.1
@startuml
/' Objects '/
class ExampleClass {
    +enum_attr : ExampleEnum
}

enum ExampleEnum {
    A
    B
}

/' Inheritance relationships '/

/' Aggregation relationships '/

@enduml

Expected result: An additional line under Aggregation relationships: ExampleClass *-- ExampleEnum

thibaultmarin commented 3 years ago

Thanks for the report, v0.8 should fix this (among other things)

DavidRisch commented 3 years ago

I can confirm this now work with version 0.8.0 . Thanks!