CodeMethodBlock Class Reference
class CodeMethodBlock A common type of "code block" that occurs in OO code. More...
#include <codemethodblock.h>
Inheritance diagram for CodeMethodBlock:

Public Slots | |
| virtual void | syncToParent () |
Public Member Functions | |
| CodeMethodBlock (ClassifierCodeDocument *doc, UMLObject *parentObj, const QString &body="", const QString &comment="") | |
| Constructors. | |
| virtual | ~CodeMethodBlock () |
| Empty Destructor. | |
| virtual QString | toString () |
| QString | getStartMethodText () const |
| Get the starting text that begins this method before the body is printed. | |
| QString | getEndMethodText () const |
| Get the ending text that finishes this method after the body is printed. | |
| CodeDocument * | getParentDocument () |
Protected Member Functions | |
| virtual void | release () |
| causes the text block to release all of its connections and any other text blocks that it 'owns'. | |
| void | setStartMethodText (const QString &value) |
| Set the starting text that begins this method before the body is printed. | |
| void | setEndMethodText (const QString &value) |
| Set the ending text that finishes this method after the body is printed. | |
| virtual void | updateMethodDeclaration ()=0 |
| this is the method called from within syncToparent(). | |
| virtual void | updateContent ()=0 |
| this is the method called from within syncToparent(). | |
| virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement) |
| set attributes of the node that represents this class in the XMI document. | |
| virtual void | setAttributesFromNode (QDomElement &element) |
| set the class attributes of this object from the passed element node. | |
| virtual void | setAttributesFromObject (TextBlock *obj) |
| set the class attributes from a passed object | |
Friends | |
| class | CodeGenObjectWithTextBlocks |
Detailed Description
class CodeMethodBlock A common type of "code block" that occurs in OO code.
Definition at line 35 of file codemethodblock.h.
Constructor & Destructor Documentation
|
||||||||||||||||||||
|
Constructors.
Definition at line 25 of file codemethodblock.cpp. |
|
|
Empty Destructor.
Definition at line 31 of file codemethodblock.cpp. |
Member Function Documentation
|
|
Reimplemented from CodeBlockWithComments. Definition at line 138 of file codemethodblock.cpp. References TextBlock::formatMultiLineText(), CodeBlockWithComments::getComment(), UMLApp::getCommonPolicy(), getEndMethodText(), TextBlock::getIndentationLevel(), TextBlock::getIndentationString(), CodeGenerationPolicy::getNewLineEndingChars(), getStartMethodText(), TextBlock::getText(), TextBlock::getWriteOutText(), and TextBlock::toString(). |
|
|
Get the starting text that begins this method before the body is printed.
Definition at line 49 of file codemethodblock.cpp. Referenced by setAttributesFromObject(), setAttributesOnNode(), and toString(). |
|
|
Get the ending text that finishes this method after the body is printed.
Definition at line 56 of file codemethodblock.cpp. Referenced by setAttributesFromObject(), setAttributesOnNode(), and toString(). |
|
|
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. Definition at line 77 of file codemethodblock.cpp. References TextBlock::release(), and OwnedCodeBlock::release(). |
|
|
Set the starting text that begins this method before the body is printed.
Definition at line 63 of file codemethodblock.cpp. Referenced by setAttributesFromNode(), and setAttributesFromObject(). |
|
|
Set the ending text that finishes this method after the body is printed.
Definition at line 70 of file codemethodblock.cpp. Referenced by setAttributesFromNode(), and setAttributesFromObject(). |
|
|
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. |
|
|
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. |
|
||||||||||||
|
set attributes of the node that represents this class in the XMI document.
Reimplemented from CodeBlockWithComments. Definition at line 86 of file codemethodblock.cpp. References TextBlock::encodeText(), UMLApp::getCommonPolicy(), CodeBlock::getContentType(), getEndMethodText(), CodeGenerationPolicy::getNewLineEndingChars(), getStartMethodText(), OwnedCodeBlock::setAttributesOnNode(), and CodeBlockWithComments::setAttributesOnNode(). |
|
|
set the class attributes of this object from the passed element node.
Reimplemented from CodeBlockWithComments. Definition at line 105 of file codemethodblock.cpp. References TextBlock::decodeText(), UMLApp::getCommonPolicy(), CodeBlock::getContentType(), CodeGenerationPolicy::getNewLineEndingChars(), OwnedCodeBlock::setAttributesFromNode(), CodeBlockWithComments::setAttributesFromNode(), setEndMethodText(), and setStartMethodText(). |
|
|
set the class attributes from a passed object
Reimplemented from CodeBlockWithComments. Definition at line 121 of file codemethodblock.cpp. References getEndMethodText(), getStartMethodText(), CodeBlockWithComments::setAttributesFromObject(), setEndMethodText(), and setStartMethodText(). |
The documentation for this class was generated from the following files:
