[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Wed Dec 29 12:34:01 UTC 2004


CVS commit by okellogg: 

findTemplate(): New.
getTemplateList(): Renamed from getFilteredTemplateList().


  M +10 -1     classifier.cpp   1.63
  M +7 -2      classifier.h   1.45


--- kdesdk/umbrello/umbrello/classifier.cpp  #1.62:1.63
@@ -396,4 +396,13 @@ UMLTemplate* UMLClassifier::takeTemplate
 }
 
+UMLTemplate *UMLClassifier::findTemplate(QString name) {
+        UMLTemplateList templParams = getTemplateList();
+        for (UMLTemplate *t = templParams.first(); t; t = templParams.next()) {
+                if (t->getName() == name)
+                        return t;
+        }
+        return NULL;
+}
+
 int UMLClassifier::templates() {
         UMLClassifierListItemList tempList = getFilteredList(Uml::ot_Template);
@@ -401,5 +410,5 @@ int UMLClassifier::templates() {
 }
 
-UMLTemplateList UMLClassifier::getFilteredTemplateList() {
+UMLTemplateList UMLClassifier::getTemplateList() {
         UMLTemplateList templateList;
         for (UMLClassifierListItemListIt lit(m_List); lit.current(); ++lit) {

--- kdesdk/umbrello/umbrello/classifier.h  #1.44:1.45
@@ -194,5 +194,5 @@ public:
 
         /**
-         * Take and return a templatee from class.
+         * Take and return a template parameter from class.
          * It is the callers responsibility to pass on ownership of
          * the returned template (or to delete the template)
@@ -204,4 +204,9 @@ public:
 
         /**
+         * Seeks the template parameter of the given name.
+         */
+        UMLTemplate *findTemplate(QString name);
+
+        /**
          * Returns the number of templates for the class.
          *
@@ -217,5 +222,5 @@ public:
          * @return      Pointer to the list of true templates for the class.
          */
-        UMLTemplateList getFilteredTemplateList();
+        UMLTemplateList getTemplateList();
 
 






More information about the umbrello-devel mailing list