umbrello: umbrello/codegenerators/ownedcodeblock.h Source File

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

ownedcodeblock.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 OWNEDCODEBLOCK_H
13 #define OWNEDCODEBLOCK_H
14
15 #include <QDomDocument>
16 #include <QDomElement>
17 #include <QObject>
18
19 class TextBlock;
20 class UMLObject;
21 class QXmlStreamWriter;
22
27 class OwnedCodeBlock : public QObject
28 {
29 Q_OBJECT
30 public:
31
32 explicit OwnedCodeBlock (UMLObject * parent);
33 virtual ~OwnedCodeBlock ();
34
35 UMLObject * getParentObject ();
36
37 virtual void updateContent () = 0;
38
39 protected:
40
41 virtual void release ();
42
43 virtual void setAttributesOnNode (QXmlStreamWriter& writer);
44 virtual void setAttributesFromNode (QDomElement & element);
45 virtual void setAttributesFromObject (TextBlock * obj);
46
47 private:
48
49 void initFields (UMLObject * parent);
50
51 UMLObject * m_parentObject;
52
53 public slots:
54
55 virtual void syncToParent ();
56
57 };
58
59 #endif // OWNEDCODEBLOCK_H
OwnedCodeBlock
Definition: ownedcodeblock.h:28
OwnedCodeBlock::syncToParent
virtual void syncToParent()
Definition: ownedcodeblock.cpp:168
OwnedCodeBlock::OwnedCodeBlock
OwnedCodeBlock(UMLObject *parent)
Definition: ownedcodeblock.cpp:31
OwnedCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: ownedcodeblock.cpp:84
OwnedCodeBlock::updateContent
virtual void updateContent()=0
OwnedCodeBlock::~OwnedCodeBlock
virtual ~OwnedCodeBlock()
Definition: ownedcodeblock.cpp:41
OwnedCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: ownedcodeblock.cpp:109
OwnedCodeBlock::m_parentObject
UMLObject * m_parentObject
Definition: ownedcodeblock.h:51
OwnedCodeBlock::initFields
void initFields(UMLObject *parent)
Definition: ownedcodeblock.cpp:157
OwnedCodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: ownedcodeblock.cpp:75
OwnedCodeBlock::getParentObject
UMLObject * getParentObject()
Definition: ownedcodeblock.cpp:67
OwnedCodeBlock::release
virtual void release()
Definition: ownedcodeblock.cpp:55
TextBlock
Definition: textblock.h:27
UMLObject
The base class for UML objects.
Definition: umlobject.h:75