[Uml-devel] kdesdk/umbrello/umbrello/codegenerators

Brian Thomas thomas at mail630.gsfc.nasa.gov
Fri Nov 14 13:35:18 UTC 2003


CVS commit by thomas: 

bug fix: code operations dont appear in source document when parent is interface or abstract


  M +9 -0      cppsourcecodeoperation.cpp   1.9


--- kdesdk/umbrello/umbrello/codegenerators/cppsourcecodeoperation.cpp  #1.8:1.9
@@ -42,4 +42,5 @@ void CPPSourceCodeOperation::updateMetho
         UMLClassifier * c = doc->getParentClassifier();
         UMLOperation * o = getParentOperation();
+        bool isInterface = doc->parentIsInterface();
 
         // first, the comment on the operation
@@ -70,4 +71,12 @@ void CPPSourceCodeOperation::updateMetho
         QString startText = returnType + " " + className + "::" + methodName + " ("+paramStr+") {";
         setStartMethodText(startText);
+
+        // Only write this out if its a child of an interface OR is abstract.
+        if(isInterface || o->getAbstract())
+        {
+                setWriteOutText(false);
+        } else {
+                setWriteOutText(true);
+        }
 
 }






More information about the umbrello-devel mailing list