[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Sun Dec 16 13:58:32 UTC 2007
SVN commit 749097 by fischer:
more code documentation added
M +4 -4 codeblock.cpp
M +14 -8 codeblock.h
--- trunk/KDE/kdesdk/umbrello/umbrello/codeblock.cpp #749096:749097
@@ -44,7 +44,6 @@
// set attributes
setAttributesOnNode(doc, blockElement);
root.appendChild( blockElement );
- uDebug() << "******************* " << this;
}
void CodeBlock::setAttributesOnNode( QDomDocument & doc, QDomElement & blockElement)
@@ -87,10 +86,11 @@
}
}
-QTextStream& operator<<(QTextStream& os, const CodeBlock& obj)
+QTextStream& operator<<(QTextStream& str, const CodeBlock& obj)
{
- os << "CodeBlock: " << CodeBlock::toString(obj.getContentType()) << ", ..." /*<< static_cast<TextBlock>(obj)*/; //:TODO:
- return os;
+ str << "CodeBlock: " << CodeBlock::toString(obj.getContentType())
+ << ", ..." << static_cast<TextBlock*>(const_cast<CodeBlock*>(&obj));
+ return str;
}
--- trunk/KDE/kdesdk/umbrello/umbrello/codeblock.h #749096:749097
@@ -20,9 +20,7 @@
#include "textblock.h"
-class HierarchicalCodeBlock;
-
/**
* A "chunk" of code within the code document.
*/
@@ -34,15 +32,16 @@
/**
* Describes the creation of the content.
- * <p>
- * @param AutoGenerated the content was generated by code generation itself
- * @param UserGenerated the content was entered by the user
+ * @enum AutoGenerated the content was generated by code generation itself
+ * @enum UserGenerated the content was entered by the user
*/
enum ContentType {AutoGenerated=0, UserGenerated };
/**
* Constructor with QString so we can create and populate it in
* one step.
+ * @param parent the parent of this code block
+ * @param body the code or body of this code block
*/
explicit CodeBlock ( CodeDocument * parent, const QString & body = "");
@@ -76,17 +75,21 @@
static QString toString(const ContentType& val);
/**
- * Save the XMI representation of this object
+ * 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 );
/**
* Load params from the appropriate XMI element node.
+ * @param root the starting point to load from
*/
virtual void loadFromXMI ( QDomElement & root );
/**
* Set the class attributes from a passed object.
+ * @param obj text block from which the attributes are taken
*/
virtual void setAttributesFromObject (TextBlock * obj);
@@ -95,16 +98,19 @@
/**
* Set attributes of the node that represents this class
* in the XMI document.
+ * @param doc the xmi document
+ * @param blockElement the xmi element holding the attributes
*/
virtual void setAttributesOnNode ( QDomDocument & doc, QDomElement & blockElement);
/**
* Set the class attributes of this object from
* the passed element node.
+ * @param element the xmi element from which to load
*/
virtual void setAttributesFromNode ( QDomElement & element);
- friend QTextStream& operator<<(QTextStream& os, const CodeBlock& obj);
+ friend QTextStream& operator<<(QTextStream& str, const CodeBlock& obj);
private:
@@ -114,6 +120,6 @@
};
-QTextStream& operator<<(QTextStream& os, const CodeBlock& obj);
+QTextStream& operator<<(QTextStream& str, const CodeBlock& obj);
#endif // CODEBLOCK_H
More information about the umbrello-devel
mailing list