umbrello 2.39.1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <codeblock.h>
Public Types | |
enum | ContentType { AutoGenerated =0 , UserGenerated } |
Static Public Member Functions | |
static QString | enumToString (const ContentType &val) |
![]() | |
static QString | getIndentation () |
static QString | getNewLineEndingChars () |
static QString | formatMultiLineText (const QString &work, const QString &linePrefix, const QString &breakStr, bool addBreak=true, bool lastLineHasBreak=true) |
static QString | encodeText (const QString &text, const QString &endLine) |
static QString | decodeText (const QString &text, const QString &endLine) |
Protected Member Functions | |
virtual void | setAttributesOnNode (QXmlStreamWriter &writer) |
virtual void | setAttributesFromNode (QDomElement &element) |
![]() | |
void | setCanDelete (bool canDelete) |
virtual void | release () |
Private Attributes | |
ContentType | m_contentType |
Friends | |
QDebug | operator<< (QDebug str, const CodeBlock &obj) |
A "chunk" of code within the code document.
|
explicit |
Constructor.
doc | the documentation text |
body | the body text |
|
virtual |
Empty Destructor.
CodeBlock::ContentType CodeBlock::contentType | ( | ) | const |
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.
|
static |
Return a string representation of ContentType.
val | the enum value of the ContentType |
|
virtual |
Load params from the appropriate XMI element node.
root | the starting point to load from |
Implements TextBlock.
Reimplemented in CodeAccessorMethod, CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeOperation, CPPHeaderClassDeclarationBlock, DClassDeclarationBlock, HierarchicalCodeBlock, JavaClassDeclarationBlock, RubyClassDeclarationBlock, XMLElementCodeBlock, and OwnedHierarchicalCodeBlock.
|
virtual |
Save the XMI representation of this object.
writer | QXmlStreamWriter serialization target |
Implements TextBlock.
Reimplemented in CodeAccessorMethod, CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeOperation, CPPHeaderClassDeclarationBlock, DClassDeclarationBlock, HierarchicalCodeBlock, JavaClassDeclarationBlock, RubyClassDeclarationBlock, XMLElementCodeBlock, and OwnedHierarchicalCodeBlock.
|
protectedvirtual |
Set the class attributes of this object from the passed element node.
elem | the xmi element from which to load |
Reimplemented from TextBlock.
Reimplemented in CodeAccessorMethod, CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeMethodBlock, CodeOperation, DCodeAccessorMethod, HierarchicalCodeBlock, JavaCodeAccessorMethod, OwnedHierarchicalCodeBlock, RubyCodeAccessorMethod, and XMLElementCodeBlock.
Set the class attributes from a passed object.
obj | text block from which the attributes are taken |
Reimplemented from TextBlock.
Reimplemented in CodeAccessorMethod, CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeMethodBlock, CodeOperation, CPPHeaderClassDeclarationBlock, DClassDeclarationBlock, HierarchicalCodeBlock, and OwnedHierarchicalCodeBlock.
|
protectedvirtual |
Set attributes of the node that represents this class in the XMI document.
writer | QXmlStreamWriter serialization target |
Reimplemented from TextBlock.
Reimplemented in CodeAccessorMethod, CodeBlockWithComments, CodeClassFieldDeclarationBlock, CodeMethodBlock, CodeOperation, DCodeAccessorMethod, HierarchicalCodeBlock, JavaCodeAccessorMethod, OwnedHierarchicalCodeBlock, RubyCodeAccessorMethod, and XMLElementCodeBlock.
void CodeBlock::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.
new_var | the new value of m_contentType |
|
private |