umbrello/umbrello
#include <association.h>
Public Member Functions | |
UMLAssociation (Uml::AssociationType::Enum type, UMLObject *roleA, UMLObject *roleB) | |
UMLAssociation (Uml::AssociationType::Enum type=Uml::AssociationType::Unknown) | |
virtual | ~UMLAssociation () |
Uml::Changeability::Enum | changeability (Uml::RoleType::Enum role) const |
virtual UMLObject * | clone () const |
Uml::AssociationType::Enum | getAssocType () const |
QString | getMultiplicity (Uml::RoleType::Enum role) const |
UMLObject * | getObject (Uml::RoleType::Enum role) const |
Uml::ID::Type | getObjectId (Uml::RoleType::Enum role) const |
bool | getOldLoadMode () const |
QString | getRoleDoc (Uml::RoleType::Enum role) const |
Uml::ID::Type | getRoleId (Uml::RoleType::Enum role) const |
QString | getRoleName (Uml::RoleType::Enum role) const |
UMLRole * | getUMLRole (Uml::RoleType::Enum role) const |
bool | operator== (const UMLAssociation &rhs) const |
virtual bool | resolveRef () |
void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
void | setAssociationType (Uml::AssociationType::Enum assocType) |
void | setChangeability (Uml::Changeability::Enum value, Uml::RoleType::Enum role) |
void | setMultiplicity (const QString &multi, Uml::RoleType::Enum role) |
void | setObject (UMLObject *obj, Uml::RoleType::Enum role) |
void | setOldLoadMode (bool value=true) |
void | setRoleDoc (const QString &doc, Uml::RoleType::Enum role) |
void | setRoleName (const QString &roleName, Uml::RoleType::Enum role) |
void | setVisibility (Uml::Visibility::Enum value, Uml::RoleType::Enum role) |
QString | toString () const |
Uml::Visibility::Enum | visibility (Uml::RoleType::Enum role) const |
Public Member Functions inherited from UMLObject | |
UMLObject (UMLObject *parent, const QString &name, Uml::ID::Type id=Uml::ID::None) | |
UMLObject (UMLObject *parent) | |
UMLObject (const QString &name=QString(), Uml::ID::Type id=Uml::ID::None) | |
virtual | ~UMLObject () |
virtual bool | acceptAssociationType (Uml::AssociationType::Enum) |
ObjectType | baseType () const |
QLatin1String | baseTypeStr () const |
virtual void | copyInto (UMLObject *lhs) const |
QString | doc () const |
virtual QString | fullyQualifiedName (const QString &separator=QString(), bool includeRoot=false) const |
bool | hasDoc () const |
virtual Uml::ID::Type | id () const |
bool | isAbstract () const |
bool | isStatic () const |
virtual bool | loadFromXMI (QDomElement &element) |
bool | loadStereotype (QDomElement &element) |
QString | name () const |
bool | operator== (const UMLObject &rhs) const |
QString | package (const QString &separator=QString(), bool includeRoot=false) |
UMLPackageList | packages (bool includeRoot=false) const |
QDomElement | save (const QString &tag, QDomDocument &qDoc) |
QString | secondaryFallback () const |
QString | secondaryId () const |
void | setAbstract (bool bAbstract) |
virtual void | setBaseType (ObjectType ot) |
void | setDoc (const QString &d) |
virtual void | setID (Uml::ID::Type NewID) |
void | setInPaste (bool bInPaste=true) |
virtual void | setName (const QString &strName) |
void | setNameCmd (const QString &strName) |
void | setPackage (const QString &_name) |
void | setSecondaryFallback (const QString &id) |
void | setSecondaryId (const QString &id) |
void | setStatic (bool bStatic) |
void | setStereotype (const QString &_name) |
void | setStereotypeCmd (const QString &_name) |
bool | setUMLPackage (UMLPackage *pPkg) |
void | setUMLStereotype (UMLStereotype *stereo) |
void | setVisibility (Uml::Visibility::Enum visibility) |
void | setVisibilityCmd (Uml::Visibility::Enum visibility) |
virtual bool | showPropertiesPagedDialog (int page=0, bool assoc=false) |
QString | stereotype (bool includeAdornments=false) const |
UMLPackage * | umlPackage () |
const UMLStereotype * | umlStereotype () |
Uml::Visibility::Enum | visibility () const |
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 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_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 } |
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) |
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 518 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 536 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 476 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 488 of file association.cpp.
bool UMLAssociation::getOldLoadMode | ( | ) | const |
Return the backward compatibility flag for loading files.
Definition at line 580 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 554 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 510 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 545 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 563 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 691 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 589 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 628 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 638 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 608 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 572 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 659 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 649 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 618 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 527 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-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.