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

- Main Page
- Related Pages
- Topics
- 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
59 virtual void release ();
60
61 void setStartMethodText (const QString &value);
62
63 void setEndMethodText (const QString &value);
64
70 virtual void updateMethodDeclaration () = 0;
71
72 virtual void setAttributesOnNode (QXmlStreamWriter& writer);
73
74 virtual void setAttributesFromNode (QDomElement & element);
75
76 virtual void setAttributesFromObject (TextBlock * obj);
77
78 private:
79
80 QString m_startMethod;
81 QString m_endMethod;
82
83 public slots:
84
85 virtual void syncToParent();
86};
87
88#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::CodeMethodBlock
CodeMethodBlock(ClassifierCodeDocument *doc, UMLObject *parentObj, const QString &body=QString(), const QString &comment=QString())
Definition codemethodblock.cpp:17
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:81
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:80
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