[Uml-devel] [Bug 109909] New: python code generation missing class attributes, init code.

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Jul 31 03:19:56 UTC 2005

On Saturday 30 July 2005 21:15, Charles Phoenix wrote:
> an option? to include getters and setter functions for protected and
> private attributes. It is closer to pure OOP and allows for better
> transition to another OOP language. e.g., python prototyping -> CPP
That's an interesting comment. I implemented the ruby code generation without 
having a particular use in mind personally, but you could use ruby to do 
prototyping, and then move to C++, in the same way as python. The ruby code 
generator converts C++ types to ruby ones, which are only used for RDOC 
comments when the Umbrello comment text for a parameter is missing. C++ doc 
comments like @param and @return are converted to ruby format.

So my question is - Should C++ types and commenting style be the 'lingua 
franca' for Umbrello, and code for different target languages could always be 
generated from that? 

If the comments are already in RDOC format the ruby code generator will just 
pass them through unchanged, so you can use either C++ doc comments and ruby 
ones. I didn't add a custom types for ruby such as 'Integer' instead of 
long/int/short or 'Float' instead of float/double and 'String' instead of 
string - I wasn't sure what to do about that. I only adds new types, and you 
can't remove C++ types at present - I thought it was confusing to have both.

-- Richard

More information about the umbrello-devel mailing list