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

uniqueconstraint.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UNIQUECONSTRAINT_H
7#define UNIQUECONSTRAINT_H
8
9#include "basictypes.h"
10#include "classifierlistitem.h"
11#include "entityconstraint.h"
12#include "umlclassifierlist.h"
13#include "umlentityattributelist.h"
14
23 class UMLUniqueConstraint : public UMLEntityConstraint
24{
25 public:
26
27 UMLUniqueConstraint(UMLObject *parent, const QString& name,
28 Uml::ID::Type id = Uml::ID::None);
29 explicit UMLUniqueConstraint(UMLObject *parent);
30 virtual ~UMLUniqueConstraint();
31
32 bool operator==(const UMLUniqueConstraint &rhs) const;
33
34 virtual void copyInto(UMLObject *lhs) const;
35
36 virtual UMLObject* clone() const;
37
38 QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
39
40 QString getFullyQualifiedName(const QString& separator = QString(),
41 bool includeRoot = false) const;
42
43 void saveToXMI1(QXmlStreamWriter& writer);
44
45 virtual bool showPropertiesDialog(QWidget* parent = 0);
46
47 bool hasEntityAttribute(UMLEntityAttribute* attr);
48
49 bool addEntityAttribute(UMLEntityAttribute* attr);
50
51 bool removeEntityAttribute(UMLEntityAttribute* attr);
52
53 UMLEntityAttributeList getEntityAttributeList() const;
54
55 void clearAttributeList();
56
57 protected:
58
59 bool load1(QDomElement & element);
60
61 private:
62
63 void init();
64
68 UMLEntityAttributeList m_EntityAttributeList;
69
70};
71
72#endif
basictypes.h
UMLEntityAttributeList
Definition: umlentityattributelist.h:20
UMLEntityAttribute
Sets up entityattribute information.
Definition: entityattribute.h:21
UMLEntityConstraint
Sets up entity constraint information.
Definition: entityconstraint.h:22
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
UMLObject::name
QString name() const
Definition: umlobject.cpp:206
UMLUniqueConstraint
Sets up Unique entity constraint information.
Definition: uniqueconstraint.h:24
UMLUniqueConstraint::saveToXMI1
void saveToXMI1(QXmlStreamWriter &writer)
Definition: uniqueconstraint.cpp:146
UMLUniqueConstraint::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: uniqueconstraint.cpp:68
UMLUniqueConstraint::load1
bool load1(QDomElement &element)
Definition: uniqueconstraint.cpp:176
UMLUniqueConstraint::~UMLUniqueConstraint
virtual ~UMLUniqueConstraint()
Definition: uniqueconstraint.cpp:60
UMLUniqueConstraint::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: uniqueconstraint.cpp:136
UMLUniqueConstraint::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: uniqueconstraint.cpp:107
UMLUniqueConstraint::hasEntityAttribute
bool hasEntityAttribute(UMLEntityAttribute *attr)
Definition: uniqueconstraint.cpp:221
UMLUniqueConstraint::UMLUniqueConstraint
UMLUniqueConstraint(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: uniqueconstraint.cpp:26
UMLUniqueConstraint::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: uniqueconstraint.cpp:167
UMLUniqueConstraint::clone
virtual UMLObject * clone() const
Definition: uniqueconstraint.cpp:93
UMLUniqueConstraint::addEntityAttribute
bool addEntityAttribute(UMLEntityAttribute *attr)
Definition: uniqueconstraint.cpp:240
UMLUniqueConstraint::clearAttributeList
void clearAttributeList()
Definition: uniqueconstraint.cpp:318
UMLUniqueConstraint::removeEntityAttribute
bool removeEntityAttribute(UMLEntityAttribute *attr)
Definition: uniqueconstraint.cpp:273
UMLUniqueConstraint::operator==
bool operator==(const UMLUniqueConstraint &rhs) const
Definition: uniqueconstraint.cpp:46
UMLUniqueConstraint::m_EntityAttributeList
UMLEntityAttributeList m_EntityAttributeList
Definition: uniqueconstraint.h:68
UMLUniqueConstraint::getEntityAttributeList
UMLEntityAttributeList getEntityAttributeList() const
Definition: uniqueconstraint.cpp:305
UMLUniqueConstraint::init
void init()
Definition: uniqueconstraint.cpp:310
classifierlistitem.h
entityconstraint.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:373
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:160
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:161
umlclassifierlist.h
umlentityattributelist.h