umbrello: umbrello/codegenerators/ownedhierarchicalcodeblock.h Source File

umbrello 25.04.0 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-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef OWNEDHIERARCHICALCODEBLOCK_H
9#define OWNEDHIERARCHICALCODEBLOCK_H
10
11#include "hierarchicalcodeblock.h"
12
13class UMLObject;
14class CodeDocument;
15
22 class OwnedHierarchicalCodeBlock : public OwnedCodeBlock, public HierarchicalCodeBlock
23{
24 Q_OBJECT
25public:
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 saveToXMI(QXmlStreamWriter& writer) = 0;
48
52 virtual void loadFromXMI (QDomElement & root) = 0;
53
54protected:
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
64public Q_SLOTS:
65 void syncToParent ();
66
67};
68
69#endif // OWNEDHIERARCHICALCODEBLOCK_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
OwnedCodeBlock::OwnedCodeBlock
OwnedCodeBlock(UMLObject *parent)
Definition ownedcodeblock.cpp:27
OwnedHierarchicalCodeBlock::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)=0
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::loadFromXMI
virtual void loadFromXMI(QDomElement &root)=0
OwnedHierarchicalCodeBlock::syncToParent
void syncToParent()
Definition ownedhierarchicalcodeblock.cpp:94
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::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