[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Dec 19 11:43:00 UTC 2004
CVS commit by okellogg:
addAssocToConcepts(): Use UMLAssociation::assocTypeHasUMLRepresentation().
M +6 -21 umldoc.cpp 1.217
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.216:1.217
@@ -1389,5 +1389,4 @@ UMLAssociation* UMLDoc::createUMLAssocia
}
-////////////////////////////////////////////////////////////////////////////////////////////////////
void UMLDoc::addAssociation(UMLAssociation *Assoc)
{
@@ -1428,7 +1427,8 @@ void UMLDoc::addAssociation(UMLAssociati
setModified(true);
}
-////////////////////////////////////////////////////////////////////////////////////////////////////
-void UMLDoc::addAssocToConcepts(UMLAssociation* a) {
+void UMLDoc::addAssocToConcepts(UMLAssociation* a) {
+ if (! UMLAssociation::assocTypeHasUMLRepresentation(a->getAssocType()) )
+ return;
Uml::IDType AId = a->getObjectId(Uml::A);
Uml::IDType BId = a->getObjectId(Uml::B);
@@ -1436,24 +1436,9 @@ void UMLDoc::addAssocToConcepts(UMLAssoc
for (UMLClassifierListIt it(concepts); it.current(); ++it) {
UMLClassifier *c = it.current();
- switch (a->getAssocType()) {
- // for the next cases should add association to all classes involved
- // in the interaction.
- case Uml::at_Generalization:
- case Uml::at_Realization:
- case Uml::at_Association:
- case Uml::at_Association_Self:
- case Uml::at_UniAssociation:
- case Uml::at_Aggregation:
- case Uml::at_Relationship:
- case Uml::at_Composition:
if (AId == c->getID() || (BId == c->getID()))
c->addAssociation(a);
- break;
- default: // We don't support any other associations for the moment
- break;
- }
}
}
-////////////////////////////////////////////////////////////////////////////////////////////////////
+
QString UMLDoc::uniqViewName(const Diagram_Type type) {
QString dname;
More information about the umbrello-devel
mailing list