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

Andi Fischer andi.fischer at hispeed.ch
Thu Mar 12 22:20:47 UTC 2009


SVN commit 938764 by fischer:

Some comments fixed.

 M  +12 -20    textblock.cpp  
 M  +21 -16    textblock.h  


--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/textblock.cpp #938763:938764
@@ -5,7 +5,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  *   copyright (C) 2003      Brian Thomas <thomas at mail630.gsfc.nasa.gov>   *
- *   copyright (C) 2004-2008                                               *
+ *   copyright (C) 2004-2009                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -234,8 +234,8 @@
  * <p>
  * TODO: Can be refactored away and replaced with
  * <a href="#getIndentationString">getIndentationString</a>.
- * @param indentAmount   the number of indent steps to use
- * @return               the new line
+ * @param amount   the number of indent steps to use
+ * @return         the new line
  */
 QString TextBlock::getNewEditorLine ( int amount )
 {
@@ -275,10 +275,10 @@
 
 /**
  * Format a long text string to be more readable.
- * @param text               the original text for formatting
+ * @param work               the original text for formatting
  * @param linePrefix         a line prefix
  * @param breakStr           a break string
- * @param alwaysAddBreak     control to add always a break string
+ * @param addBreak           control to add always a break string
  * @param lastLineHasBreak   control to add a break string to the last line
  * @return                   the new formatted text
  */
@@ -353,7 +353,7 @@
 /**
  * Set the class attributes of this object from
  * the passed element node.
- * @param element   the xmi element from which to load
+ * @param root   the xmi element from which to load
  */
 void TextBlock::setAttributesFromNode(QDomElement & root)
 {
@@ -370,9 +370,9 @@
  * Encode text for XML storage.
  * We simply convert all types of newLines to the "\n" or 

  * entity.
- * @param text       the not yet encoded text
- * @param endChars   the chars at the end of each line
- * @return           the encoded text
+ * @param text      the not yet encoded text
+ * @param endLine   the chars at the end of each line
+ * @return          the encoded text
  */
 QString TextBlock::encodeText(const QString & text, const QString & endLine)
 {
@@ -411,6 +411,9 @@
         return QString();
 }
 
+/**
+ * Operator '<<' for TextBlock.
+ */
 QTextStream& operator<<(QTextStream& os, const TextBlock& obj)
 {
     os << "TextBlock: tag=" << obj.getTag()
@@ -422,14 +425,3 @@
     return os;
 }
 
-/**
- * Save the XMI representation of this object
- * @param doc    the xmi document
- * @param root   the starting point to append
- */
-
-/**
- * Load params from the appropriate XMI element node.
- * @param root   the starting point in the xmi document to load from
- */
-
--- trunk/KDE/kdesdk/umbrello/umbrello/codegenerators/textblock.h #938763:938764
@@ -5,7 +5,7 @@
  *   (at your option) any later version.                                   *
  *                                                                         *
  *   copyright (C) 2003      Brian Thomas <thomas at mail630.gsfc.nasa.gov>   *
- *   copyright (C) 2004-2008                                               *
+ *   copyright (C) 2004-2009                                               *
  *   Umbrello UML Modeller Authors <uml-devel at uml.sf.net>                  *
  ***************************************************************************/
 
@@ -51,25 +51,35 @@
 
     static QString getNewLineEndingChars();
 
-    static QString formatMultiLineText ( const QString & text, const QString & linePrefix,
+    static QString formatMultiLineText ( const QString & work, const QString & linePrefix,
                                   const QString & breakStr,
-                                  bool alwaysAddBreak = true, bool lastLineHasBreak = true);
+                                  bool addBreak = true, bool lastLineHasBreak = true);
 
     virtual QString unformatText ( const QString & text, const QString & indent = "");
 
     virtual QString toString() const;
 
-    static QString encodeText(const QString & text , const QString & endChars);
-    static QString decodeText(const QString & text, const QString & endChars);
+    static QString encodeText(const QString & text, const QString & endLine);
+    static QString decodeText(const QString & text, const QString & endLine);
 
+    /**
+     * Save the XMI representation of this object
+     * @param doc    the xmi document
+     * @param root   the starting point to append
+     */
     virtual void saveToXMI ( QDomDocument & doc, QDomElement & root ) = 0;
+
+    /**
+     * Load params from the appropriate XMI element node.
+     * @param root   the starting point in the xmi document to load from
+     */
     virtual void loadFromXMI ( QDomElement & root ) = 0;
 
     bool canDelete() const;
 
     virtual void setAttributesFromObject (TextBlock * obj);
 
-    virtual QString getNewEditorLine( int indentAmount = 0 );
+    virtual QString getNewEditorLine( int amount = 0 );
 
     virtual int firstEditableLine();
     virtual int lastEditableLine();
@@ -81,22 +91,17 @@
     virtual void release ();
 
     virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
-    virtual void setAttributesFromNode ( QDomElement & element);
+    virtual void setAttributesFromNode ( QDomElement & root);
 
     friend QTextStream& operator<<(QTextStream& os, const TextBlock& obj);
 
 private:
 
-    // The actual text of this code block.
-    QString m_text;
+    QString m_text;   //< The actual text of this code block.
     QString m_tag;
-
-    bool m_canDelete;
-
-    // Whether or not to include the text of this TextBlock into a file.
-    bool m_writeOutText;
-
-    int m_indentationLevel;
+    bool    m_canDelete;
+    bool    m_writeOutText;   //< Flag to write the text of this TextBlock into a file.
+    int     m_indentationLevel;
     CodeDocument * m_parentDocument;
 
 };




More information about the umbrello-devel mailing list