[Uml-devel] kdesdk/umbrello/umbrello
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Sun Sep 28 14:42:08 UTC 2003
CVS commit by thomas:
bug fix: getParentAssociation fixed, now cache parent association pointer since inheritance was changed
M +2 -2 umlrole.cpp 1.8
M +4 -2 umlrole.h 1.5
--- kdesdk/umbrello/umbrello/umlrole.h #1.4:1.5
@@ -141,5 +141,5 @@ public:
// bool loadFromXMI(QDomElement& element);
-protected:
+private:
/** do some initialization at construction time */
@@ -148,4 +148,5 @@ protected:
QString m_Doc;
UMLObject* m_pObject;
+ UMLAssociation * m_pAssoc;
QString m_Name;
QString m_Multi;
--- kdesdk/umbrello/umbrello/umlrole.cpp #1.7:1.8
@@ -32,6 +32,5 @@ bool UMLRole::operator==(UMLRole &rhs) {
UMLAssociation * UMLRole::getParentAssociation () {
- UMLAssociation * assoc = dynamic_cast<UMLAssociation*>(this->parent());
- return assoc;
+ return m_pAssoc;
}
@@ -122,4 +121,5 @@ void UMLRole::setDoc(QString doc) {
void UMLRole::init(UMLAssociation * parent, UMLObject * parentObj) {
+ m_pAssoc = parent;
m_pObject = parentObj;
m_Multi = "";
More information about the umbrello-devel
mailing list