umbrello/umbrello
association.cpp
Go to the documentation of this file.
120 string += QLatin1Char(':') + Uml::AssociationType::toStringI18n(m_AssocType) + QLatin1Char(':');
164 assocElement.setAttribute(QLatin1String("parent"), Uml::ID::toString(getObjectId(RoleType::B)));
170 assocElement.setAttribute(QLatin1String("client"), Uml::ID::toString(getObjectId(RoleType::A)));
171 assocElement.setAttribute(QLatin1String("supplier"), Uml::ID::toString(getObjectId(RoleType::B)));
177 assocElement.setAttribute(QLatin1String("client"), Uml::ID::toString(getObjectId(RoleType::A)));
178 assocElement.setAttribute(QLatin1String("supplier"), Uml::ID::toString(getObjectId(RoleType::B)));
184 assocElement.setAttribute(QLatin1String("client"), Uml::ID::toString(getObjectId(RoleType::A)));
185 assocElement.setAttribute(QLatin1String("supplier"), Uml::ID::toString(getObjectId(RoleType::B)));
191 assocElement.setAttribute(QLatin1String("client"), Uml::ID::toString(getObjectId(RoleType::A)));
192 assocElement.setAttribute(QLatin1String("supplier"), Uml::ID::toString(getObjectId(RoleType::B)));
379 if (m_AssocType == Uml::AssociationType::Association && getObjectId(RoleType::A) == getObjectId(RoleType::B))
437 Uml::ID::Type roleAObjID = Uml::ID::fromString(element.attribute(QLatin1String("rolea"), QLatin1String("-1")));
438 Uml::ID::Type roleBObjID = Uml::ID::fromString(element.attribute(QLatin1String("roleb"), QLatin1String("-1")));
483 QString changeabilityA = element.attribute(QLatin1String("changeabilitya"), QLatin1String("0"));
484 QString changeabilityB = element.attribute(QLatin1String("changeabilityb"), QLatin1String("0"));
715 void UMLAssociation::init(Uml::AssociationType::Enum type, UMLObject *roleAObj, UMLObject *roleBObj)
bool getOldLoadMode() const
Return the backward compatibility flag for loading files.
Definition: association.cpp:603
UMLObject * getObject(Uml::RoleType::Enum role) const
Returns the UMLObject assigned to the given role.
Definition: association.cpp:497
QString toString() const
Returns a String representation of this UMLAssociation.
Definition: association.cpp:111
Uml::ID::Type getRoleId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:533
This class defines the non-graphical information required for a UML Classifier (ie a class or interfa...
Definition: classifier.h:39
QString multiplicity() const
Returns the multiplicity assigned to the role.
Definition: umlrole.cpp:96
virtual bool loadFromXMI(QDomElement &element)
This method loads the generic parts of the XMI common to most model classes.
Definition: umlobject.cpp:912
void setAssociationType(Uml::AssociationType::Enum assocType)
Sets the assocType of the UMLAssociation.
Definition: association.cpp:612
QDomNode appendChild(const QDomNode &newChild)
Definition: basictypes.h:215
Uml::Visibility::Enum visibility() const
Returns the visibility of the object.
Definition: umlobject.cpp:431
QString attribute(const QString &name, const QString &defValue) const
static bool tagEq(const QString &tag, const QString &pattern)
Function for comparing tags in XMI files.
Definition: umldoc.cpp:3081
void setRoleDoc(const QString &doc, Uml::RoleType::Enum role)
Sets the documentation on the given role in the association.
Definition: association.cpp:683
void setVisibility(Uml::Visibility::Enum visibility)
Sets the visibility of the object.
Definition: umlobject.cpp:441
void setObject(UMLObject *obj)
Sets the UMLObject playing the role in the association.
Definition: umlrole.cpp:106
Definition: basictypes.h:216
QString toStringI18n(Enum item)
Converts a AssociationType to its string representation.
Definition: basictypes.cpp:325
UMLDoc * document() const
Returns a pointer to the current document connected to the KMainWindow instance.
Definition: uml.cpp:910
void setChangeability(Uml::Changeability::Enum value, Uml::RoleType::Enum role)
Sets the changeability of the given role of the UMLAssociation.
Definition: association.cpp:651
Uml::ModelType::Enum convert_OT_MT(UMLObject::ObjectType ot)
Return the Model_Type which corresponds to the given ObjectType.
Definition: model_utils.cpp:1723
void setMultiplicity(const QString &multi, Uml::RoleType::Enum role)
Sets the multiplicity of the given role of the UMLAssociation.
Definition: association.cpp:661
Definition: basictypes.h:104
QDomNode nextSibling() const
This class contains the non-graphic representation of an association.
Definition: association.h:32
QDomElement toElement() const
void setChangeability(Uml::Changeability::Enum value)
Sets the changeability of the role.
Definition: umlrole.cpp:128
void setObject(UMLObject *obj, Uml::RoleType::Enum role)
Sets the UMLObject playing the given role in the association.
Definition: association.cpp:631
virtual bool resolveRef()
Resolve referenced objects (if any.) Needs to be called after all UML objects are loaded from file...
Definition: umlobject.cpp:707
UMLAssociation(Uml::AssociationType::Enum type, UMLObject *roleA, UMLObject *roleB)
Sets up an association.
Definition: association.cpp:42
Enum fromInt(int item)
Convert a integer item into Changeability representation.
Definition: basictypes.cpp:645
void executeCommand(QUndoCommand *cmd)
Execute a command and push it in the stack.
Definition: uml.cpp:3227
void setAttribute(const QString &name, const QString &value)
int toInt(bool *ok, int base) const
bool isEmpty() const
Uml::AssociationType::Enum getAssocType() const
Returns the AssociationType::Enum of the UMLAssociation.
Definition: association.cpp:103
Uml::Changeability::Enum changeability(Uml::RoleType::Enum role) const
Returns the changeability.
Definition: association.cpp:541
void setOldLoadMode(bool value=true)
Set the attribute m_bOldLoadMode.
Definition: association.cpp:595
Enum fromInt(int item)
Convert a integer item into ProgrammingLanguage representation.
Definition: basictypes.cpp:435
UMLRole * getUMLRole(Uml::RoleType::Enum role) const
Get the underlying UMLRole object for the given role.
Definition: association.cpp:586
bool isCommonXMIAttribute(const QString &tag)
Return true if the given tag is one of the common XMI attributes, such as: "name" | "visibility" | "i...
Definition: model_utils.cpp:525
Definition: basictypes.h:124
bool isNull() const
bool load(QDomElement &element)
Creates the or XMI element including its role objects...
Definition: association.cpp:209
Definition: umlobject.h:54
UMLObject * findObjectById(Uml::ID::Type id)
Used to find a reference to a UMLObject by its ID.
Definition: umldoc.cpp:782
Definition: umlobject.h:58
QDomElement save(const QString &tag, QDomDocument &qDoc)
Auxiliary to saveToXMI.
Definition: umlobject.cpp:806
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the or XMI element including its role objects...
Definition: association.cpp:158
QDomNode firstChild() const
UMLPackage * umlPackage()
Returns the UMLPackage that this class is located in.
Definition: umlobject.cpp:639
QString toString(Enum item)
Convert ModelType item into QString representation.
Definition: basictypes.cpp:39
This class contains the non-graphic representation of an association role.
Definition: umlrole.h:24
bool isComment() const
Definition: basictypes.h:125
bool operator==(const UMLAssociation &rhs) const
Overloaded '==' operator.
Definition: association.cpp:87
Uml::Changeability::Enum changeability() const
Returns the Changeablity of the role.
Definition: umlrole.cpp:86
void setVisibility(Uml::Visibility::Enum value, Uml::RoleType::Enum role)
Sets the visibility of the given role of the UMLAssociation.
Definition: association.cpp:641
QString fromLatin1(const char *str, int size)
QString getRoleDoc(Uml::RoleType::Enum role) const
Returns the documentation assigned to the given role.
Definition: association.cpp:577
QString getRoleName(Uml::RoleType::Enum role) const
Returns the name assigned to the role A.
Definition: association.cpp:568
QString tagName() const
Uml::ID::Type getObjectId(Uml::RoleType::Enum role) const
Returns the ID of the UMLObject assigned to the given role.
Definition: association.cpp:509
void saveToXMI(QDomDocument &qDoc, QDomElement &qElement)
Creates the XMI element.
Definition: umlrole.cpp:160
QDomElement createElement(const QString &tagName)
void setRoleName(const QString &roleName, Uml::RoleType::Enum role)
Sets the name of the given role of the UMLAssociation.
Definition: association.cpp:673
QString getMultiplicity(Uml::RoleType::Enum role) const
Returns the multiplicity assigned to the given role.
Definition: association.cpp:559
bool addAssociationEnd(UMLAssociation *assoc)
Adds an association end to m_List.
Definition: umlcanvasobject.cpp:83
void addAssocToConcepts(UMLAssociation *assoc)
Adds an existing association to the matching concept in the list of concepts.
Definition: package.cpp:80
UMLFolder * rootFolder(Uml::ModelType::Enum mt)
Return the predefined root folder of the given type.
Definition: umldoc.cpp:2721
Enum fromInt(int item)
Convert a integer item into RoleType representation.
Definition: basictypes.cpp:745
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.