[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Jul 30 14:49:01 UTC 2004
CVS commit by okellogg:
As per the XMI 1.2 standard, the enum tags should be <UML:Enumeration>
and <UML:EnumerationLiteral>.
M +3 -2 enum.cpp 1.9
M +1 -1 enumliteral.cpp 1.5
M +4 -3 umldoc.cpp 1.173
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.172:1.173
@@ -2196,8 +2196,9 @@ UMLObject* UMLDoc::makeNewUMLObject(QStr
} else if (tagEq(type, "Interface")) {
pObject = new UMLInterface();
- } else if (tagEq(type, "Datatype") // for bkwd compat.
- || tagEq(type, "DataType")) {
+ } else if (tagEq(type, "DataType")
+ || tagEq(type, "Datatype")) { // for bkwd compat.
pObject = new UMLDatatype();
- } else if (tagEq(type, "Enum")) {
+ } else if (tagEq(type, "Enumeration") ||
+ tagEq(type, "Enum")) { // for bkwd compat.
pObject = new UMLEnum();
} else if (tagEq(type, "Association")) {
--- kdesdk/umbrello/umbrello/enum.cpp #1.8:1.9
@@ -67,5 +67,5 @@ QString UMLEnum::uniqChildName(UMLObject
////////////////////////////////////////////////////////////////////////////////////////////////////
void UMLEnum::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement enumElement = UMLObject::save("UML:Enum", qDoc);
+ QDomElement enumElement = UMLObject::save("UML:Enumeration", qDoc);
//save operations
UMLClassifierListItem* pEnumLiteral = 0;
@@ -82,5 +82,6 @@ bool UMLEnum::load(QDomElement& element)
while( !tempElement.isNull() ) {
QString tag = tempElement.tagName();
- if (tagEq(tag, "EnumLiteral")) {
+ if (tagEq(tag, "EnumerationLiteral") ||
+ tagEq(tag, "EnumLiteral")) { // for backward compatibility
UMLEnumLiteral* pEnumLiteral = new UMLEnumLiteral(this);
if( !pEnumLiteral->loadFromXMI(tempElement) ) {
--- kdesdk/umbrello/umbrello/enumliteral.cpp #1.4:1.5
@@ -54,5 +54,5 @@ QString UMLEnumLiteral::toString(Signatu
void UMLEnumLiteral::saveToXMI(QDomDocument& qDoc, QDomElement& qElement) {
- QDomElement attributeElement = UMLObject::save("UML:EnumLiteral", qDoc);
+ QDomElement attributeElement = UMLObject::save("UML:EnumerationLiteral", qDoc);
qElement.appendChild( attributeElement );
}
More information about the umbrello-devel
mailing list