How to create a shape looking like a template class in draw.io?

819 views Asked by At

I'm trying to represent a C++ code with an UML class diagram in the software draw.io.

Unfortunately, I didn't found a way to represent a class template.

For example, with the below code, I would like to represent a dashed rectangle containing T, at the top-right corner of the rectangle representing A.

template<class T> 
class A; 

Is it possible in draw.io and how ?

See an example here. This question already exists for Visio 2013, there.

1

There are 1 answers

1
AudioBubble On BEST ANSWER

As @qwerty_so mentioned, It seems like there is no shorcut in Draw.io to do that, but you can do it following this (quite annoying) way :

  • select a rectangle in the left panel (it will appears on the center),
  • move it at the top-right corner of your class,
  • in the column "Style" of the left panel, change line style to dashed line,
  • Enter the name of template in the rectangle.

This shows that it is probably better to choose UML modeling tool than drawing tool to do that. Modelio and Papyrus are free examples of them.