[Uml-devel] serialization, properties and feature priorities

Andrew Sutton ansutton at kent.edu
Thu Oct 17 05:34:03 UTC 2002


On Thursday 17 October 2002 08:03 am, tomas.walch at se.transport.bombardier.com 
wrote:
> Hi!
>
> I think it would be a really good idea to take advantage of Qt Properties
> for the UML objects. Then if someone adds a property to a class the
> serialization methods don't have to be rewritten since they can be made to
> ask the Meta object-system for the properties. I guess you'd really only
> need one serialization method as a matter of fact, and the same is true for
> saving to XMI as well. Iit won't work for the binary file format but I'm
> thinking by the time (2.x?) we get around to writing all these
> Q_PROPERTY-macros that support is no longer necessary. Another nice aspect
> of using qt properties is that a generic interface for manipulating all
> kinds of UML objects' properties will be easy to implement (like for
> widgets in Qt Designer, that window can actually be re-used). Qt
> parent-child relations between the UML objects is also more flexible than
> todays implementation. All in all something for a new object model.

unfortunately, this isn't quite enough. each uml attribute can potentially 
have two different interfaces - single and multiple. The single stuff has 
methods like get(), set(), unset(). and the multiple attributes have the same 
plus add(), modify() and remove(). If the attribute is ordered, it also has 
an addBefore().

the same goes for relationships except they're a little more complicated 
because you'd like to ensure that detaching one object from a relationship 
detaches the other object as well.

if we wanted to do this, we'd need to extend Qt's property model to include 
unset() capabilities, multiple properties and ordered properties. And 
relationships (just for fun).

its still a good idea. i'm going to look into what it would take.

andy




More information about the umbrello-devel mailing list