Bug 89167 - support for utility classes
Summary: support for utility classes
Status: CONFIRMED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-09 15:03 UTC by Oliver Kellogg
Modified: 2009-03-05 14:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Kellogg 2004-09-09 15:03:29 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

A class with the stereotype <<utility>> might be generated as a package without a tagged type in Ada.
Comment 1 Oliver Kellogg 2005-01-20 17:48:24 UTC
> A class with the stereotype <<utility>> might be generated as a package
> without a tagged type in Ada.

Or as a namespace with plain (non class-member) operations, for that matter.
I'm not sure though whether the UML standard blesses such a mapping.
Comment 2 Oliver Kellogg 2009-03-05 14:05:14 UTC
Import could be done using the following rules:

Ada package without any subprograms
            => UML package
Ada package with subprograms which are all primitive operations of tagged types
            => UML package
Ada package with subprogram(s) which are non primitive on a tagged type
            => UML class with stereotype <<utility>>

Using a fixed set of rules implies that code may be generated different from its imported form.
For example, according to the above rules, an Ada package containing several tagged types would be imported as a UML package with nested classes. However, on generating Ada code from the UML, the nested classes would be generated as child packages.

The best solution would certainly be to allow the user to specify the mapping per Ada package (choose between UML package and utility class on import) but that is difficult to implement.