[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport

Oliver Kellogg okellogg at users.sourceforge.net
Sat Feb 3 20:41:28 UTC 2007


SVN commit 629813 by okellogg:

addEnumLiteral(): Add optional arg for documentation text

 M  +3 -2      import_utils.cpp  
 M  +2 -1      import_utils.h  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/import_utils.cpp #629812:629813
@@ -344,8 +344,9 @@
     return attr;
 }
 
-void addEnumLiteral(UMLEnum *enumType, const QString &literal) {
-    enumType->addEnumLiteral( literal );
+void addEnumLiteral(UMLEnum *enumType, const QString &literal, const QString &comment) {
+    UMLObject *el = enumType->addEnumLiteral(literal);
+    el->setDoc(comment);
 }
 
 void createGeneralization(UMLClassifier *child, UMLClassifier *parent) {
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/import_utils.h #629812:629813
@@ -107,7 +107,8 @@
     /**
      * Add an enum literal to an UMLEnum.
      */
-    void addEnumLiteral(UMLEnum *enumType, const QString &literal);
+    void addEnumLiteral(UMLEnum *enumType, const QString &literal,
+                        const QString &comment = QString());
 
     /**
      * Create a generalization from the given child classifier to the given




More information about the umbrello-devel mailing list