UMLAssociation Class Reference
This class contains the non-graphic representation of an association. Sets up association information. More...
#include <association.h>
Inheritance diagram for UMLAssociation:

Public Member Functions | |
| UMLAssociation (Uml::Association_Type type, UMLObject *roleA, UMLObject *roleB) | |
| Sets up an association. | |
| UMLAssociation (Uml::Association_Type type=Uml::at_Unknown) | |
| Constructs an association - for loading only. | |
| bool | operator== (UMLAssociation &rhs) |
| Overloaded '==' operator. | |
| virtual | ~UMLAssociation () |
| Standard deconstructor. | |
| QString | toString () const |
| Returns a String representation of this UMLAssociation. | |
| Uml::Association_Type | getAssocType () const |
| Returns the Association_Type of the UMLAssociation. | |
| UMLObject * | getObject (Uml::Role_Type role) |
| Returns the UMLObject assigned to the given role. | |
| Uml::IDType | getObjectId (Uml::Role_Type role) |
| Returns the ID of the UMLObject assigned to the given role. | |
| Uml::Changeability_Type | getChangeability (Uml::Role_Type role) const |
| Returns the Changeablity of the given role. | |
| Uml::Visibility | getVisibility (Uml::Role_Type role) const |
| Returns the Visibility of the given role. | |
| QString | getMulti (Uml::Role_Type role) const |
| Returns the multiplicity assigned to the given role. | |
| QString | getRoleName (Uml::Role_Type role) const |
| Returns the name assigned to the role A. | |
| QString | getRoleDoc (Uml::Role_Type role) const |
| Returns the documentation assigned to the given role. | |
| void | setAssocType (Uml::Association_Type assocType) |
| Sets the assocType of the UMLAssociation. | |
| void | setObject (UMLObject *obj, Uml::Role_Type role) |
| Sets the UMLObject playing the given role in the association. | |
| void | setVisibility (Uml::Visibility value, Uml::Role_Type role) |
| Sets the visibility of the given role of the UMLAssociation. | |
| void | setChangeability (Uml::Changeability_Type value, Uml::Role_Type role) |
| Sets the changeability of the given role of the UMLAssociation. | |
| void | setMulti (const QString &multi, Uml::Role_Type role) |
| Sets the multiplicity of the given role of the UMLAssociation. | |
| void | setRoleName (const QString &roleName, Uml::Role_Type role) |
| Sets the name of the given role of the UMLAssociation. | |
| void | setRoleDoc (const QString &doc, Uml::Role_Type role) |
| Sets the documentation on the given role in the association. | |
| UMLRole * | getUMLRole (Uml::Role_Type role) |
| Get the underlying UMLRole object for the given role. | |
| void | setOldLoadMode (bool value=true) |
| Set backward compatibility flag for loading version 1.3.x files. | |
| bool | getOldLoadMode () const |
| Return the backward compatibility flag for loading files. | |
| virtual UMLObject * | clone () const |
| Make a clone of this object. | |
| virtual bool | resolveRef () |
| Resolve types. | |
| void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
| Creates the <UML:Generalization> or <UML:Association> XMI element including its role objects. | |
Static Public Member Functions | |
| static QString | typeAsString (Uml::Association_Type atype) |
| Converts a Uml::Association_Type to its string representation. | |
| static bool | assocTypeHasUMLRepresentation (Uml::Association_Type atype) |
| Returns true if the given Association_Type has a representation as a UMLAssociation. | |
| static QString | ChangeabilityToString (Uml::Changeability_Type type) |
| Convert Changeability_Type value into QString representation. | |
Protected Member Functions | |
| bool | load (QDomElement &element) |
| Creates the <UML:Generalization> or <UML:Association> XMI element including its role objects. | |
| void | init (Uml::Association_Type type, UMLObject *roleAObj, UMLObject *roleBObj) |
| Common initializations at construction time. | |
Protected Attributes | |
| int | nrof_parent_widgets |
| UMLRole * | m_pRole [2] |
| Uml::Association_Type | m_AssocType |
| QString | m_Name |
| The objects name. | |
| bool | m_bOldLoadMode |
Static Protected Attributes | |
| static const Uml::Association_Type | atypeFirst = Uml::at_Generalization |
| static const Uml::Association_Type | atypeLast = Uml::at_Relationship |
| static const unsigned int | nAssocTypes |
| static const QString | assocTypeStr [] |
Friends | |
| class | AssociationWidget |
Detailed Description
This class contains the non-graphic representation of an association. Sets up association information.An association can be a generalization, realization, simple association, directed association, aggregation, or composition.
- Author:
- Oliver Kellogg <okellogg@users.sourceforge.net>
- See also:
- UMLObject Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
Definition at line 33 of file association.h.
Constructor & Destructor Documentation
|
||||||||||||||||
|
Sets up an association. A new unique ID is assigned internally.
Definition at line 36 of file association.cpp. References UMLObject::init(), and UMLObject::setID(). |
|
|
Constructs an association - for loading only. This constructor should not normally be used as it constructs an incomplete association (i.e. the role objects are missing.)
Definition at line 46 of file association.cpp. References UMLObject::init(). |
|
|
Standard deconstructor.
Definition at line 53 of file association.cpp. |
Member Function Documentation
|
|
Overloaded '==' operator.
Definition at line 70 of file association.cpp. References m_Name. |
|
|
Returns a String representation of this UMLAssociation.
Definition at line 106 of file association.cpp. References UMLObject::getName(), UMLRole::getObject(), and typeAsString(). |
|
|
Converts a Uml::Association_Type to its string representation.
Definition at line 125 of file association.cpp. Referenced by toString(), and IDLWriter::writeClass(). |
|
|
Returns true if the given Association_Type has a representation as a UMLAssociation.
Definition at line 132 of file association.cpp. |
|
|
Returns the Association_Type of the UMLAssociation.
Definition at line 102 of file association.cpp. Referenced by AssociationWidget::activate(), UMLView::createAutoAssociations(), UMLDoc::findAssociation(), AssociationWidget::getAssocType(), UMLCanvasObject::getSpecificAssocs(), AssociationWidget::loadFromXMI(), UMLRole::saveToXMI(), CodeClassField::setParentUMLObject(), and IDLWriter::writeClass(). |
|
|
Returns the UMLObject assigned to the given role.
Definition at line 447 of file association.cpp. References UMLRole::getObject(). Referenced by UMLPackage::addObject(), UMLView::createAutoAssociations(), UMLDoc::findAssociation(), Model_Utils::guessContainer(), load(), UMLCanvasObject::removeAllAssociationEnds(), SQLWriter::writeClass(), PhpWriter::writeClass(), Php5Writer::writeClass(), IDLWriter::writeClass(), and CSharpWriter::writeClass(). |
|
|
Returns the ID of the UMLObject assigned to the given role. Shorthand for getObject(role)->getID().
Definition at line 451 of file association.cpp. References UMLObject::getID(), UMLRole::getObject(), and UMLObject::getSecondaryId(). Referenced by UMLClassifier::getUniAssociationToBeImplemented(), AssociationWidget::getWidgetID(), load(), and saveToXMI(). |
|
|
Returns the Changeablity of the given role.
Definition at line 475 of file association.cpp. References UMLRole::getChangeability(). Referenced by AssociationWidget::getChangeability(), and AssociationWidget::syncToModel(). |
|
|
Returns the Visibility of the given role.
Definition at line 479 of file association.cpp. References UMLObject::getVisibility(). Referenced by AssociationWidget::getVisibility(), and AssociationWidget::syncToModel(). |
|
|
Returns the multiplicity assigned to the given role.
Definition at line 483 of file association.cpp. References UMLRole::getMultiplicity(). Referenced by AssociationWidget::syncToModel(), PhpWriter::writeClass(), Php5Writer::writeClass(), and IDLWriter::writeClass(). |
|
|
Returns the name assigned to the role A.
Definition at line 487 of file association.cpp. References UMLObject::getName(). Referenced by UMLClassifier::getUniAssociationToBeImplemented(), AssociationWidget::syncToModel(), and SQLWriter::writeClass(). |
|
|
Returns the documentation assigned to the given role.
Definition at line 491 of file association.cpp. References UMLObject::getDoc(). Referenced by AssociationWidget::getRoleDoc(). |
|
|
Sets the assocType of the UMLAssociation.
Definition at line 507 of file association.cpp. References UMLApp::getDocument(), UMLDoc::loading(), and UMLObject::modified(). Referenced by UMLRole::load(), load(), AssociationWidget::setAssocType(), and Import_Rose::umbrellify(). |
|
||||||||||||
|
Sets the UMLObject playing the given role in the association.
Definition at line 522 of file association.cpp. References UMLRole::setObject(). Referenced by AssociationWidget::setWidget(). |
|
||||||||||||
|
Sets the visibility of the given role of the UMLAssociation.
Definition at line 526 of file association.cpp. References UMLObject::setVisibility(). Referenced by load(), and AssociationWidget::setVisibility(). |
|
||||||||||||
|
Sets the changeability of the given role of the UMLAssociation.
Definition at line 530 of file association.cpp. References UMLRole::setChangeability(). Referenced by load(), and AssociationWidget::setChangeability(). |
|
||||||||||||
|
Sets the multiplicity of the given role of the UMLAssociation.
Definition at line 534 of file association.cpp. References UMLRole::setMultiplicity(). Referenced by load(), and AssociationWidget::setMulti(). |
|
||||||||||||
|
Sets the name of the given role of the UMLAssociation.
Definition at line 538 of file association.cpp. References UMLObject::setName(). Referenced by load(), and AssociationWidget::setRoleName(). |
|
||||||||||||
|
Sets the documentation on the given role in the association.
Definition at line 542 of file association.cpp. References UMLObject::setDoc(). Referenced by load(), and AssociationWidget::setRoleDoc(). |
|
|
Convert Changeability_Type value into QString representation.
Definition at line 546 of file association.cpp. Referenced by AssociationWidget::setChangeability(). |
|
|
Get the underlying UMLRole object for the given role.
Definition at line 495 of file association.cpp. Referenced by Model_Utils::findObjectInList(), load(), resolveRef(), saveToXMI(), OwnedCodeBlock::setAttributesFromNode(), CodeParameter::setAttributesFromNode(), and Import_Rose::umbrellify(). |
|
|
Set backward compatibility flag for loading version 1.3.x files. This flag is necessary because the handling of the isNavigable attribute of <associationend> was incorrect. Definition at line 499 of file association.cpp. Referenced by UMLRole::load(). |
|
|
Return the backward compatibility flag for loading files.
Definition at line 503 of file association.cpp. Referenced by UMLRole::load(). |
|
|
Make a clone of this object. Cloning associations is not supported yet. Implements UMLObject. Definition at line 231 of file association.h. |
|
|
Resolve types. Required when dealing with foreign XMI files. Needs to be called after all UML objects are loaded from file. Overrides the method from UMLObject. Calls resolveRef() for each role.
Reimplemented from UMLObject. Definition at line 145 of file association.cpp. References UMLPackage::addAssocToConcepts(), UMLObject::getBaseType(), UMLRole::getObject(), getUMLRole(), and UMLObject::resolveRef(). |
|
||||||||||||
|
Creates the <UML:Generalization> or <UML:Association> XMI element including its role objects.
Implements UMLObject. Definition at line 162 of file association.cpp. References getObjectId(), getUMLRole(), UMLObject::save(), and UMLRole::saveToXMI(). |
|
|
Creates the <UML:Generalization> or <UML:Association> XMI element including its role objects.
Reimplemented from UMLObject. Definition at line 193 of file association.cpp. References Model_Utils::convert_OT_MT(), UMLDoc::findObjectById(), UMLObject::getBaseType(), UMLApp::getDocument(), UMLObject::getID(), getObject(), getObjectId(), UMLDoc::getRootFolder(), getUMLRole(), UMLObject::loadFromXMI(), setAssocType(), setChangeability(), setMulti(), UMLRole::setObject(), setRoleDoc(), setRoleName(), UMLObject::setSecondaryId(), setVisibility(), and Uml::tagEq(). |
|
||||||||||||||||
|
Common initializations at construction time.
Definition at line 561 of file association.cpp. References UMLDoc::currentRoot(), UMLApp::getDocument(), and m_Name. |
Member Data Documentation
|
|
Initial value: (unsigned)atypeLast -
(unsigned)atypeFirst + 1
Definition at line 32 of file association.cpp. |
|
|
Initial value: {
i18n("Generalization"),
i18n("Aggregation"),
i18n("Dependency"),
i18n("Association"),
i18n("Self Association"),
i18n("Collaboration Message"),
i18n("Sequence Message"),
i18n("Collaboration Self Message"),
i18n("Sequence Self Message"),
i18n("Containment"),
i18n("Composition"),
i18n("Realization"),
i18n("Uni Association"),
i18n("Anchor"),
i18n("State Transition"),
i18n("Activity"),
}
Definition at line 81 of file association.cpp. |
|
|
The objects name.
Reimplemented from UMLObject. Definition at line 282 of file association.h. Referenced by init(), and operator==(). |
The documentation for this class was generated from the following files:
