[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesdk/umbrello/umbrello/codegenerators
From:       Oliver Kellogg <okellogg () users ! sourceforge ! net>
Date:       2004-10-02 2:39:36
Message-ID: 20041002023936.541CF126DD () office ! kde ! org
[Download RAW message or body]

CVS commit by okellogg: 

Patch by Thorsten Kunz fixes code for multiple interface realization.


  M +6 -3      php5writer.cpp   1.4


--- kdesdk/umbrello/umbrello/codegenerators/php5writer.cpp  #1.3:1.4
@@ -121,8 +121,11 @@ void Php5Writer::writeClass(UMLClassifie
           if( !realizations.isEmpty()) {
             int rc = realizations.count();
+            int ri = rc;
             for (a = realizations.first(); a; a = realizations.next()) {
               UMLObject *o = m_doc->findObjectById(a->getRoleId(Uml::B));
               QString typeName = cleanName(o->getName());
-              php << m_newLineEndingChars << m_indentation << m_indentation << \
m_indentation <<  "implements " << typeName << (--rc == 0 ? "" : ","); +              \
if(ri == rc) +                php << m_newLineEndingChars << m_indentation << \
m_indentation << m_indentation <<  "implements "; +              php << typeName << \
(--rc == 0 ? "" : ", ");  }
           }
@@ -285,5 +288,4 @@ void Php5Writer::writeOperations(QString
                 php <<  m_indentation;
                 if (op->getAbstract()) php << "abstract ";
-                if (op->getStatic()) php << "static ";
                 switch(op->getScope()) {
                 case Uml::Public:
@@ -297,4 +299,5 @@ void Php5Writer::writeOperations(QString
                   break;
                 }
+                if (op->getStatic()) php << "static ";
                 php << "function " << cleanName(op->getName()) << "(";
 
@@ -380,5 +383,4 @@ void Php5Writer::writeAttributes(UMLAttr
                 }
                 php << m_indentation;
-                if(isStatic) php << "static ";
                 switch(at->getScope()) {
                 case Uml::Public:
@@ -392,4 +394,5 @@ void Php5Writer::writeAttributes(UMLAttr
                   break;
                 }
+                if(isStatic) php << "static ";
                 php << "$" << cleanName(at->getName());
                 if(!at->getInitialValue().isEmpty())


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic