[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Sun Dec 12 15:39:01 UTC 2004
CVS commit by okellogg:
maybeSignalObjectCreated(): New.
M +14 -16 umlobject.cpp 1.60
M +6 -0 umlobject.h 1.48
--- kdesdk/umbrello/umbrello/umlobject.cpp #1.59:1.60
@@ -328,10 +328,16 @@ QString UMLObject::getSecondaryId() cons
}
-bool UMLObject::resolveRef() {
- UMLDoc* umldoc = UMLApp::app()->getDocument();
- if (m_pSecondary || m_SecondaryId.isEmpty()) {
+void UMLObject::maybeSignalObjectCreated() {
if (m_BaseType != Uml::ot_Stereotype &&
- m_BaseType != Uml::ot_Association && m_BaseType != Uml::ot_UMLObject)
+ m_BaseType != Uml::ot_Association &&
+ m_BaseType != Uml::ot_Role) {
+ UMLDoc* umldoc = UMLApp::app()->getDocument();
umldoc->signalUMLObjectCreated(this);
+ }
+}
+
+bool UMLObject::resolveRef() {
+ if (m_pSecondary || m_SecondaryId.isEmpty()) {
+ maybeSignalObjectCreated();
return true;
}
@@ -344,7 +350,5 @@ bool UMLObject::resolveRef() {
if (m_pSecondary) {
m_SecondaryId = "";
- if (m_BaseType != Uml::ot_Stereotype &&
- m_BaseType != Uml::ot_Association && m_BaseType != Uml::ot_UMLObject)
- umldoc->signalUMLObjectCreated(this);
+ maybeSignalObjectCreated();
return true;
}
@@ -355,7 +359,5 @@ bool UMLObject::resolveRef() {
if (m_pSecondary) {
m_SecondaryId = "";
- if (m_BaseType != Uml::ot_Stereotype &&
- m_BaseType != Uml::ot_Association && m_BaseType != Uml::ot_UMLObject)
- umldoc->signalUMLObjectCreated(this);
+ maybeSignalObjectCreated();
return true;
}
@@ -397,7 +399,5 @@ bool UMLObject::resolveRef() {
return false;
m_SecondaryId = "";
- if (m_BaseType != Uml::ot_Stereotype &&
- m_BaseType != Uml::ot_Association && m_BaseType != Uml::ot_UMLObject)
- umldoc->signalUMLObjectCreated(this);
+ maybeSignalObjectCreated();
return true;
}
@@ -413,7 +413,5 @@ bool UMLObject::resolveRef() {
}
m_SecondaryId = "";
- if (m_BaseType != Uml::ot_Stereotype &&
- m_BaseType != Uml::ot_Association && m_BaseType != Uml::ot_UMLObject)
- umldoc->signalUMLObjectCreated(this);
+ maybeSignalObjectCreated();
return true;
}
--- kdesdk/umbrello/umbrello/umlobject.h #1.47:1.48
@@ -349,4 +349,10 @@ protected:
/**
+ * Calls UMLDoc::signalUMLObjectCreated() if m_BaseType affords
+ * doing so.
+ */
+ void maybeSignalObjectCreated();
+
+ /**
* Auxiliary to loadFromXMI.
* This method is usually overridden by child classes.
More information about the umbrello-devel
mailing list