umbrello: umbrello/codegenerators/ownedhierarchicalcodeblock.h Source File

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

ownedhierarchicalcodeblock.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-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6 */
7
8 #ifndef OWNEDHIERARCHICALCODEBLOCK_H
9 #define OWNEDHIERARCHICALCODEBLOCK_H
10
11 #include "hierarchicalcodeblock.h"
12
13 class UMLObject;
14 class CodeDocument;
15
22 class OwnedHierarchicalCodeBlock : public OwnedCodeBlock, public HierarchicalCodeBlock
23 {
24 Q_OBJECT
25 public:
26
31 OwnedHierarchicalCodeBlock (UMLObject * parent, CodeDocument * parentDoc, const QString &start = QString(), const QString &end = QString(), const QString &comment = QString());
32
36 virtual ~OwnedHierarchicalCodeBlock ();
37
38 CodeDocument * getParentDocument();
39
40 virtual void updateContent () = 0;
41
42 // these next 2 methods should be supplied by inheriting classes
43
47 virtual void saveToXMI1(QXmlStreamWriter& writer) = 0;
48
52 virtual void loadFromXMI1 (QDomElement & root) = 0;
53
54 protected:
55
56 virtual void release ();
57
58 virtual void setAttributesOnNode (QXmlStreamWriter& writer);
59
60 virtual void setAttributesFromNode (QDomElement & element);
61
62 virtual void setAttributesFromObject (TextBlock * obj);
63
64 private:
65
66 public slots:
67
68 void syncToParent ();
69
70 };
71
72 #endif // OWNEDHIERARCHICALCODEBLOCK_H
CodeDocument
Definition: codedocument.h:30
HierarchicalCodeBlock
Definition: hierarchicalcodeblock.h:21
OwnedCodeBlock
Definition: ownedcodeblock.h:24
OwnedHierarchicalCodeBlock
Definition: ownedhierarchicalcodeblock.h:23
OwnedHierarchicalCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: ownedhierarchicalcodeblock.cpp:53
OwnedHierarchicalCodeBlock::~OwnedHierarchicalCodeBlock
virtual ~OwnedHierarchicalCodeBlock()
Definition: ownedhierarchicalcodeblock.cpp:25
OwnedHierarchicalCodeBlock::updateContent
virtual void updateContent()=0
OwnedHierarchicalCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: ownedhierarchicalcodeblock.cpp:79
OwnedHierarchicalCodeBlock::syncToParent
void syncToParent()
Definition: ownedhierarchicalcodeblock.cpp:94
OwnedHierarchicalCodeBlock::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)=0
OwnedHierarchicalCodeBlock::OwnedHierarchicalCodeBlock
OwnedHierarchicalCodeBlock(UMLObject *parent, CodeDocument *parentDoc, const QString &start=QString(), const QString &end=QString(), const QString &comment=QString())
Definition: ownedhierarchicalcodeblock.cpp:19
OwnedHierarchicalCodeBlock::getParentDocument
CodeDocument * getParentDocument()
Definition: ownedhierarchicalcodeblock.cpp:89
OwnedHierarchicalCodeBlock::release
virtual void release()
Definition: ownedhierarchicalcodeblock.cpp:34
OwnedHierarchicalCodeBlock::saveToXMI1
virtual void saveToXMI1(QXmlStreamWriter &writer)=0
OwnedHierarchicalCodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: ownedhierarchicalcodeblock.cpp:43
TextBlock
Definition: textblock.h:23
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
hierarchicalcodeblock.h