umbrello: umbrello/codegenerators/ownedhierarchicalcodeblock.h Source File

umbrello 2.31.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 * 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 OWNEDHIERARCHICALCODEBLOCK_H
13 #define OWNEDHIERARCHICALCODEBLOCK_H
14
15 #include "hierarchicalcodeblock.h"
16
17 class UMLObject;
18 class CodeDocument;
19
26 class OwnedHierarchicalCodeBlock : public OwnedCodeBlock, public HierarchicalCodeBlock
27 {
28 Q_OBJECT
29 public:
30
35 OwnedHierarchicalCodeBlock (UMLObject * parent, CodeDocument * parentDoc, const QString &start = QString(), const QString &end = QString(), const QString &comment = QString());
36
40 virtual ~OwnedHierarchicalCodeBlock ();
41
42 CodeDocument * getParentDocument();
43
44 virtual void updateContent () = 0;
45
46 // these next 2 methods should be supplied by inheriting classes
47
51 virtual void saveToXMI1 (QDomDocument & doc, QDomElement & root) = 0;
52
56 virtual void loadFromXMI1 (QDomElement & root) = 0;
57
58 protected:
59
60 virtual void release ();
61
62 virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & blockElement);
63
64 virtual void setAttributesFromNode (QDomElement & element);
65
66 virtual void setAttributesFromObject (TextBlock * obj);
67
68 private:
69
70 public slots:
71
72 void syncToParent ();
73
74 };
75
76 #endif // OWNEDHIERARCHICALCODEBLOCK_H
umlrole.h
OwnedHierarchicalCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: ownedhierarchicalcodeblock.cpp:83
OwnedHierarchicalCodeBlock::release
virtual void release()
Definition: ownedhierarchicalcodeblock.cpp:38
OwnedCodeBlock
Definition: ownedcodeblock.h:27
OwnedHierarchicalCodeBlock::~OwnedHierarchicalCodeBlock
virtual ~OwnedHierarchicalCodeBlock()
Definition: ownedhierarchicalcodeblock.cpp:29
OwnedHierarchicalCodeBlock::syncToParent
void syncToParent()
Definition: ownedhierarchicalcodeblock.cpp:98
hierarchicalcodeblock.h
OwnedCodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: ownedcodeblock.cpp:72
Uml::RoleType::A
@ A
Definition: basictypes.h:256
ownedhierarchicalcodeblock.h
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1280
association.h
OwnedHierarchicalCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: ownedhierarchicalcodeblock.cpp:57
OwnedHierarchicalCodeBlock::OwnedHierarchicalCodeBlock
OwnedHierarchicalCodeBlock(UMLObject *parent, CodeDocument *parentDoc, const QString &start=QString(), const QString &end=QString(), const QString &comment=QString())
Definition: ownedhierarchicalcodeblock.cpp:23
CodeDocument
Definition: codedocument.h:33
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLRole
Definition: umlrole.h:25
OwnedCodeBlock::getParentObject
UMLObject * getParentObject()
Definition: ownedcodeblock.cpp:64
OwnedHierarchicalCodeBlock::saveToXMI1
virtual void saveToXMI1(QDomDocument &doc, QDomElement &root)=0
OwnedCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: ownedcodeblock.cpp:81
HierarchicalCodeBlock::release
virtual void release()
Definition: hierarchicalcodeblock.cpp:386
UMLObject::asUMLRole
UMLRole * asUMLRole()
Definition: umlobject.cpp:1326
OwnedHierarchicalCodeBlock::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)=0
OwnedHierarchicalCodeBlock::updateContent
virtual void updateContent()=0
OwnedHierarchicalCodeBlock
Definition: ownedhierarchicalcodeblock.h:27
CodeBlock::contentType
ContentType contentType() const
Definition: codeblock.cpp:54
CodeBlock::AutoGenerated
@ AutoGenerated
the content was generated by code generation itself
Definition: codeblock.h:46
codedocument.h
HierarchicalCodeBlock
Definition: hierarchicalcodeblock.h:23
OwnedCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: ownedcodeblock.cpp:106
OwnedHierarchicalCodeBlock::getParentDocument
CodeDocument * getParentDocument()
Definition: ownedhierarchicalcodeblock.cpp:93
OwnedCodeBlock::release
virtual void release()
Definition: ownedcodeblock.cpp:52
TextBlock::getParentDocument
CodeDocument * getParentDocument() const
Definition: textblock.cpp:70
umlobject.h
HierarchicalCodeBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: hierarchicalcodeblock.cpp:278
UMLRole::role
Uml::RoleType::Enum role() const
Definition: umlrole.cpp:169
TextBlock
Definition: textblock.h:25
codegenerator.h
HierarchicalCodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: hierarchicalcodeblock.cpp:297
umldoc.h
OwnedHierarchicalCodeBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: ownedhierarchicalcodeblock.cpp:47
HierarchicalCodeBlock::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &elem)
Definition: hierarchicalcodeblock.cpp:251