CodeBlock Class Reference
class CodeBlock A "chunk" of code within the code document. More...
#include <codeblock.h>
Inheritance diagram for CodeBlock:

Public Types | |
| enum | ContentType { AutoGenerated = 0, UserGenerated } |
Public Member Functions | |
| CodeBlock (CodeDocument *parent, const QString &body="") | |
| constructor with QString so we can create & populate it in one step. | |
| CodeBlock (HierarchicalCodeBlock *parent, const QString &body="") | |
| virtual | ~CodeBlock () |
| Empty Destructor. | |
| void | setContentType (ContentType new_var) |
| Set the value of m_contentType specifies whether the content (text) of this object was generated by the code generator or was supplied by the user. | |
| ContentType | getContentType () |
| Get the value of m_contentType specifies whether the content (text) of this object was generated by the code generator or was supplied by the user. | |
| virtual void | saveToXMI (QDomDocument &doc, QDomElement &root) |
| Save the XMI representation of this object. | |
| virtual void | loadFromXMI (QDomElement &root) |
| load params from the appropriate XMI element node. | |
| virtual void | setAttributesFromObject (TextBlock *obj) |
| set the class attributes from a passed object | |
Protected Member Functions | |
| 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. | |
Detailed Description
class CodeBlock A "chunk" of code within the code document.
Definition at line 33 of file codeblock.h.
Constructor & Destructor Documentation
|
||||||||||||
|
constructor with QString so we can create & populate it in one step.
Definition at line 30 of file codeblock.cpp. |
|
|
Empty Destructor.
Definition at line 36 of file codeblock.cpp. |
Member Function Documentation
|
|
Set the value of m_contentType specifies whether the content (text) of this object was generated by the code generator or was supplied by the user.
Definition at line 57 of file codeblock.cpp. Referenced by setAttributesFromNode(), and setAttributesFromObject(). |
|
|
Get the value of m_contentType specifies whether the content (text) of this object was generated by the code generator or was supplied by the user.
Definition at line 67 of file codeblock.cpp. Referenced by CodeGenObjectWithTextBlocks::addOrUpdateTaggedCodeBlockWithComments(), CodeMethodBlock::setAttributesFromNode(), setAttributesFromObject(), CodeMethodBlock::setAttributesOnNode(), setAttributesOnNode(), and CPPHeaderCodeDocument::updateContent(). |
|
||||||||||||
|
Save the XMI representation of this object.
Implements TextBlock. Reimplemented in CodeBlockWithComments, CodeClassFieldDeclarationBlock, and OwnedHierarchicalCodeBlock. Definition at line 87 of file codeblock.cpp. References setAttributesOnNode(). |
|
|
load params from the appropriate XMI element node.
Implements TextBlock. Reimplemented in CodeBlockWithComments, CodeClassFieldDeclarationBlock, and OwnedHierarchicalCodeBlock. Definition at line 111 of file codeblock.cpp. References setAttributesFromNode(). Referenced by RubyClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaClassifierCodeDocument::loadChildTextBlocksFromNode(), JavaANTCodeDocument::loadChildTextBlocksFromNode(), CPPHeaderCodeDocument::loadChildTextBlocksFromNode(), and CodeGenObjectWithTextBlocks::loadChildTextBlocksFromNode(). |
|
|
set the class attributes from a passed object
Reimplemented from TextBlock. Reimplemented in CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeMethodBlock, and OwnedHierarchicalCodeBlock. Definition at line 127 of file codeblock.cpp. References getContentType(), TextBlock::setAttributesFromObject(), and setContentType(). Referenced by CodeBlockWithComments::setAttributesFromObject(). |
|
||||||||||||
|
set attributes of the node that represents this class in the XMI document.
Reimplemented from TextBlock. Reimplemented in CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeMethodBlock, and OwnedHierarchicalCodeBlock. Definition at line 96 of file codeblock.cpp. References getContentType(), and TextBlock::setAttributesOnNode(). Referenced by saveToXMI(), and CodeBlockWithComments::setAttributesOnNode(). |
|
|
set the class attributes of this object from the passed element node.
Reimplemented from TextBlock. Reimplemented in CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeMethodBlock, and OwnedHierarchicalCodeBlock. Definition at line 117 of file codeblock.cpp. References TextBlock::setAttributesFromNode(), and setContentType(). Referenced by loadFromXMI(), and CodeBlockWithComments::setAttributesFromNode(). |
The documentation for this class was generated from the following files:
