umbrello/umbrello
#include <codeblockwithcomments.h>
Public Member Functions | |
CodeBlockWithComments (CodeDocument *parent, const QString &body="", const QString &comment="") | |
virtual | ~CodeBlockWithComments () |
CodeComment * | getComment () const |
virtual void | loadFromXMI (QDomElement &root) |
virtual void | saveToXMI (QDomDocument &doc, QDomElement &root) |
virtual void | setAttributesFromObject (TextBlock *obj) |
void | setComment (CodeComment *object) |
void | setOverallIndentationLevel (int level) |
virtual QString | toString () const |
Public Member Functions inherited from CodeBlock | |
CodeBlock (CodeDocument *parent, const QString &body="") | |
virtual | ~CodeBlock () |
ContentType | contentType () const |
void | setContentType (ContentType new_var) |
Public Member Functions inherited from TextBlock | |
TextBlock (CodeDocument *parent, const QString &text="") | |
virtual | ~TextBlock () |
void | appendText (const QString &text) |
bool | canDelete () const |
virtual int | firstEditableLine () |
int | getIndentationLevel () const |
QString | getIndentationString (int level=0) const |
virtual QString | getNewEditorLine (int amount=0) |
CodeDocument * | getParentDocument () const |
QString | getTag () const |
QString | getText () const |
bool | getWriteOutText () const |
virtual int | lastEditableLine () |
void | setIndentationLevel (int level) |
void | setTag (const QString &value) |
void | setText (const QString &text) |
void | setWriteOutText (bool write) |
virtual QString | unformatText (const QString &text, const QString &indent="") |
Protected Member Functions | |
virtual void | setAttributesFromNode (QDomElement &element) |
virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement) |
Protected Member Functions inherited from TextBlock | |
virtual void | release () |
void | setCanDelete (bool canDelete) |
Additional Inherited Members | |
Public Types inherited from CodeBlock | |
enum | ContentType { AutoGenerated =0, UserGenerated } |
Static Public Member Functions inherited from CodeBlock | |
static QString | enumToString (const ContentType &val) |
Static Public Member Functions inherited from TextBlock | |
static QString | decodeText (const QString &text, const QString &endLine) |
static QString | encodeText (const QString &text, const QString &endLine) |
static QString | formatMultiLineText (const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true) |
static QString | getIndentation () |
static QString | getNewLineEndingChars () |
Detailed Description
class CodeBlockWithComments A very common type of text block in any type of code.
Definition at line 24 of file codeblockwithcomments.h.
Constructor & Destructor Documentation
|
explicit |
Basic Constructor.
Definition at line 23 of file codeblockwithcomments.cpp.
|
virtual |
Empty Destructor.
Definition at line 31 of file codeblockwithcomments.cpp.
Member Function Documentation
CodeComment * CodeBlockWithComments::getComment | ( | ) | const |
Get the Comment object.
Definition at line 46 of file codeblockwithcomments.cpp.
|
virtual |
Load params from the appropriate XMI element node.
Reimplemented from CodeBlock.
Reimplemented in OwnedHierarchicalCodeBlock, CodeAccessorMethod, HierarchicalCodeBlock, RubyClassDeclarationBlock, CodeClassFieldDeclarationBlock, CPPHeaderClassDeclarationBlock, XMLElementCodeBlock, CodeOperation, DClassDeclarationBlock, and JavaClassDeclarationBlock.
Definition at line 96 of file codeblockwithcomments.cpp.
|
virtual |
Save the XMI representation of this object.
Reimplemented from CodeBlock.
Reimplemented in OwnedHierarchicalCodeBlock, CodeAccessorMethod, HierarchicalCodeBlock, CodeClassFieldDeclarationBlock, RubyClassDeclarationBlock, CPPHeaderClassDeclarationBlock, CodeOperation, XMLElementCodeBlock, DClassDeclarationBlock, and JavaClassDeclarationBlock.
Definition at line 54 of file codeblockwithcomments.cpp.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
Reimplemented from CodeBlock.
Reimplemented in CodeMethodBlock, XMLElementCodeBlock, HierarchicalCodeBlock, OwnedHierarchicalCodeBlock, CodeAccessorMethod, CodeOperation, CodeClassFieldDeclarationBlock, DCodeAccessorMethod, JavaCodeAccessorMethod, and RubyCodeAccessorMethod.
Definition at line 105 of file codeblockwithcomments.cpp.
|
virtual |
Set the class attributes from a passed object.
Reimplemented from CodeBlock.
Reimplemented in CodeMethodBlock, HierarchicalCodeBlock, OwnedHierarchicalCodeBlock, DClassDeclarationBlock, CodeAccessorMethod, CPPHeaderClassDeclarationBlock, CodeOperation, and CodeClassFieldDeclarationBlock.
Definition at line 83 of file codeblockwithcomments.cpp.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeBlock.
Reimplemented in CodeMethodBlock, HierarchicalCodeBlock, XMLElementCodeBlock, OwnedHierarchicalCodeBlock, CodeAccessorMethod, CodeOperation, CodeClassFieldDeclarationBlock, DCodeAccessorMethod, JavaCodeAccessorMethod, and RubyCodeAccessorMethod.
Definition at line 68 of file codeblockwithcomments.cpp.
void CodeBlockWithComments::setComment | ( | CodeComment * | object | ) |
Set the Comment object.
Definition at line 38 of file codeblockwithcomments.cpp.
void CodeBlockWithComments::setOverallIndentationLevel | ( | int | level | ) |
A utility method that causes the comment and body of the code block to have the same indentation level.
Definition at line 163 of file codeblockwithcomments.cpp.
|
virtual |
- Returns
- QString
Reimplemented from TextBlock.
Reimplemented in HierarchicalCodeBlock, and CodeMethodBlock.
Definition at line 136 of file codeblockwithcomments.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:01 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.