umbrello: XMLElementCodeBlock Class Reference

umbrello 2.31.1 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
XMLElementCodeBlock Class Reference

`#include <xmlelementcodeblock.h>`

Inheritance diagram for XMLElementCodeBlock:

## Public Member Functions
| XMLElementCodeBlock (CodeDocument *parentDoc, const QString &nodeName, const QString &comment=QString())
virtual | ~XMLElementCodeBlock ()
virtual void | saveToXMI1 (QDomDocument &doc, QDomElement &root)
virtual void | loadFromXMI1 (QDomElement &root)
virtual UMLAttributeList * | getAttributeList ()
virtual void | setNodeName (const QString &name)
virtual QString | getNodeName ()
void | addAttribute (UMLAttribute *at)
void | updateContent ()
Public Member Functions inherited from HierarchicalCodeBlock
| HierarchicalCodeBlock (CodeDocument *doc, const QString &startString=QString(), const QString &endString=QString(), const QString &comment=QString())
virtual | ~HierarchicalCodeBlock ()
void | setEndText (const QString &new_var)
QString | getEndText () const
bool | addTextBlock (TextBlock *add_object)
bool | insertTextBlock (TextBlock *newBlock, TextBlock *existingBlock, bool after=true)
bool | removeTextBlock (TextBlock *remove_object)
void | setStartText (const QString &text)
QString | getStartText () const
virtual QString | toString () const
QString | getUniqueTag ()
QString | getUniqueTag (const QString &prefix)
void | addCodeClassFieldMethods (CodeClassFieldList &list)
virtual CodeBlock * | newCodeBlock ()
virtual CodeBlockWithComments * | newCodeBlockWithComments ()
virtual HierarchicalCodeBlock * | newHierarchicalCodeBlock ()
Public Member Functions inherited from CodeBlockWithComments
| CodeBlockWithComments (CodeDocument *parent, const QString &body=QString(), const QString &comment=QString())
virtual | ~CodeBlockWithComments ()
void | setComment (CodeComment *object)
CodeComment * | getComment () const
void | setOverallIndentationLevel (int level)
Public Member Functions inherited from CodeBlock
| CodeBlock (CodeDocument *parent, const QString &body=QString())
virtual | ~CodeBlock ()
void | setContentType (ContentType new_var)
ContentType | contentType () const
Public Member Functions inherited from TextBlock
| TextBlock (CodeDocument *parent, const QString &text=QString())
virtual | ~TextBlock ()
void | setText (const QString &text)
QString | getText () const
void | appendText (const QString &text)
void | setTag (const QString &value)
QString | getTag () const
CodeDocument * | getParentDocument () const
void | setWriteOutText (bool write)
bool | getWriteOutText () const
void | setIndentationLevel (int level)
int | getIndentationLevel () const
QString | getIndentationString (int level=0) const
virtual QString | unformatText (const QString &text, const QString &indent=QString())
bool | canDelete () const
virtual QString | getNewEditorLine (int amount=0)
virtual int | firstEditableLine ()
virtual int | lastEditableLine ()
Public Member Functions inherited from CodeGenObjectWithTextBlocks
| CodeGenObjectWithTextBlocks (CodeDocument *parent)
virtual | ~CodeGenObjectWithTextBlocks ()
TextBlockList * | getTextBlockList () const
virtual HierarchicalCodeBlock * | getHierarchicalCodeBlock (const QString &tag, const QString &comment, int indentLevel)
virtual CodeBlockWithComments * | getCodeBlockWithComments (const QString &tag, const QString &comment, int indentLevel)
CodeComment * | addOrUpdateTaggedCodeComment (const QString &tag=QString(), const QString &text=QString(), int indentationLevel=0)
CodeBlockWithComments * | addOrUpdateTaggedCodeBlockWithComments (const QString &tag, const QString &text, const QString &ctext, int indentLevel, bool forceUserBlockUpdate)
TextBlock * | findTextBlockByTag (const QString &tag)
CodeGenObjectWithTextBlocks * | findParentObjectForTaggedTextBlock (const QString &tag)

