umbrello/umbrello
#include <codemethodblock.h>
Public Slots | |
virtual void | syncToParent () |
Public Slots inherited from OwnedCodeBlock | |
virtual void | syncToParent () |
Public Member Functions | |
CodeMethodBlock (ClassifierCodeDocument *doc, UMLObject *parentObj, const QString &body="", const QString &comment="") | |
virtual | ~CodeMethodBlock () |
QString | getEndMethodText () const |
CodeDocument * | getParentDocument () |
QString | getStartMethodText () const |
virtual QString | toString () const |
virtual void | updateContent ()=0 |
Public Member Functions inherited from OwnedCodeBlock | |
OwnedCodeBlock (UMLObject *parent) | |
virtual | ~OwnedCodeBlock () |
UMLObject * | getParentObject () |
Public Member Functions inherited from CodeBlockWithComments | |
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) |
void | setComment (CodeComment *object) |
void | setOverallIndentationLevel (int level) |
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 | release () |
virtual void | setAttributesFromNode (QDomElement &element) |
virtual void | setAttributesFromObject (TextBlock *obj) |
virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement) |
void | setEndMethodText (const QString &value) |
void | setStartMethodText (const QString &value) |
virtual void | updateMethodDeclaration ()=0 |
Protected Member Functions inherited from TextBlock | |
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 CodeMethodBlock A common type of "code block" that occurs in OO code.
Note: keep the inheritance sequence: QObject needs to be first in inheritance list.
Definition at line 28 of file codemethodblock.h.
Constructor & Destructor Documentation
CodeMethodBlock::CodeMethodBlock | ( | ClassifierCodeDocument * | doc, |
UMLObject * | parentObj, | ||
const QString & | body = "" , |
||
const QString & | comment = "" |
||
) |
Constructors.
Definition at line 19 of file codemethodblock.cpp.
|
virtual |
Empty Destructor.
Definition at line 26 of file codemethodblock.cpp.
Member Function Documentation
QString CodeMethodBlock::getEndMethodText | ( | ) | const |
Get the ending text that finishes this method after the body is printed.
Definition at line 50 of file codemethodblock.cpp.
CodeDocument * CodeMethodBlock::getParentDocument | ( | ) |
Get the parent code document.
Definition at line 33 of file codemethodblock.cpp.
QString CodeMethodBlock::getStartMethodText | ( | ) | const |
Get the starting text that begins this method before the body is printed.
Definition at line 42 of file codemethodblock.cpp.
|
protectedvirtual |
Causes the text block to release all of its connections and any other text blocks that it 'owns'.
needed to be called prior to deletion of the textblock.
Reimplemented from OwnedCodeBlock.
Reimplemented in CodeAccessorMethod.
Definition at line 76 of file codemethodblock.cpp.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
Reimplemented from CodeBlockWithComments.
Reimplemented in CodeAccessorMethod, CodeOperation, DCodeAccessorMethod, JavaCodeAccessorMethod, and RubyCodeAccessorMethod.
Definition at line 106 of file codemethodblock.cpp.
|
protectedvirtual |
Set the class attributes from a passed object.
Reimplemented from CodeBlockWithComments.
Reimplemented in CodeAccessorMethod, and CodeOperation.
Definition at line 124 of file codemethodblock.cpp.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeBlockWithComments.
Reimplemented in CodeAccessorMethod, CodeOperation, DCodeAccessorMethod, JavaCodeAccessorMethod, and RubyCodeAccessorMethod.
Definition at line 87 of file codemethodblock.cpp.
|
protected |
Set the ending text that finishes this method after the body is printed.
Definition at line 66 of file codemethodblock.cpp.
|
protected |
Set the starting text that begins this method before the body is printed.
Definition at line 58 of file codemethodblock.cpp.
|
virtualslot |
Definition at line 169 of file codemethodblock.cpp.
|
virtual |
- Returns
- QString
Reimplemented from CodeBlockWithComments.
Definition at line 139 of file codemethodblock.cpp.
|
pure virtual |
This is the method called from within syncToparent() to update the body of the method.
It is only called if the method is Auto-generated.
Implements OwnedCodeBlock.
Implemented in CodeOperation, CodeAccessorMethod, CPPSourceCodeOperation, CPPHeaderCodeAccessorMethod, CPPSourceCodeAccessorMethod, DCodeAccessorMethod, JavaCodeAccessorMethod, CPPHeaderCodeOperation, and RubyCodeAccessorMethod.
|
protectedpure virtual |
This is the method called from within syncToparent().
To update the start and end Method text. It is called whether or not the method is Auto or User generated.
Implemented in CodeAccessorMethod, CodeOperation, CPPHeaderCodeAccessorMethod, CPPSourceCodeAccessorMethod, DCodeAccessorMethod, JavaCodeAccessorMethod, RubyCodeOperation, DCodeOperation, JavaCodeOperation, CPPHeaderCodeOperation, CPPSourceCodeOperation, and RubyCodeAccessorMethod.
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.