[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Fri Feb 18 13:32:38 UTC 2005


CVS commit by okellogg: 

scan(): Compress sequence or bounded string into word.
parseFile(): Handle IDL typedef (rudimentarily for now.)


  M +14 -2     idlimport.cpp   1.9


--- kdesdk/umbrello/umbrello/idlimport.cpp  #1.8:1.9
@@ -138,11 +138,18 @@ void scan(QString line) {
                         continue;
                 QString word;
-                for (uint i = 0; i < tmp.length(); i++) {
+                const uint len = tmp.length();
+                for (uint i = 0; i < len; i++) {
                         QChar c = tmp[i];
                         if (c.isLetterOrNumber() || c == '_') {
                                 word += c;
                         } else if (c == ':' && tmp[i + 1] == ':') {
+                                // compress scoped name into word
                                 word += "::";
                                 i++;
+                        } else if (c == '<') {
+                                // compress sequence or bounded string into word
+                                do {
+                                        word += tmp[i];
+                                } while (tmp[i] != '>' && ++i < len);
                         } else {
                                 if (!word.isEmpty()) {
@@ -271,5 +278,10 @@ void parseFile(QString filename) {
                 }
                 if (keyword == "typedef") {
-                        skipStmt();  // TBD.
+                        const QString& existingType = source[++srcIndex];
+                        const QString& newType = source[++srcIndex];
+                        importer->createUMLObject(Uml::ot_Class, newType, scope[scopeIndex],
+                                                  comment, "CORBATypedef" /* stereotype */);
+                        // @todo How do we convey the existingType ?
+                        skipStmt();
                         continue;
                 }






More information about the umbrello-devel mailing list