umbrello/umbrello
#include <association.h>
Protected Member Functions | |
void | init (Uml::AssociationType::Enum type, UMLObject *roleAObj, UMLObject *roleBObj) |
bool | load (QDomElement &element) |
Protected Member Functions inherited from UMLObject | |
void | init () |
void | maybeSignalObjectCreated () |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Attributes | |
Uml::AssociationType::Enum | m_AssocType |
bool | m_bOldLoadMode |
QString | m_Name |
UMLRole * | m_pRole [2] |
int | nrof_parent_widgets |
Protected Attributes inherited from UMLObject | |
bool | m_bAbstract |
ObjectType | m_BaseType |
bool | m_bCreationWasSignalled |
bool | m_bInPaste |
bool | m_bStatic |
QString | m_Doc |
QString | m_name |
Uml::ID::Type | m_nId |
UMLObject * | m_pSecondary |
UMLStereotype * | m_pStereotype |
UMLPackage * | m_pUMLPackage |
QString | m_SecondaryFallback |
QString | m_SecondaryId |
Uml::Visibility::Enum | m_visibility |
Additional Inherited Members | |
Public Types inherited from UMLObject | |
enum | ObjectType { ot_Unknown = -1, ot_UMLObject = 100, ot_Actor, ot_UseCase, ot_Package, ot_Interface, ot_Datatype, ot_Enum, ot_Class, ot_Association, ot_Attribute, ot_Operation, ot_EnumLiteral, ot_Template, ot_Component, ot_Artifact, ot_Node, ot_Stereotype, ot_Role, ot_Entity, ot_EntityAttribute, ot_Folder, ot_EntityConstraint, ot_UniqueConstraint, ot_ForeignKeyConstraint, ot_CheckConstraint, ot_Category, ot_Port } |
Public Slots inherited from UMLObject | |
void | emitModified () |
Signals inherited from UMLObject | |
void | modified () |
Static Public Member Functions inherited from UMLObject | |
static QString | toString (ObjectType ot) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
This class contains the non-graphic representation of an association.
An association can be a generalization, realization, simple association, directed association, aggregation, or composition.
Sets up association information.
- See also
- UMLObject Bugs and comments to umbre or llo- devel @kde .orghttp://bugs.kde.org
Definition at line 32 of file association.h.
Constructor & Destructor Documentation
UMLAssociation::UMLAssociation | ( | Uml::AssociationType::Enum | type, |
UMLObject * | roleA, | ||
UMLObject * | roleB | ||
) |
Sets up an association.
A new unique ID is assigned internally.
- Parameters
-
type The AssociationType::Enum to construct. roleA Pointer to the UMLObject in role A. roleB Pointer to the UMLObject in role B.
Definition at line 42 of file association.cpp.
|
explicit |
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.)
- Parameters
-
type The AssociationType::Enum to construct. Default: Unknown.
Definition at line 59 of file association.cpp.
|
virtual |
Standard destructor.
Definition at line 68 of file association.cpp.
Member Function Documentation
Uml::Changeability::Enum UMLAssociation::changeability | ( | Uml::RoleType::Enum | role | ) | const |
Returns the changeability.
Definition at line 541 of file association.cpp.
|
inlinevirtual |
Implements UMLObject.
Definition at line 75 of file association.h.
Uml::AssociationType::Enum UMLAssociation::getAssocType | ( | ) | const |
Returns the AssociationType::Enum of the UMLAssociation.
- Returns
- The AssociationType::Enum of the UMLAssociation.
Definition at line 103 of file association.cpp.
QString UMLAssociation::getMultiplicity | ( | Uml::RoleType::Enum | role | ) | const |
Returns the multiplicity assigned to the given role.
- Returns
- The multiplicity assigned to the given role.
Definition at line 559 of file association.cpp.
UMLObject * UMLAssociation::getObject | ( | Uml::RoleType::Enum | role | ) | const |
Returns the UMLObject assigned to the given role.
- Returns
- Pointer to the UMLObject in the given role.
Definition at line 497 of file association.cpp.
Uml::ID::Type UMLAssociation::getObjectId | ( | Uml::RoleType::Enum | role | ) | const |
Returns the ID of the UMLObject assigned to the given role.
Shorthand for getObject(role)->ID().
- Returns
- ID of the UMLObject in the given role.
Definition at line 509 of file association.cpp.
bool UMLAssociation::getOldLoadMode | ( | ) | const |
Return the backward compatibility flag for loading files.
Definition at line 603 of file association.cpp.
QString UMLAssociation::getRoleDoc | ( | Uml::RoleType::Enum | role | ) | const |
Returns the documentation assigned to the given role.
- Returns
- Documentation text of given role.
Definition at line 577 of file association.cpp.
Uml::ID::Type UMLAssociation::getRoleId | ( | Uml::RoleType::Enum | role | ) | const |
Returns the ID of the UMLObject assigned to the given role.
CURRENTLY UNUSED.
- Returns
- ID of the UMLObject of the given role.
Definition at line 533 of file association.cpp.
QString UMLAssociation::getRoleName | ( | Uml::RoleType::Enum | role | ) | const |
Returns the name assigned to the role A.
- Returns
- The name assigned to the given role.
Definition at line 568 of file association.cpp.
UMLRole * UMLAssociation::getUMLRole | ( | Uml::RoleType::Enum | role | ) | const |
Get the underlying UMLRole object for the given role.
- Returns
- Pointer to the UMLRole object for the given role.
Definition at line 586 of file association.cpp.
|
protected |
Common initializations at construction time.
- Parameters
-
type The AssociationType::Enum to represent. roleAObj Pointer to the role A UMLObject. roleBObj Pointer to the role B UMLObject.
Definition at line 715 of file association.cpp.
|
protectedvirtual |
Creates the <UML:Generalization> or <UML:Association> XMI element including its role objects.
Reimplemented from UMLObject.
Definition at line 209 of file association.cpp.
bool UMLAssociation::operator== | ( | const UMLAssociation & | rhs | ) | const |
Overloaded '==' operator.
Definition at line 87 of file association.cpp.
|
virtual |
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.
- Returns
- True for success.
Reimplemented from UMLObject.
Definition at line 137 of file association.cpp.
|
virtual |
Creates the <UML:Generalization> or <UML:Association> XMI element including its role objects.
Implements UMLObject.
Definition at line 158 of file association.cpp.
void UMLAssociation::setAssociationType | ( | Uml::AssociationType::Enum | assocType | ) |
Sets the assocType of the UMLAssociation.
- Parameters
-
assocType The AssociationType::Enum of the UMLAssociation.
Definition at line 612 of file association.cpp.
void UMLAssociation::setChangeability | ( | Uml::Changeability::Enum | value, |
Uml::RoleType::Enum | role | ||
) |
Sets the changeability of the given role of the UMLAssociation.
- Parameters
-
value Changeability_Type of the given role. role The Uml::RoleType::Enum to which the changeability is being set
Definition at line 651 of file association.cpp.
void UMLAssociation::setMultiplicity | ( | const QString & | multi, |
Uml::RoleType::Enum | role | ||
) |
Sets the multiplicity of the given role of the UMLAssociation.
- Parameters
-
multi The multiplicity of the given role. role The Uml::RoleType::Enum to which the multiplicity is being applied
Definition at line 661 of file association.cpp.
void UMLAssociation::setObject | ( | UMLObject * | obj, |
Uml::RoleType::Enum | role | ||
) |
Sets the UMLObject playing the given role in the association.
- Parameters
-
obj Pointer to the UMLObject of the given role. role The Uml::RoleType::Enum played by the association
Definition at line 631 of file association.cpp.
void UMLAssociation::setOldLoadMode | ( | bool | value = true | ) |
Set the attribute m_bOldLoadMode.
- Parameters
-
value the new value to set
Definition at line 595 of file association.cpp.
void UMLAssociation::setRoleDoc | ( | const QString & | doc, |
Uml::RoleType::Enum | role | ||
) |
Sets the documentation on the given role in the association.
- Parameters
-
doc The string with the documentation. role The Uml::RoleType::Enum to which the documentation is being applied
Definition at line 683 of file association.cpp.
void UMLAssociation::setRoleName | ( | const QString & | roleName, |
Uml::RoleType::Enum | role | ||
) |
Sets the name of the given role of the UMLAssociation.
- Parameters
-
roleName The name to set for the given role. role The Uml::RoleType::Enum for which to set the name.
Definition at line 673 of file association.cpp.
void UMLAssociation::setVisibility | ( | Uml::Visibility::Enum | value, |
Uml::RoleType::Enum | role | ||
) |
Sets the visibility of the given role of the UMLAssociation.
- Parameters
-
value Visibility of role. role The Uml::RoleType::Enum to which the visibility is being applied
Definition at line 641 of file association.cpp.
QString UMLAssociation::toString | ( | ) | const |
Returns a String representation of this UMLAssociation.
Definition at line 111 of file association.cpp.
Uml::Visibility::Enum UMLAssociation::visibility | ( | Uml::RoleType::Enum | role | ) | const |
Returns the Visibility of the given role.
- Returns
- Visibility of the given role.
Definition at line 550 of file association.cpp.
Member Data Documentation
|
protected |
Definition at line 91 of file association.h.
|
protected |
Definition at line 93 of file association.h.
|
protected |
Definition at line 92 of file association.h.
|
protected |
Definition at line 90 of file association.h.
|
protected |
Definition at line 86 of file association.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.