[Uml-devel] [Bug 109909] New: python code generation missing class attributes, init code. (fwd)
Paulo Sehn
paulo.sehn at gmail.com
Mon Aug 1 14:57:22 UTC 2005
I think that we have to follow UML as closest as possible but we also
need a way to be flexible for language specific features. As far as I
read in the bug list and another mails we could do this using
stereotypes.
Regarding the operation parameters/attributes, we could define and
document how each language generator/importer will handle these. For
c++ we could use :
if parameter is in, we are passing by copy, if it is inout could be a
reference, if it was out could be pointer.
myOp (firstParm : in int, secondParm : inout int, thirdParam : out int) : void
void myOp (int, int &, int *);
And we can associate a Stereotype to generate things like :
myOp (firstParm : in int, secondParm : inout int, thirdParam : out int) : void
<<const>> secondParm
void myOp (int, const int &, int *);
Regards,
Paulo Sehn
On 8/1/05, Oliver.Kellogg at t-online.de <Oliver.Kellogg at t-online.de> wrote:
> Richard Dale wrote:
> >
> > 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?
> >
>
> UML purists would say "no". The level of detail allowed by C++ e.g. in
> passing parameters to a method does not match up well with high level
> modeling. In fact, UML defines its own syntax for operation parameters,
> for example:
>
> myOp(firstParm : in boolean, secondParm : inout string) : float
>
> This syntax is most closely mirrored by Ada and CORBA IDL.
>
> On the other hand, certainly many people use Umbrello for importing their
> ready done C++ projects. We are then faced with the difficulty of mapping
> the very detailed C++ parameter passing mechanisms to the coarse grained
> "in", "out", and "inout" of UML.
>
> Oliver
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Uml-devel mailing list
> umbrello-devel at kde.org
> https://mail.kde.org/mailman/listinfo/umbrello-devel
>
More information about the umbrello-devel
mailing list