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

umbrello 2.32.3 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
CodeDocument
Definition: codedocument.h:33
HierarchicalCodeBlock
Definition: hierarchicalcodeblock.h:23
UMLAttributeList
Definition: umlattributelist.h:27
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
XMLElementCodeBlock
Definition: xmlelementcodeblock.h:24
XMLElementCodeBlock::m_attList
UMLAttributeList m_attList
Definition: xmlelementcodeblock.h:75
XMLElementCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: xmlelementcodeblock.cpp:55
XMLElementCodeBlock::setNodeName
virtual void setNodeName(const QString &name)
Definition: xmlelementcodeblock.cpp:77
XMLElementCodeBlock::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)
Definition: xmlelementcodeblock.cpp:46
XMLElementCodeBlock::getNodeName
virtual QString getNodeName()
Definition: xmlelementcodeblock.cpp:82
XMLElementCodeBlock::addAttribute
void addAttribute(UMLAttribute *at)
Definition: xmlelementcodeblock.cpp:87
XMLElementCodeBlock::init
void init(CodeDocument *parent, const QString &nodeName, const QString &comment)
Definition: xmlelementcodeblock.cpp:135
XMLElementCodeBlock::getAttributeList
virtual UMLAttributeList * getAttributeList()
Definition: xmlelementcodeblock.cpp:92
XMLElementCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: xmlelementcodeblock.cpp:68
XMLElementCodeBlock::saveToXMI1
virtual void saveToXMI1(QDomDocument &doc, QDomElement &root)
Definition: xmlelementcodeblock.cpp:34
XMLElementCodeBlock::~XMLElementCodeBlock
virtual ~XMLElementCodeBlock()
Definition: xmlelementcodeblock.cpp:27
XMLElementCodeBlock::updateContent
void updateContent()
Definition: xmlelementcodeblock.cpp:100
XMLElementCodeBlock::m_nodeName
QString m_nodeName
Definition: xmlelementcodeblock.h:76
XMLElementCodeBlock::XMLElementCodeBlock
XMLElementCodeBlock(CodeDocument *parentDoc, const QString &nodeName, const QString &comment=QString())
Definition: xmlelementcodeblock.cpp:21
hierarchicalcodeblock.h
umlattributelist.h