umbrello: umbrello/uml1model/instance.h Source File

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

instance.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) 2016-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UMLINSTANCE_H
12 #define UMLINSTANCE_H
13
14 #include "classifier.h"
15
26 class UMLInstance : public UMLClassifier
27 {
28 public:
29 explicit UMLInstance(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None);
30
31 void setClassifierName(const QString &name);
32 QString classifierName();
33
34 void setClassifier(UMLClassifier *classifier);
35 void setClassifierCmd(UMLClassifier *classifier);
36 UMLClassifier *classifier();
37
38 virtual UMLAttribute* createAttribute(const QString &name = QString(),
39 UMLObject *type = 0, Uml::Visibility::Enum vis = Uml::Visibility::Private,
40 const QString &init = QString());
41
42 virtual void saveToXMI1(QDomDocument& qDoc, QDomElement& qElement);
43
44
45 protected:
46 bool load1(QDomElement& element);
47 virtual bool resolveRef();
48 bool showPropertiesDialog(QWidget *parent);
49
50 QPointer<UMLClassifier> m_classifier;
51 };
52
53 #endif // UMLINSTANCE_H
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLInstance
Non-graphical Information for an Instance.
Definition: instance.h:27
UMLInstance::m_classifier
QPointer< UMLClassifier > m_classifier
Definition: instance.h:50
UMLInstance::classifierName
QString classifierName()
Definition: instance.cpp:65
UMLInstance::createAttribute
virtual UMLAttribute * createAttribute(const QString &name=QString(), UMLObject *type=0, Uml::Visibility::Enum vis=Uml::Visibility::Private, const QString &init=QString())
Definition: instance.cpp:102
UMLInstance::setClassifier
void setClassifier(UMLClassifier *classifier)
Definition: instance.cpp:74
UMLInstance::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: instance.cpp:147
UMLInstance::setClassifierCmd
void setClassifierCmd(UMLClassifier *classifier)
Definition: instance.cpp:88
UMLInstance::classifier
UMLClassifier * classifier()
Definition: instance.cpp:97
UMLInstance::resolveRef
virtual bool resolveRef()
Definition: instance.cpp:192
UMLInstance::setClassifierName
void setClassifierName(const QString &name)
Definition: instance.cpp:50
UMLInstance::UMLInstance
UMLInstance(const QString &name=QString(), Uml::ID::Type id=Uml::ID::None)
Definition: instance.cpp:34
UMLInstance::showPropertiesDialog
bool showPropertiesDialog(QWidget *parent)
Definition: instance.cpp:211
UMLInstance::load1
bool load1(QDomElement &element)
Definition: instance.cpp:163
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::init
void init()
Definition: umlobject.cpp:126
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
classifier.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:353
Uml::ID::Type
std::string Type
Definition: basictypes.h:351
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61