## Protected Member Functions
virtual void | setAttributesOnNode (QDomDocument &doc, QDomElement &blockElement)
virtual void | setAttributesFromNode (QDomElement &element)
Protected Member Functions inherited from HierarchicalCodeBlock
virtual void | release ()
virtual void | setAttributesFromObject (TextBlock *obj)
TextBlock * | findCodeClassFieldTextBlockByTag (const QString &tag)
Protected Member Functions inherited from TextBlock
void | setCanDelete (bool canDelete)
Protected Member Functions inherited from CodeGenObjectWithTextBlocks
void | setAttributesFromObject (CodeGenObjectWithTextBlocks *obj)
virtual void | loadChildTextBlocksFromNode (QDomElement &root)
virtual void | resetTextBlocks ()

## Private Member Functions
void | init (CodeDocument *parent, const QString &nodeName, const QString &comment)

## Private Attributes
UMLAttributeList | m_attList
QString | m_nodeName

## 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 | 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 Attributes inherited from CodeGenObjectWithTextBlocks
QMap< QString, TextBlock * > | m_textBlockTagMap
TextBlockList | m_textblockVector

## Constructor & Destructor Documentation

## ◆ XMLElementCodeBlock()

XMLElementCodeBlock::XMLElementCodeBlock | ( | CodeDocument * | parentDoc,
|  | const QString & | nodeName,
|  | const QString & | comment = `QString()`
| ) |  |

Empty Constructor

## ◆ ~XMLElementCodeBlock()

XMLElementCodeBlock::~XMLElementCodeBlock | ( |  | ) |
| virtual

Empty Destructor

## Member Function Documentation

## ◆ addAttribute()

void XMLElementCodeBlock::addAttribute | ( | UMLAttribute * | at | ) |

## ◆ getAttributeList()

UMLAttributeList * XMLElementCodeBlock::getAttributeList | ( |  | ) |
| virtual

## ◆ getNodeName()

QString XMLElementCodeBlock::getNodeName | ( |  | ) |
| virtual

## ◆ init()

void XMLElementCodeBlock::init | ( | CodeDocument * | parent,
|  | const QString & | nodeName,
|  | const QString & | comment
| ) |  |
| private

## ◆ loadFromXMI1()

void XMLElementCodeBlock::loadFromXMI1 | ( | QDomElement & | root | ) |
| virtual

Load params from the appropriate XMI element node.

load params from the appropriate XMI element node.

Reimplemented from HierarchicalCodeBlock.

## ◆ saveToXMI1()

void XMLElementCodeBlock::saveToXMI1 | ( | QDomDocument & | doc,
|  | QDomElement & | root
| ) |  |
| virtual

Save the XMI representation of this object

Reimplemented from HierarchicalCodeBlock.

## ◆ setAttributesFromNode()

void XMLElementCodeBlock::setAttributesFromNode | ( | QDomElement & | root | ) |
| protectedvirtual

Set the class attributes of this object from the passed element node.

Reimplemented from HierarchicalCodeBlock.

## ◆ setAttributesOnNode()

void XMLElementCodeBlock::setAttributesOnNode | ( | QDomDocument & | doc,
|  | QDomElement & | docElement
| ) |  |
| protectedvirtual

Set attributes of the node that represents this class in the XMI document.

Reimplemented from HierarchicalCodeBlock.

## ◆ setNodeName()

void XMLElementCodeBlock::setNodeName | ( | const QString & | name | ) |
| virtual

## ◆ updateContent()

void XMLElementCodeBlock::updateContent | ( |  | ) |

Update the start/end text of this codeblock.

Update the start and end text for this ownedhierarchicalcodeblock.

## Member Data Documentation

## ◆ m_attList

UMLAttributeList XMLElementCodeBlock::m_attList
| private

## ◆ m_nodeName

QString XMLElementCodeBlock::m_nodeName
| private

The documentation for this class was generated from the following files:

- umbrello/codegenerators/xml/xmlelementcodeblock.h
- umbrello/codegenerators/xml/xmlelementcodeblock.cpp