umbrello: umbrello/uml1model/uniqueconstraint.h Source File

umbrello 2.31.1 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 * 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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef UNIQUECONSTRAINT_H
12 #define UNIQUECONSTRAINT_H
13
14 #include "basictypes.h"
15 #include "classifierlistitem.h"
16 #include "entityconstraint.h"
17 #include "umlclassifierlist.h"
18 #include "umlentityattributelist.h"
19
28 class UMLUniqueConstraint : public UMLEntityConstraint
29 {
30 public:
31
32 UMLUniqueConstraint(UMLObject *parent, const QString& name,
33 Uml::ID::Type id = Uml::ID::None);
34 explicit UMLUniqueConstraint(UMLObject *parent);
35 virtual ~UMLUniqueConstraint();
36
37 bool operator==(const UMLUniqueConstraint &rhs) const;
38
39 virtual void copyInto(UMLObject *lhs) const;
40
41 virtual UMLObject* clone() const;
42
43 QString toString(Uml::SignatureType::Enum sig = Uml::SignatureType::NoSig, bool withStereotype=false);
44
45 QString getFullyQualifiedName(const QString& separator = QString(),
46 bool includeRoot = false) const;
47
48 void saveToXMI1(QDomDocument & qDoc, QDomElement & qElement);
49
50 virtual bool showPropertiesDialog(QWidget* parent = 0);
51
52 bool hasEntityAttribute(UMLEntityAttribute* attr);
53
54 bool addEntityAttribute(UMLEntityAttribute* attr);
55
56 bool removeEntityAttribute(UMLEntityAttribute* attr);
57
58 UMLEntityAttributeList getEntityAttributeList() const;
59
60 void clearAttributeList();
61
62 protected:
63
64 bool load1(QDomElement & element);
65
66 private:
67
68 void init();
69
73 UMLEntityAttributeList m_EntityAttributeList;
74
75 };
76
77 #endif
UMLObject::id
virtual Uml::ID::Type id() const
Definition: umlobject.cpp:425
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:35
umluniqueconstraintdialog.h
UMLUniqueConstraint::getFullyQualifiedName
QString getFullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: uniqueconstraint.cpp:141
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLEntityConstraint::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: entityconstraint.cpp:70
UMLUniqueConstraint::clone
virtual UMLObject * clone() const
Definition: uniqueconstraint.cpp:98
umlattributedialog.h
entity.h
Uml::ID::None
const Type None
special value for uninitialized ID
Definition: basictypes.h:370
object_factory.h
Uml::SignatureType::SigNoVis
@ SigNoVis
Definition: basictypes.h:182
UMLEntityAttribute::saveToXMI1
virtual void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: entityattribute.cpp:236
UMLUniqueConstraint::removeEntityAttribute
bool removeEntityAttribute(UMLEntityAttribute *attr)
Definition: uniqueconstraint.cpp:278
UMLObject::umlParent
UMLObject * umlParent() const
Definition: umlobject.cpp:670
UMLEntityConstraint
Sets up entity constraint information.
Definition: entityconstraint.h:27
UMLUniqueConstraint::saveToXMI1
void saveToXMI1(QDomDocument &qDoc, QDomElement &qElement)
Definition: uniqueconstraint.cpp:151
Uml::ID::Type
std::string Type
Definition: basictypes.h:368
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::asUMLEntityAttribute
UMLEntityAttribute * asUMLEntityAttribute()
Definition: umlobject.cpp:1313
entityconstraint.h
UMLUniqueConstraint::m_EntityAttributeList
UMLEntityAttributeList m_EntityAttributeList
Definition: uniqueconstraint.h:81
UMLObject::asUMLEntity
UMLEntity * asUMLEntity()
Definition: umlobject.cpp:1312
UMLObject::m_BaseType
ObjectType m_BaseType
objects type
Definition: umlobject.h:276
UMLUniqueConstraint::UMLUniqueConstraint
UMLUniqueConstraint(UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: uniqueconstraint.cpp:31
UMLUniqueConstraint::clearAttributeList
void clearAttributeList()
Definition: uniqueconstraint.cpp:323
classifierlistitem.h
entityattribute.h
UMLUniqueConstraint::copyInto
virtual void copyInto(UMLObject *lhs) const
Definition: uniqueconstraint.cpp:73
UMLUniqueConstraint::load1
bool load1(QDomElement &element)
Definition: uniqueconstraint.cpp:181
umlentityattributelist.h
UMLClassifier::findChildObjectById
virtual UMLObject * findChildObjectById(Uml::ID::Type id, bool considerAncestors=false)
Definition: classifier.cpp:546
UMLUniqueConstraint::hasEntityAttribute
bool hasEntityAttribute(UMLEntityAttribute *attr)
Definition: uniqueconstraint.cpp:226
UMLUniqueConstraintDialog
A dialog page to display unique constraint properties.
Definition: umluniqueconstraintdialog.h:36
uWarning
#define uWarning()
Definition: debug_utils.h:124
UMLObject::save1
QDomElement save1(const QString &tag, QDomDocument &qDoc)
Definition: umlobject.cpp:844
umlclassifierlist.h
UMLEntity::setAsPrimaryKey
bool setAsPrimaryKey(UMLUniqueConstraint *uconstr)
Definition: entity.cpp:512
basictypes.h
uDebug
#define uDebug()
Definition: debug_utils.h:122
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:179
UMLObject::ot_UniqueConstraint
@ ot_UniqueConstraint
Definition: umlobject.h:105
UMLEntityAttributeList
Definition: umlentityattributelist.h:26
UMLCanvasObject::findChildObject
virtual UMLObject * findChildObject(const QString &n, UMLObject::ObjectType t=UMLObject::ot_UMLObject)
Definition: umlcanvasobject.cpp:238
UMLUniqueConstraint::addEntityAttribute
bool addEntityAttribute(UMLEntityAttribute *attr)
Definition: uniqueconstraint.cpp:245
UMLUniqueConstraint::~UMLUniqueConstraint
virtual ~UMLUniqueConstraint()
Definition: uniqueconstraint.cpp:65
UMLDoc::tagEq
static bool tagEq(const QString &tag, const QString &pattern)
Definition: umldoc.cpp:3548
uError
#define uError()
Definition: debug_utils.h:123
UMLObject::asUMLUniqueConstraint
UMLUniqueConstraint * asUMLUniqueConstraint()
Definition: umlobject.cpp:1329
uniqueconstraint.h
uml.h
Uml::SignatureType::ShowSig
@ ShowSig
Definition: basictypes.h:181
debug_utils.h
UMLUniqueConstraint::init
void init()
Definition: uniqueconstraint.cpp:315
UMLUniqueConstraint::operator==
bool operator==(const UMLUniqueConstraint &rhs) const
Definition: uniqueconstraint.cpp:51
UMLUniqueConstraint::getEntityAttributeList
UMLEntityAttributeList getEntityAttributeList() const
Definition: uniqueconstraint.cpp:310
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:180
UMLUniqueConstraint::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: uniqueconstraint.cpp:172
UMLEntity::isPrimaryKey
bool isPrimaryKey(UMLUniqueConstraint *uConstr) const
Definition: entity.cpp:679
UMLEntityAttribute
Sets up entityattribute information.
Definition: entityattribute.h:26
UMLUniqueConstraint::toString
QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: uniqueconstraint.cpp:112
umldoc.h
UMLUniqueConstraint
Sets up Unique entity constraint information.
Definition: uniqueconstraint.h:29