[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Tue Dec 7 23:16:01 UTC 2004
CVS commit by okellogg:
findObjectInList(): Inspect role IDs of association.
M +13 -0 model_utils.cpp 1.11
--- kdesdk/umbrello/umbrello/model_utils.cpp #1.10:1.11
@@ -26,4 +26,6 @@
#include "package.h"
#include "classifier.h"
+#include "association.h"
+#include "umlrole.h"
#include "umldoc.h"
#include "uml.h"
@@ -72,4 +74,15 @@ UMLObject * findObjectInList(Uml::IDType
return o;
break;
+ case Uml::ot_Association:
+ {
+ UMLAssociation *assoc = (UMLAssociation*)obj;
+ UMLRole *rA = assoc->getUMLRole(Uml::A);
+ if (rA->getID() == id)
+ return rA;
+ UMLRole *rB = assoc->getUMLRole(Uml::B);
+ if (rB->getID() == id)
+ return rB;
+ }
+ break;
default:
break;
More information about the umbrello-devel
mailing list