[Uml-devel] kdesdk/umbrello/umbrello
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Thu Sep 11 10:10:42 UTC 2003
CVS commit by thomas:
make association use the ID attribute rather than the extraneous Id attribute which has been removed
M +16 -5 association.cpp 1.14
--- kdesdk/umbrello/umbrello/association.cpp #1.13:1.14
@@ -10,4 +10,5 @@
#include <kdebug.h>
+#include <iostream.h>
#include "association.h"
#include "classifier.h"
@@ -21,5 +22,7 @@ const unsigned UMLAssociation::nAssocTyp
// constructor
-UMLAssociation::UMLAssociation(UMLDoc* parent) : UMLObject((UMLObject *)parent) {
+UMLAssociation::UMLAssociation(UMLDoc* parent)
+ : UMLObject((UMLObject *)parent)
+{
init();
}
@@ -102,4 +105,10 @@ bool UMLAssociation::saveToXMI( QDomDocu
associationElement.setAttribute( "changeabilitya", getChangeabilityA() );
associationElement.setAttribute( "changeabilityb", getChangeabilityB() );
+/*
+// the future...
+ getUMLRoleA()->saveToXMI (doc, associationElement);
+ getUMLRoleB()->saveToXMI (doc, associationElement);
+*/
+
qElement.appendChild( associationElement );
return status;
@@ -159,9 +168,9 @@ UMLObject* UMLAssociation::getObjectB()
int UMLAssociation::getRoleAId() const {
- return m_pRoleA->getId();
+ return m_pRoleA->getID();
}
int UMLAssociation::getRoleBId() const {
- return m_pRoleB->getId();
+ return m_pRoleB->getID();
}
@@ -220,9 +229,9 @@ void UMLAssociation::setAssocType(Uml::A
void UMLAssociation::setRoleAId (int roleA) {
- m_pRoleA->setId(roleA);
+ m_pRoleA->setID(roleA);
}
void UMLAssociation::setRoleBId(int roleB) {
- m_pRoleB->setId(roleB);
+ m_pRoleB->setID(roleB);
}
@@ -315,4 +324,6 @@ void UMLAssociation::init() {
m_pRoleA = new UMLRole (this);
m_pRoleB = new UMLRole (this);
+
+cerr<<" NEW ROLE ID A: "<<m_pRoleA->getID()<<endl;
/*
More information about the umbrello-devel
mailing list