[Uml-devel] An issue with void operations in c++

520012863826-0001 at T-Online.de 520012863826-0001 at T-Online.de
Fri Jul 15 07:00:59 UTC 2005

"Paulo Sehn" <paulo.sehn at gmail.com> wrote:
> [...]
> this line  if (m_pSecondary->getName() != "void") is explicity
> converting the void operation in an operation without return type. If
> I comment this line, I get the behavior I'm expecting to c++ code
> generation and I can create operations whitout returning type (i.e.
> c++ constructors).
> So, I would like to suggest the removal of the if I've describe above,
> and I would like to know other comments about this issue.

There was some uncertainty about the handling of "void"
because it's a language specific keyword. Also, it is possible
to type in an operation just leaving away the return type.

Therefore, IMHO really two fixes are required:
1) The C++ generator should be able to handle a non-existent return type.
2) The other code generators should be checked that they handle
   "void" as non-existent return type.

Anyway, I made the change to UMLOperation::saveToXMI() as you
suggested because that was not the right place to special case
the handling.

Thanks for your help,


Umbrello UML Modeller

More information about the umbrello-devel mailing list