umbrello/umbrello
#include <umlrole.h>
Public Member Functions | |
UMLRole (UMLAssociation *parent, UMLObject *parentUMLObject, Uml::RoleType::Enum role) | |
virtual | ~UMLRole () |
Uml::Changeability::Enum | changeability () const |
UMLObject * | clone () const |
QString | multiplicity () const |
UMLObject * | object () const |
bool | operator== (const UMLRole &rhs) const |
UMLAssociation * | parentAssociation () const |
Uml::RoleType::Enum | role () const |
void | saveToXMI (QDomDocument &qDoc, QDomElement &qElement) |
void | setChangeability (Uml::Changeability::Enum value) |
void | setMultiplicity (const QString &multi) |
void | setObject (UMLObject *obj) |
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 |
virtual bool | resolveRef () |
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 | |
bool | load (QDomElement &element) |
Protected Member Functions inherited from UMLObject | |
void | init () |
void | maybeSignalObjectCreated () |
Detailed Description
This class contains the non-graphic representation of an association role.
- See also
- UMLObject
Constructor & Destructor Documentation
UMLRole::UMLRole | ( | UMLAssociation * | parent, |
UMLObject * | parentObj, | ||
Uml::RoleType::Enum | role | ||
) |
Sets up an association.
- Parameters
-
parent The parent (association) of this UMLRole. parentUMLObject The Parent UML Object of this UMLRole role The Uml::RoleType::Enum of this UMLRole
Definition at line 30 of file umlrole.cpp.
|
virtual |
Standard destructor.
Definition at line 48 of file umlrole.cpp.
Member Function Documentation
Uml::Changeability::Enum UMLRole::changeability | ( | ) | const |
Returns the Changeablity of the role.
- Returns
- Changeability of role.
Definition at line 86 of file umlrole.cpp.
|
inlinevirtual |
|
protectedvirtual |
Loads the <UML:AssociationEnd> XMI element.
Auxiliary to UMLObject::loadFromXMI.
There are different ways in which the multiplicity might be given:
- direct value in the <AssociationEnd.multiplicity> tag,
- attributes "lower" and "upper" of a subordinate <MultiplicityRange>,
- direct value in subordinate <MultiplicityRange.lower> and <MultiplicityRange.upper> tags
Reimplemented from UMLObject.
Definition at line 219 of file umlrole.cpp.
QString UMLRole::multiplicity | ( | ) | const |
Returns the multiplicity assigned to the role.
- Returns
- The multiplicity assigned to the role.
Definition at line 96 of file umlrole.cpp.
UMLObject * UMLRole::object | ( | ) | const |
Returns the UMLObject assigned to the role.
- Returns
- Pointer to the UMLObject in role.
Definition at line 76 of file umlrole.cpp.
bool UMLRole::operator== | ( | const UMLRole & | rhs | ) | const |
Overloaded '==' operator.
Definition at line 55 of file umlrole.cpp.
UMLAssociation * UMLRole::parentAssociation | ( | ) | const |
Definition at line 67 of file umlrole.cpp.
Uml::RoleType::Enum UMLRole::role | ( | ) | const |
Get the 'id' of the role (NOT the parent object).
This could be either Uml::RoleType::A or Uml::RoleType::B. Yes, it would be better if we could get along without this, but we need it to distinguish saved umlrole objects in the XMI for 'self' associations where both roles will point to the same underlying UMLObject.
Definition at line 152 of file umlrole.cpp.
|
virtual |
Creates the <UML:AssociationEnd> XMI element.
Implements UMLObject.
Definition at line 160 of file umlrole.cpp.
void UMLRole::setChangeability | ( | Uml::Changeability::Enum | value | ) |
Sets the changeability of the role.
- Parameters
-
value Changeability::Enum of role.
Definition at line 128 of file umlrole.cpp.
void UMLRole::setMultiplicity | ( | const QString & | multi | ) |
Sets the multiplicity of the role.
- Parameters
-
multi The multiplicity of role.
Definition at line 139 of file umlrole.cpp.
void UMLRole::setObject | ( | UMLObject * | obj | ) |
Sets the UMLObject playing the role in the association.
- Parameters
-
obj Pointer to the UMLObject of role.
Definition at line 106 of file umlrole.cpp.
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:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.