[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sat Oct 30 08:44:33 UTC 2004
CVS commit by okellogg:
>From Marcus Alanen (maalanen_AT_a.abo.fi):
<quote>
Note that UML 1.3 only allows one stereotype per element
(OMG formal document 00-03-01, section 2.6.2), whereas UML 1.4 allows
several (OMG 01-09-76). Also, the ".stereotype" in both standards is an
association, and thus does notxe denote composition. So in UML 1.3 it
should look something like this:
<UML:Model>
<UML:Namespace.ownedElement>
<UML:Stereotype visibility="public" xmi.id="e2" .../>
<UML:Stereotype visibility="public" xmi.id="e3" .../>
...
<UML:Class xmi.id="e4" stereotype="e2">
</UML:Class>
</UML:namespace.ownedElement>
</UML:Model>
</quote>
M +5 -7 umldoc.cpp 1.194
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.193:1.194
@@ -1681,14 +1681,12 @@ void UMLDoc::saveToXMI(QIODevice& file)
QDomElement objectsElement = doc.createElement( "UML:Model" );
+ QDomElement ownedNS = doc.createElement( "UML:Namespace.ownedElement" );
+
// Save stereotypes and toplevel datatypes first so that upon loading
// they are known first.
- if (m_stereoList.count()) {
- QDomElement stElem = doc.createElement("UML:ModelElement.stereotype");
for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) {
- s->saveToXMI(doc, stElem);
- }
- objectsElement.appendChild( stElem );
+ s->saveToXMI(doc, ownedNS);
}
- QDomElement ownedNS = doc.createElement( "UML:Namespace.ownedElement" );
+
for (UMLObjectListIt oit(m_objectList); oit.current(); ++oit) {
UMLObject *o = oit.current();
More information about the umbrello-devel
mailing list