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

codeparameter.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 CODEPARAMETER_H
13 #define CODEPARAMETER_H
14
15 #include "basictypes.h"
16 #include "codecomment.h"
17
18 class ClassifierCodeDocument;
19 class UMLObject;
20
25 class CodeParameter : public QObject
26 {
27 Q_OBJECT
28 public:
29
30 CodeParameter(ClassifierCodeDocument* doc, UMLObject* parentObj);
31 virtual ~CodeParameter();
32
33 ClassifierCodeDocument* getParentDocument();
34
35 UMLObject* getParentObject();
36
37 bool getAbstract();
38
39 bool getStatic();
40
41 QString getName() const;
42
43 virtual QString getTypeName();
44
45 Uml::Visibility::Enum getVisibility() const;
46
47 virtual void setInitialValue(const QString &new_var);
48 virtual QString getInitialValue();
49
50 void setComment(CodeComment* comment);
51 CodeComment* getComment();
52
53 // the id of this parameter is the same as the parent UMLObject id.
54 QString ID();
55
56 virtual void updateContent() = 0;
57
58 protected:
59
60 virtual void setAttributesOnNode(QDomDocument& doc, QDomElement& blockElement);
61 virtual void setAttributesFromNode(QDomElement& element);
62
63 private:
64
65 ClassifierCodeDocument* m_parentDocument;
66 UMLObject* m_parentObject;
67 CodeComment* m_comment;
68 QString m_initialValue;
69
70 void initFields(ClassifierCodeDocument* doc, UMLObject* obj);
71
72 public slots:
73
74 void syncToParent();
75
76 };
77
78 #endif // CODEPARAMETER_H
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
umlrole.h
CodeParameter::CodeParameter
CodeParameter(ClassifierCodeDocument *doc, UMLObject *parentObj)
Definition: codeparameter.cpp:29
codegenfactory.h
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
CodeParameter::m_initialValue
QString m_initialValue
initial value of this code parameter
Definition: codeparameter.h:68
CodeParameter::setInitialValue
virtual void setInitialValue(const QString &new_var)
Definition: codeparameter.cpp:99
CodeComment
Definition: codecomment.h:24
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
Uml::RoleType::A
@ A
Definition: basictypes.h:239
Uml::ID::toString
QString toString(const ID::Type &id)
Definition: basictypes.cpp:1263
CodeComment::saveToXMI1
virtual void saveToXMI1(QDomDocument &doc, QDomElement &root)
Definition: codecomment.cpp:31
association.h
UMLObject::isStatic
bool isStatic() const
Definition: umlobject.cpp:366
CodeParameter::m_parentObject
UMLObject * m_parentObject
Definition: codeparameter.h:66
UMLObject::asUMLAssociation
UMLAssociation * asUMLAssociation()
Definition: umlobject.cpp:1304
codeparameter.h
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
CodeParameter::getParentDocument
ClassifierCodeDocument * getParentDocument()
Definition: codeparameter.cpp:133
CodeParameter::m_parentDocument
ClassifierCodeDocument * m_parentDocument
Definition: codeparameter.h:65
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::isAbstract
bool isAbstract() const
Definition: umlobject.cpp:348
UMLRole
Definition: umlrole.h:25
CodeParameter::syncToParent
void syncToParent()
Definition: codeparameter.cpp:269
CodeParameter::getAbstract
bool getAbstract()
Definition: codeparameter.cpp:47
ClassifierCodeDocument
Definition: classifiercodedocument.h:33
UMLAssociation::getUMLRole
UMLRole * getUMLRole(Uml::RoleType::Enum role) const
Definition: association.cpp:585
Uml::ID::fromString
ID::Type fromString(const QString &id)
Definition: basictypes.cpp:1268
CodeParameter::ID
QString ID()
Definition: codeparameter.cpp:148
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
CodeGenFactory::newCodeComment
CodeComment * newCodeComment(CodeDocument *cd)
Definition: codegenfactory.cpp:402
UMLDoc::findObjectById
UMLObject * findObjectById(Uml::ID::Type id)
Definition: umldoc.cpp:1038
attribute.h
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLObject::asUMLRole
UMLRole * asUMLRole()
Definition: umlobject.cpp:1327
classifiercodedocument.h
CodeParameter::initFields
void initFields(ClassifierCodeDocument *doc, UMLObject *obj)
Definition: codeparameter.cpp:276
CodeParameter::getInitialValue
virtual QString getInitialValue()
Definition: codeparameter.cpp:109
basictypes.h
CodeParameter::~CodeParameter
virtual ~CodeParameter()
Definition: codeparameter.cpp:39
Uml::RoleType::B
@ B
Definition: basictypes.h:240
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
CodeParameter::updateContent
virtual void updateContent()=0
CodeParameter::setComment
void setComment(CodeComment *comment)
Definition: codeparameter.cpp:117
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:278
CodeParameter::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Definition: codeparameter.cpp:192
CodeParameter::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Definition: codeparameter.cpp:166
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
CodeParameter::getVisibility
Uml::Visibility::Enum getVisibility() const
Definition: codeparameter.cpp:89
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
CodeParameter::getStatic
bool getStatic()
Definition: codeparameter.cpp:57
uError
#define uError()
Definition: debug_utils.h:123
CodeParameter::getTypeName
virtual QString getTypeName()
Definition: codeparameter.cpp:78
uml.h
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:33
umlobject.h
CodeComment::loadFromXMI1
virtual void loadFromXMI1(QDomElement &root)
Definition: codecomment.cpp:42
UMLRole::role
Uml::RoleType::Enum role() const
Definition: umlrole.cpp:169
CodeParameter::getComment
CodeComment * getComment()
Definition: codeparameter.cpp:125
TextBlock::setText
void setText(const QString &text)
Definition: textblock.cpp:80
CodeParameter
Definition: codeparameter.h:26
codecomment.h
CodeParameter::getName
QString getName() const
Definition: codeparameter.cpp:67
CodeParameter::getParentObject
UMLObject * getParentObject()
Definition: codeparameter.cpp:141
UMLApp::document
UMLDoc * document() const
Definition: uml.cpp:1064
umldoc.h
UMLRole::parentAssociation
UMLAssociation * parentAssociation() const
Definition: umlrole.cpp:84
CodeParameter::m_comment
CodeComment * m_comment
Definition: codeparameter.h:67