umbrello: umbrello/codegenerators/xml/xmlelementcodeblock.h Source File

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

xmlelementcodeblock.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> *
8 * copyright (C) 2004-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef XMLELEMENTCODEBLOCK_H
13 #define XMLELEMENTCODEBLOCK_H
14
15 #include "hierarchicalcodeblock.h"
16 #include "umlattributelist.h"
17
18 #include <QString>
19
20 class CodeDocument;
21 class UMLAttribute;
22
23 class XMLElementCodeBlock : public HierarchicalCodeBlock
24 {
25 public:
26
30 XMLElementCodeBlock (CodeDocument * parentDoc, const QString & nodeName, const QString & comment = QString());
31
35 virtual ~XMLElementCodeBlock ();
36
40 virtual void saveToXMI1 (QDomDocument & doc, QDomElement & root);
41
45 virtual void loadFromXMI1 (QDomElement & root);
46
47 virtual UMLAttributeList * getAttributeList();
48
49 virtual void setNodeName (const QString &name);
50 virtual QString getNodeName ();
51
52 void addAttribute (UMLAttribute * at);
53
57 void updateContent ();
58
59 protected:
60
65 virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & blockElement);
66
71 virtual void setAttributesFromNode (QDomElement & element);
72
73 private:
74
75 UMLAttributeList m_attList;
76 QString m_nodeName;
77 void init (CodeDocument * parent, const QString &nodeName, const QString &comment);
78
79 };
80
81 #endif // XMLELEMENTCODEBLOCK_H
umlattributelist.h
HierarchicalCodeBlock::setEndText
void setEndText(const QString &new_var)
Definition: hierarchicalcodeblock.cpp:43
XMLElementCodeBlock::~XMLElementCodeBlock
virtual ~XMLElementCodeBlock()
Definition: xmlelementcodeblock.cpp:27
UMLAttributeList
Definition: umlattributelist.h:26
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
HierarchicalCodeBlock::setStartText
void setStartText(const QString &text)
Definition: hierarchicalcodeblock.cpp:199
hierarchicalcodeblock.h
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:99
XMLCodeComment
Definition: xmlcodecomment.h:25
xmlcodecomment.h
CodeBlockWithComments::getComment
CodeComment * getComment() const
Definition: codeblockwithcomments.cpp:47
CodeDocument
Definition: codedocument.h:32
XMLElementCodeBlock::addAttribute
void addAttribute(UMLAttribute *at)
Definition: xmlelementcodeblock.cpp:87
XMLElementCodeBlock::m_nodeName
QString m_nodeName
Definition: xmlelementcodeblock.h:76
CodeGenObjectWithTextBlocks::getTextBlockList
TextBlockList * getTextBlockList() const
Definition: codegenobjectwithtextblocks.cpp:46
XMLElementCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: xmlelementcodeblock.cpp:55
CodeBlockWithComments::setComment
void setComment(CodeComment *object)
Definition: codeblockwithcomments.cpp:39
XMLElementCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: xmlelementcodeblock.cpp:68
attribute.h
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLAttribute
Sets up attribute information.
Definition: attribute.h:27
XMLElementCodeBlock::init
void init(CodeDocument *parent, const QString &nodeName, const QString &comment)
Definition: xmlelementcodeblock.cpp:135
XMLElementCodeBlock::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)
Definition: xmlelementcodeblock.cpp:46
codedocument.h
XMLElementCodeBlock::updateContent
void updateContent()
Definition: xmlelementcodeblock.cpp:100
HierarchicalCodeBlock
Definition: hierarchicalcodeblock.h:22
XMLElementCodeBlock::getNodeName
virtual QString getNodeName()
Definition: xmlelementcodeblock.cpp:82
XMLElementCodeBlock::getAttributeList
virtual UMLAttributeList * getAttributeList()
Definition: xmlelementcodeblock.cpp:92
XMLElementCodeBlock::m_attList
UMLAttributeList m_attList
Definition: xmlelementcodeblock.h:75
debug_utils.h
TextBlock::getNewLineEndingChars
static QString getNewLineEndingChars()
Definition: textblock.cpp:172
HierarchicalCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: hierarchicalcodeblock.cpp:278
XMLElementCodeBlock
Definition: xmlelementcodeblock.h:23
TextBlock::setText
void setText(const QString &text)
Definition: textblock.cpp:80
XMLElementCodeBlock::XMLElementCodeBlock
XMLElementCodeBlock(CodeDocument *parentDoc, const QString &nodeName, const QString &comment=QString())
Definition: xmlelementcodeblock.cpp:21
XMLElementCodeBlock::saveToXMI1
virtual void saveToXMI1(QDomDocument &doc, QDomElement &root)
Definition: xmlelementcodeblock.cpp:34
xmlelementcodeblock.h
XMLElementCodeBlock::setNodeName
virtual void setNodeName(const QString &name)
Definition: xmlelementcodeblock.cpp:77
HierarchicalCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &elem)
Definition: hierarchicalcodeblock.cpp:251