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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

codemethodblock.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 CODEMETHODBLOCK_H
9#define CODEMETHODBLOCK_H
10
11#include "basictypes.h"
12#include "ownedcodeblock.h"
13#include "codeblockwithcomments.h"
14
15#include <QString>
16
17 class ClassifierCodeDocument;
18 class QXmlStreamWriter;
19
25 class CodeMethodBlock : public OwnedCodeBlock, public CodeBlockWithComments
26{
27 friend class CodeGenObjectWithTextBlocks;
28 Q_OBJECT
29 public:
30
34 CodeMethodBlock (ClassifierCodeDocument * doc, UMLObject * parentObj,
35 const QString & body = QString(), const QString & comment = QString());
36
40 virtual ~CodeMethodBlock ();
41
42 virtual QString toString () const;
43
44 QString getStartMethodText () const;
45
46 QString getEndMethodText () const;
47
48 CodeDocument * getParentDocument();
49
55 virtual void updateContent () = 0;
56
57 protected:
58 virtual void release ();
59
60 void setStartMethodText (const QString &value);
61
62 void setEndMethodText (const QString &value);
63
69 virtual void updateMethodDeclaration () = 0;
70
71 virtual void setAttributesOnNode (QXmlStreamWriter& writer);
72
73 virtual void setAttributesFromNode (QDomElement & element);
74
75 virtual void setAttributesFromObject (TextBlock * obj);
76
77 private:
78 QString m_startMethod;
79 QString m_endMethod;
80
81 public Q_SLOTS:
82 virtual void syncToParent();
83};
84
85#endif // CODEMETHODBLOCK_H
basictypes.h
ClassifierCodeDocument
Definition: classifiercodedocument.h:29
CodeBlockWithComments
Definition: codeblockwithcomments.h:20
CodeDocument
Definition: codedocument.h:30
CodeGenObjectWithTextBlocks
Definition: codegenobjectwithtextblocks.h:29
CodeMethodBlock
Definition: codemethodblock.h:26
CodeMethodBlock::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: codemethodblock.cpp:85
CodeMethodBlock::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: codemethodblock.cpp:104
CodeMethodBlock::updateMethodDeclaration
virtual void updateMethodDeclaration()=0
CodeMethodBlock::toString
virtual QString toString() const
Definition: codemethodblock.cpp:137
CodeMethodBlock::getEndMethodText
QString getEndMethodText() const
Definition: codemethodblock.cpp:48
CodeMethodBlock::syncToParent
virtual void syncToParent()
Definition: codemethodblock.cpp:167
CodeMethodBlock::setEndMethodText
void setEndMethodText(const QString &value)
Definition: codemethodblock.cpp:64
CodeMethodBlock::getParentDocument
CodeDocument * getParentDocument()
Definition: codemethodblock.cpp:31
CodeMethodBlock::release
virtual void release()
Definition: codemethodblock.cpp:74
CodeMethodBlock::updateContent
virtual void updateContent()=0
CodeMethodBlock::m_endMethod
QString m_endMethod
Definition: codemethodblock.h:79
CodeMethodBlock::setStartMethodText
void setStartMethodText(const QString &value)
Definition: codemethodblock.cpp:56
CodeMethodBlock::getStartMethodText
QString getStartMethodText() const
Definition: codemethodblock.cpp:40
CodeMethodBlock::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Definition: codemethodblock.cpp:122
CodeMethodBlock::m_startMethod
QString m_startMethod
Definition: codemethodblock.h:78
CodeMethodBlock::~CodeMethodBlock
virtual ~CodeMethodBlock()
Definition: codemethodblock.cpp:24
OwnedCodeBlock
Definition: ownedcodeblock.h:24
TextBlock
Definition: textblock.h:23
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
codeblockwithcomments.h
ownedcodeblock.h