hpp2plantuml
hpp2plantuml copied to clipboard
Support for template signatures
Given this header:
template<
typename Key,
typename Value,
typename CacheStrategy = CacheStrategy::LeastRecentlyUsed<Key>
>
class Cache
{};
I get this result:
@startuml
class Cache <template<typename Key, typename Value, typename CacheStrategy=CacheStrategy::LeastRecentlyUsed<Key>>> {
}
@enduml
This is rendered as:
I would have expected something more formal UML, like here. I.e., I would expect something like:
@startuml
class Cache <Key, Value, CacheStrategy>{
}
@enduml
I'm not sure what to do about the default value for template arguments.
Unfortunately, the parser returns the template specification as a string. Since this package does not have the ambition to parse c++ code, this is unlikely to get fixed until the parser returns a shortened template specification or the parsing library is changed (for instance to libclang, which offers a displayname
property matching your desired output).
I can't give an estimate of when that may happen, but I will keep this in mind, thanks.