[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sun Jan 14 14:00:02 UTC 2007


SVN commit 623308 by okellogg:

findUMLObject(): Class, Interface, and Datatype are all Classifiers and are
considered equivalent.  The caller must be prepared to handle possible
mismatches among these three types.


 M  +11 -0     model_utils.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/model_utils.cpp #623307:623308
@@ -169,6 +169,17 @@
                             << name << " (seeking type: "
                             << type << ", found type: "
                             << foundType << ")" << endl;
+                        // Class, Interface, and Datatype are all Classifiers
+                        // and are considered equivalent.
+                        // The caller must be prepared to handle possible mismatches.
+                        if ((type == Uml::ot_Class ||
+                             type == Uml::ot_Interface ||
+                             type == Uml::ot_Datatype) &&
+                            (foundType == Uml::ot_Class || 
+                             foundType == Uml::ot_Interface || 
+                             foundType == Uml::ot_Datatype)) {
+                            return obj;
+                        }
                         continue;
                     }
                     return obj;




More information about the umbrello-devel mailing list