umbrello 26.07.70-c53146a 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

codeparameter.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 CODEPARAMETER_H
9#define CODEPARAMETER_H
10
11#include "basictypes.h"
12#include "codecomment.h"
13
14 class ClassifierCodeDocument;
15 class UMLObject;
16 class QXmlStreamWriter;
17
22 class CodeParameter : public QObject
23{
24 Q_OBJECT
25 public:
26
27 CodeParameter(ClassifierCodeDocument* doc, UMLObject* parentObj);
28 virtual ~CodeParameter();
29
30 ClassifierCodeDocument* getParentDocument();
31
32 UMLObject* getParentObject();
33
34 bool getAbstract();
35
36 bool getStatic();
37
38 QString getName() const;
39
40 virtual QString getTypeName();
41
42 Uml::Visibility::Enum getVisibility() const;
43
44 virtual void setInitialValue(const QString &new_var);
45 virtual QString getInitialValue();
46
47 void setComment(CodeComment* comment);
48 CodeComment* getComment();
49
50 // the id of this parameter is the same as the parent UMLObject id.
51 QString ID() const;
52
53 virtual void updateContent() = 0;
54
55 protected:
56
57 virtual void setAttributesOnNode(QXmlStreamWriter& writer);
58 virtual void setAttributesFromNode(QDomElement& element);
59
60 private:
61
62 ClassifierCodeDocument* m_parentDocument;
63 UMLObject* m_parentObject;
64 CodeComment* m_comment;
65 QString m_initialValue;
66
67 void initFields(ClassifierCodeDocument* doc, UMLObject* obj);
68
69 public Q_SLOTS:
70 void syncToParent();
71
72};
73
74#endif // CODEPARAMETER_H
basictypes.h
ClassifierCodeDocument
Definition: classifiercodedocument.h:29
CodeComment
Definition: codecomment.h:20
CodeParameter
Definition: codeparameter.h:23
CodeParameter::getParentDocument
ClassifierCodeDocument * getParentDocument()
Definition: codeparameter.cpp:132
CodeParameter::initFields
void initFields(ClassifierCodeDocument *doc, UMLObject *obj)
Definition: codeparameter.cpp:275
CodeParameter::m_parentObject
UMLObject * m_parentObject
Definition: codeparameter.h:63
CodeParameter::getInitialValue
virtual QString getInitialValue()
Definition: codeparameter.cpp:108
CodeParameter::setComment
void setComment(CodeComment *comment)
Definition: codeparameter.cpp:116
CodeParameter::getAbstract
bool getAbstract()
Definition: codeparameter.cpp:46
CodeParameter::m_parentDocument
ClassifierCodeDocument * m_parentDocument
Definition: codeparameter.h:62
CodeParameter::m_comment
CodeComment * m_comment
Definition: codeparameter.h:64
CodeParameter::m_initialValue
QString m_initialValue
initial value of this code parameter
Definition: codeparameter.h:65
CodeParameter::setInitialValue
virtual void setInitialValue(const QString &new_var)
Definition: codeparameter.cpp:98
CodeParameter::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: codeparameter.cpp:191
CodeParameter::getName
QString getName() const
Definition: codeparameter.cpp:66
CodeParameter::setAttributesOnNode
virtual void setAttributesOnNode(QXmlStreamWriter &writer)
Definition: codeparameter.cpp:165
CodeParameter::syncToParent
void syncToParent()
Definition: codeparameter.cpp:268
CodeParameter::getTypeName
virtual QString getTypeName()
Definition: codeparameter.cpp:77
CodeParameter::getStatic
bool getStatic()
Definition: codeparameter.cpp:56
CodeParameter::~CodeParameter
virtual ~CodeParameter()
Definition: codeparameter.cpp:38
CodeParameter::getVisibility
Uml::Visibility::Enum getVisibility() const
Definition: codeparameter.cpp:88
CodeParameter::getComment
CodeComment * getComment()
Definition: codeparameter.cpp:124
CodeParameter::ID
QString ID() const
Definition: codeparameter.cpp:147
CodeParameter::getParentObject
UMLObject * getParentObject()
Definition: codeparameter.cpp:140
CodeParameter::updateContent
virtual void updateContent()=0
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
codecomment.h
Uml::Visibility::Enum
Enum
Definition: basictypes.h:45