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

umbrello 25.04.1 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 SPDX-License-Identifier: GPL-2.0-or-later
3
4 SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov>
5 SPDX-FileCopyrightText: 2004-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef XMLELEMENTCODEBLOCK_H
9#define XMLELEMENTCODEBLOCK_H
10
11#include "hierarchicalcodeblock.h"
12#include "umlattributelist.h"
13
14#include <QString>
15
16class CodeDocument;
17class UMLAttribute;
18
19 class XMLElementCodeBlock : public HierarchicalCodeBlock
20{
21public:
22
26 XMLElementCodeBlock (CodeDocument * parentDoc, const QString & nodeName, const QString & comment = QString());
27
31 virtual ~XMLElementCodeBlock ();
32
36 virtual void saveToXMI(QXmlStreamWriter& writer);
37
41 virtual void loadFromXMI (QDomElement & root);
42
43 virtual UMLAttributeList * getAttributeList();
44
45 virtual void setNodeName (const QString &name);
46 virtual QString getNodeName ();
47
48 void addAttribute (UMLAttribute * at);
49
53 void updateContent ();
54
55protected:
56
61 virtual void setAttributesOnNode (QXmlStreamWriter& writer);
62
67 virtual void setAttributesFromNode (QDomElement & element);
68
69private:
70
71 UMLAttributeList m_attList;
72 QString m_nodeName;
73 void init (CodeDocument * parent, const QString &nodeName, const QString &comment);
74
75};
76
77#endif // XMLELEMENTCODEBLOCK_H
CodeDocument
Definition codedocument.h:30
HierarchicalCodeBlock::HierarchicalCodeBlock
HierarchicalCodeBlock(CodeDocument *doc, const QString &startString=QString(), const QString &endString=QString(), const QString &comment=QString())
Definition hierarchicalcodeblock.cpp:26
UMLAttributeList
Definition umlattributelist.h:21
UMLAttribute
Sets up attribute information.
Definition attribute.h:23
XMLElementCodeBlock::m_attList
UMLAttributeList m_attList
Definition xmlelementcodeblock.h:71
XMLElementCodeBlock::setNodeName
virtual void setNodeName(const QString &name)
Definition xmlelementcodeblock.cpp:76
XMLElementCodeBlock::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition xmlelementcodeblock.cpp:33
XMLElementCodeBlock::getNodeName
virtual QString getNodeName()
Definition xmlelementcodeblock.cpp:81
XMLElementCodeBlock::addAttribute
void addAttribute(UMLAttribute *at)
Definition xmlelementcodeblock.cpp:86
XMLElementCodeBlock::init
void init(CodeDocument *parent, const QString &nodeName, const QString &comment)
Definition xmlelementcodeblock.cpp:134
XMLElementCodeBlock::getAttributeList
virtual UMLAttributeList * getAttributeList()
Definition xmlelementcodeblock.cpp:91
XMLElementCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition xmlelementcodeblock.cpp:67
XMLElementCodeBlock::~XMLElementCodeBlock
virtual ~XMLElementCodeBlock()
Definition xmlelementcodeblock.cpp:26
XMLElementCodeBlock::loadFromXMI
virtual void loadFromXMI(QDomElement &root)
Definition xmlelementcodeblock.cpp:45
XMLElementCodeBlock::updateContent
void updateContent()
Definition xmlelementcodeblock.cpp:99
XMLElementCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition xmlelementcodeblock.cpp:54
XMLElementCodeBlock::m_nodeName
QString m_nodeName
Definition xmlelementcodeblock.h:72
XMLElementCodeBlock::XMLElementCodeBlock
XMLElementCodeBlock(CodeDocument *parentDoc, const QString &nodeName, const QString &comment=QString())
Definition xmlelementcodeblock.cpp:20
hierarchicalcodeblock.h
umlattributelist.h